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

   <!-- obsidian --><h3 data-heading="What changes were proposed in this pull 
request?">What changes were proposed in this pull request?</h3>
   <p><code>ContainerMapper.parseOmDB</code> called 
<code>OmKeyLocationInfoGroup.createLocationList()</code> once per version group 
of every key, only to iterate the result once. 
<code>createLocationList()</code> is documented as not O(1).</p>
   <p>This PR adds one nested loop over the zero-copy 
<code>getLocationLists()</code> accessor; the inner loop body that builds 
<code>BlockIdDetails</code> is unchanged.</p>
   <p>Additionally, a throwaway (not committed) JUnit micro-benchmark measured 
per-traversal thread allocation for both implementations (JDK 21.0.12, 
50,000-iteration warmup then 500,000 measured iterations per shape, 
deterministic checksums asserted equal, <code>volatile</code> sink to block JIT 
elimination). Results, reproduced across two independent JVM processes:</p>
   
   Key Shape | Before | After | Saved
   -- | -- | -- | --
   1 group x 1 block | 100 ns / 419 B | 8 ns / 0 B | 419 B
   1 group x 4 blocks | 87 ns / 408 B | 13 ns / 0 B | 408 B
   1 group x 32 blocks | 242 ns / 744 B | 61 ns / 0 B | 744 B
   4 groups x 4 blocks | 242 ns / 1632 B | 52 ns / 0 B | 1632 B
   16 groups x 8 blocks | 1303 ns / 6528 B | 312 ns / 0 B | 6528 B
   
   
   <h3 data-heading="What is the link to the Apache JIRA">What is the link to 
the Apache JIRA</h3>
   <p><a href="https://issues.apache.org/jira/browse/HDDS-16255"; 
class="external-link" target="_blank" rel="noopener 
nofollow">https://issues.apache.org/jira/browse/HDDS-16255</a></p>
   <h3 data-heading="How was this patch tested?">How was this patch tested?</h3>
   
   The following test passed:
   
   - `TestContainerMapper#testContainerMapper`
   
   Also ran `checkstyle.sh` and `author.sh` successfully.


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