The count nodes script for Oak repository will count the number of nodes. It traverses the whole repository including all hidden nodes under /oak:index finding any data corruptions along the way (e.g. SegmentNotFoundException in the case of Tar SegmentNodeStore, aka TarMK).
This is useful for fixing issues such as these:
- https://helpx.adobe.com/experience-manager/kb/offline-compaction-fails-with-SegmentNotFoundException-and-IllegalArgumentException.html
- https://helpx.adobe.com/experience-manager/kb/fix-inconsistencies-in-the-repository-when-segmentnotfound-issue.html
- https://helpx.adobe.com/experience-manager/kb/oak-blobstore-inconsistency-blobId.html
A. Run with AEM / Sling / Oak process stopped and use oak-run-*.jar console tool