priyeshkaratha opened a new pull request, #11309:
URL: https://github.com/apache/ozone/pull/11309

   ## What changes were proposed in this pull request?
   Online quota repair scans a point-in-time RocksDB checkpoint and submits 
per-bucket usage deltas as `BucketQuotaCount`, which identifies the target 
bucket only by `volName`/`bucketName`, with no identity field. If a bucket is 
deleted and recreated under the same name after the scan captures it but before 
the repair transaction commits, `OMQuotaRepairRequest.updateBucketInfo` 
resolves the bucket by name and applies the stale delta to the new generation, 
potentially driving its `usedBytes`/`usedNamespace` negative. A negative 
`usedBytes` inflates quota headroom and can permit writes beyond the configured 
bucket quota.
   
     This adds a `bucketObjectID` field to `BucketQuotaCount` (`optional`, for 
backward/rolling compatibility) and has the scan side (`QuotaRepairTask`) stamp 
each emitted delta with the objectID of the bucket it scanned. On apply, 
`OMQuotaRepairRequest.updateBucketInfo` now skips (with a warning log) any 
delta whose `bucketObjectID` doesn't match the currently-resolved bucket, 
instead of blindly applying it.
   
   ## What is the link to the Apache JIRA
   
   HDDS-16126
   
   ## How was this patch tested?
   
   Addted testcase to validate
   


-- 
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]

Reply via email to