smengcl opened a new pull request, #11632: URL: https://github.com/apache/ozone/pull/11632
Generated-by: Claude Code (Opus 5.5) ## What changes were proposed in this pull request? `ManagedRocksDB#openWithLatestOptions` loads the DB's latest OPTIONS file with `ignore_unknown_options=false`. It backs `ozone repair om|scm update-transaction`, `ozone repair ldb compact` and `ozone repair om snapshot chain`. When the DB was last opened by a newer RocksDB (a downgrade before finalization, or an older CLI against a newer DB), these tools fail before opening the DB, e.g. `Could not find option: : metadata_write_temperature`. This is exactly when a repair is needed, since the downgraded service does not start and so never rewrites the OPTIONS file in the old format. This PR sets `setIgnoreUnknownOptions(true)` in `openWithLatestOptions`. RocksDB only honours the flag for OPTIONS files written by a newer RocksDB version, so unknown options in a same or older version file still fail. Data readability is still enforced by the SST and MANIFEST readers. Ozone services never load the DB's OPTIONS file, so nothing they rely on changes. `DBConfigFromFile` stays strict, since those ini files are user written. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-17144 ## How was this patch tested? Added `TestLdbRepair#testOpenWithOptionsFromNewerRocksDB`: adds an unknown CF option to the DB's OPTIONS file and checks that opening still fails with the original version header, then succeeds once the header says `rocksdb_version=99.0.0`. The test fails without the fix. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
