HDDS-11775. Allow Ozone debug tools that need to read RocksDB to automatically create a checkpoint #7664
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Some ozone debug tools may require a consistent view into the RocksDB instance to function correctly and may give incorrect results if the DB is being used by a running OM. To fix this, we can have ozone debug operate on a RocksDB checkpoint if the Ozone process is running. This avoids users having to manually install RocksDB's ldb and make the checkpoint themselves. An optional flag --checkpoint in introduced, that instructs the command to create a checkpoint from the RocksDB instance provided and read that instead.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-11775
How was this patch tested?
Tested manually using a db instace:
--will be adding a robot test