Add zodbtraverse to inspect & compare which OIDs are load- & reachable
Hello everyone,
@vpelletier This is the tool we are using on our project to validate that after a NEO pack+gc we can still access the same objects. As we thought this may also be useful for you, we aimed to share it here.
@kirr I thought this may fit the best in zodbtools. Do you suggest any other project/repository for this script?
Best, Levin
/cc @klaus
With zodbtraverse a user can traverse a ZODB database graph from its root to find all reach- and loadable OIDs. It only finds OIDs that are both, reachable and loadable, but doesn't dump OIDs that are loadable but not reachable (orphaned objects) and doesn't dump OIDs that are reachable but not loadable (broken or corrupt objects). The found OIDs are stored in a SQLite database. After traversing a ZODB database twice, the found OIDs can be compared to see if the ZODB database differs.
This tool was developed to see if the same objects of a ZODB database are still reach- & loadable after changes were applied to its storage. It helps to guarantee the integrity of the data (e.g. to ensure the storage changes don't lead to a data loss).