The harvesting mechanism is based on the concept of universally unique identifier (uuid). This is a special id because it is not only unique locally to the node that generated it but it is unique across all the world. It is a combination of the network interface’s MAC address, the current date/time and a random number. Every time you create a new metadata in GeoNetwork, a new uuid is generated and assigned to it.
Another important concept behind the harvesting is the last change date. Every time you change a metadata, its last change date is updated. Just storing this parameter and comparing it with a new one allows any system to find out if the metadata has been modified since last update.
These two concepts allow GeoNetwork to fetch a remote metadata, check if it has been updated and remove it locally if it has been removed remotely. Furthermore, thanks to uuids, a hierarchy of harvesting nodes can be built where B harvests from C and A harvests from B. Even loops can be created because harvested metadata cannot be modified.