stefanvodita commented on code in PR #12812:
URL: https://github.com/apache/lucene/pull/12812#discussion_r1420723711


##########
lucene/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java:
##########
@@ -179,6 +179,19 @@ static class SlicedIntBlockPool extends IntBlockPool {
       super(allocator);
     }
 
+    /**
+     * For slices, buffers must be filled with zeros, so that we can find a 
slice's end based on a
+     * non-zero final value.
+     */
+    private static boolean assertSliceBuffer(int[] buffer) {
+      for (int value : buffer) {

Review Comment:
   Bad choice of words on my part to say "exit faster". Maybe I should have 
said "fail faster" or "short-circuit the check". I guess I don't have a strong 
preference either as long as we are addressing the correctness issues.



-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to