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

   ## What changes were proposed in this pull request?
   The existing mismatch API was inefficient because it looked into the 
containerKeyPrefix table for all containers, which required examining many more 
keys than necessary. This was especially problematic when only checking for 
container presence rather than needing full container metadata. The original 
approach used complex dual-iterator logic with sorting and comparison 
operations, leading to poor performance and unnecessary deserialization.
   
   ### Proposed Changes
   1. Removed peekNextKey() Functionality
   The pull request removes the peekNextKey() method from the SeekableIterator 
interface and updates the ContainerMetadataIterator to remove peek 
functionality. The ContainerEndpoint logic was modified to use simple next() 
calls instead of peek operations, and the corresponding test method 
testContainerIteratorPeekNextKey() was removed.
   2. Completely Overhauled SCM Case Logic
   The SCM case (missing in SCM - data loss scenario) was completely rewritten 
following reviewer feedback. The old approach used complex dual-iterator logic 
with sorting and comparison operations. The new approach loads all SCM 
containers into a HashMap for fast O(1) lookups, then iterates over OM 
containers using only the containerKeyCountTable to avoid unnecessary 
deserialization. This eliminates the need for complex iterator comparisons and 
seeking operations.
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-12655
   
   ## How was this patch tested?
   
   Unit tests


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