ArafatKhan2198 opened a new pull request, #12205: URL: https://github.com/apache/ozone/pull/12205
## **What changes were proposed in this pull request?** When OM changes something, Recon copies the change into its OM DB first. It updates the summary a little later, on a separate thread. **What was going wrong** 1. A user deletes the last key of a bucket and then the bucket, for example with `ozone sh bucket delete -r` or `aws s3 rb --force`. 2. Recon writes the OM delta to its OM DB. The bucket is now gone there. 3. The NSSummary task processes the key event later and looks up the key's bucket. 4. The lookup returns null. 5. `NSSummaryTaskWithOBS` and `NSSummaryTaskWithLegacy` call `getBucketLayout()` on it without a null check and throw a `NullPointerException`. 6. The whole batch fails and the retry fails the same way. 7. Recon queues a full rebuild of all its OM tasks, and their data is stale until it finishes. **The fix** - Both tasks now skip a key event whose bucket is no longer in the Recon OM DB. - The batch succeeds, the other events are applied, and no rebuild is triggered. **Why it is safe** - The bucket is deleted, so its summary can no longer be reached. Skipping the event loses nothing. - The reprocess path already skips a null bucket, so the incremental path now behaves the same way. - Only the null case changes. Existing buckets are handled exactly as before. ## **What is the link to the Apache JIRA** https://issues.apache.org/jira/browse/HDDS-17048 ## **How was this patch tested?** - New `TestNSSummaryTask.TestProcessParallelMixedBatch#testKeyEventOfDeletedBucketDoesNotFailBatch` and `#testKeyEventOfDeletedCachedBucketDoesNotFailBatch`. Both fail with the `NullPointerException` without the fix. -- 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]
