The following topics are covered:
Production and any other system may have faults some day. They may be caused by hardware problems, human faults, software errors during updates and many other circumstances. It is important to check integrity and consistency of the system if there is no backup or it is stale, or recovery process takes much. Exo JCR implementation offers an innovative JMX-based complex checking tool. Running inspection, tool check every major JCR component, such as persistent data layer and index. Persistent layer includes JDBC Data Container and Value-Storages if they are configured. Database verified using the set of complex specialized domain-specific queries. Value Storage tool checks existence and access to each file. Index verification contains two-way pass cycle, existence of each node in index checks on persistent layer along with opposite direction, when each node from Data Container validated in index. Access to check tool is exposed via JMX interface, with the following operation available:
| checkAll() | Inspect full repository data (db, value storage and search index) |
| checkDataBase() | Inspect only DB |
| checkValueStorage() | Inspect only ValueStorage |
| checkIndex() | Inspect only SearchIndex |
Also tools provides abilities to repair possible inconsistencies:
Item has no parent node - properties will be removed and root UUID will be assigned in case of nodes
Node has a single valued property with nothing declared in the VALUE table - property will be removed if it is not required by primary type of its node
Node has no primary type property - node and whole subtree will be removed if node is not required by primary type of its parent
Value record has no related property record - value record will be removed from database
Item is its own parent - properties will be removed and root UUID will be assigned in case of nodes
Several versions of same item - all earler records with earler versions will be removed from ITEM table
Reference properties without reference records - property will be removed if it is not required by primary type of its node
Node is marked as locked in the lockmanager's table but is not in the ITEM table or the opposite - all lock inconsistencies will be removed from both tables
Property's value is stored in the File System but content is missing - new empty file corresponding to value will be created
All tool activities are stored in file, which can be found in app
directory by name report-<repository
name>-dd-MMM-yy-HH-mm.txt.