Overview #As its name implies, the Janitor process is an EDirectory Background Processes that is responsible for routine cleanup of the eDirectory environment. Janitor is responsible for
- Monitoring the value of the NCP status attribute maintained in the eDirectory Server object for this server.
- Keeping track of the (Root)-most partition replica on the server and the overall replica depth of the server. The (Root)-most partition is the partition root object highest in the tree (closest to (Root)). Replica depth describes how many levels down from (Root) the highest partition replica hosted by that server is.
- Executing the Flat cleaner process at regular intervals.
- Optimizing the eDirectory database at regular intervals.
- Reporting synthetic time use by a partition replica on the server. Synthetic time occurs when a server clock set to a future time is reset to the correct time. Any eDirectory changes made while the clock was set at the future time will bear incorrect timestamps. This problem will self-correct as long as the gap between current and synthetic time is not too large.
- Making sure the inherited rights for each partition root object on this server are properly maintained.
Check For Purgable Items#The Janitor scans the partition and checks the Replica Up To attribute to determine which values and entries can be purged. A value can be purged from an entry if:
- The value is not present.
- The value's modification time is less recent than the purge time (purge time is the same as the Replica Up To attribute).
The Janitor purges the value if both conditions are met. As part of purging the value, the Janitor performs special processing for counter syntax values to compute the total counter values.
Once the Janitor has inspected all values for an entry, it determines whether the entire entry can be purged. It purges any entry that:
- Is not present.
- Has no values.
If there are any items to be purged, the Janitor process then schedules the Purger process.
Creates Two Lists #While scanning the partition, the Janitor builds two lists:
- Release ID List - a list of entries that have been moved successfully. The Janitor releases these entries.
- Notify External Reference list - a list of entries that have Back Link obituaries to be processed. The Janitor uses this list to send synchronization messages to external references.
Rename Tree #The Janitor also checks if the partition's root entry has been renamed. If there was a rename, the Janitor notifies all NDS External References of the root entry of the new name.
Move Expectations #In addition, the Janitor purges Move expectations that are more than ten minutes old.
The Janitor then uses the two lists it generated in scanning the partitions to synchronize the external references.
For each entry in the Release ID List, the Janitor sends a Release Moved Entry request to the destination entry. If this request is successful, the obituary can then be purged.
For each entry in the Notify External Reference list, the Janitor requests external reference synchronization and specifies the operation that must be performed on the external reference.