rjgoyln opened a new pull request, #11846: URL: https://github.com/apache/ozone/pull/11846
## What changes were proposed in this pull request? A full quota repair (`ozone repair om quota start` without `--buckets`, or the `QUOTA` upgrade action) converts volumes that still carry the pre-1.1 quota value `-2`. It finds them through the RocksDB iterator and puts the row it read back into the fully cached volume table. The state machine does not wait for the double buffer, so a volume change applied just before the repair but not yet flushed is rolled back: - a deleted volume comes back; - a bucket create/delete's `usedNamespace` change or a tenant create/delete's `refCount` change is lost; - a quota set just before the repair is overwritten; - an unflushed volume create keeps `-2`. Which changes are lost depends on how far each OM has flushed, so OMs applying the same log can diverge. The response also writes each converted volume under the bare name instead of the volume table key, so the conversion is lost on restart and a listing of all volumes returns the volume twice. The repair now reads candidates from the volume table cache and rereads each one under its volume lock, and the response writes under the volume table key. The key fix is not split out because on its own the repair's write would persist the rolled-back value. Bare-name rows written by earlier repairs are not removed. Volume lookups use the `/`-prefixed key and do not read them, but they appear wherever the whole table is iterated, such as when listing all volumes. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-17240 ## How was this patch tested? - New `TestOMQuotaRepairRequest#testOldVolumeQuotaRepairKeepsUnflushedVolumeChanges` covers an unflushed delete, usage counter change, quota change and create; each fails on master. - `TestQuotaRepairTask#testQuotaRepairForOldVersionVolumeBucket` now checks the persisted row and that no bare-name row is written; it fails on master. - The JIRA's reproductions pass on master and fail with this change; their controls pass on both. - Quota repair, volume, tenant and bucket request/response suites (150 tests) and `TestOzoneRepairShell` pass. Generated-by: Claude Code (Opus 5.5) -- 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]
