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

   ## What changes were proposed in this pull request?
   When ozone.om.max.buckets is enforced, validateMaxBucket used 
getEstimatedKeyCount(). For the bucket table, OM initializes volume/bucket 
tables with CacheType.FULL_CACHE (OmMetadataManagerImpl.initializeOmTables), 
and for a full cache TypedTable.getEstimatedKeyCount() returns cache.size().
   
   On delete, OMBucketDeleteRequest writes a tombstone via 
CacheValue.get(transactionLogIndex) (null value). That entry stays in 
FullTableCache until periodic cleanup (scheduleWithFixedDelay(..., 1000L, 
TimeUnit.MILLISECONDS) in FullTableCache). Until eviction, 
getEstimatedKeyCount() can still include deleted buckets, so a create 
immediately after a delete at the limit can fail with TOO_MANY_BUCKETS even 
when no live bucket remains.
   
   ## What is the link to the Apache JIRA
   
   [HDDS-17457](https://issues.apache.org/jira/browse/HDDS-17457)
   
   ## How was this patch tested?
   Before fix 
[TestBugCR1MaxBucketDeleteMarker.java](https://issues.apache.org/jira/secure/attachment/13085930/13085930_TestBugCR1MaxBucketDeleteMarker.java)
 passed
   After fix 
[TestBugCR1MaxBucketDeleteMarker.java](https://issues.apache.org/jira/secure/attachment/13085930/13085930_TestBugCR1MaxBucketDeleteMarker.java)
 failed
   indicating the issues was detected and fixed.
   
   Unit test added in TestOMBucketCreateRequest.
   
   Green CI : https://github.com/sreejasahithi/ozone/actions/runs/40637132894
   


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