maedhroz commented on code in PR #2487:
URL: https://github.com/apache/cassandra/pull/2487#discussion_r1262948389
##########
test/unit/org/apache/cassandra/index/sai/disk/v1/bbtree/BlockBalancedTreeReaderTest.java:
##########
@@ -222,6 +231,55 @@ public void
testResourcesReleaseWhenQueryDoesntMatchAnything() throws Exception
assertNull(intersection);
}
+ @Test
+ public void testConcurrentIntersectionsOnSameReader() throws Exception
+ {
+ int numRows = 1000;
+
+ final BlockBalancedTreeRamBuffer buffer = new
BlockBalancedTreeRamBuffer(Integer.BYTES);
+
+ byte[] scratch = new byte[4];
+ for (int docID = 0; docID < numRows; docID++)
+ {
+ NumericUtils.intToSortableBytes(docID, scratch, 0);
+ buffer.add(docID, scratch);
+ }
+
+ final BlockBalancedTreeReader reader = finishAndOpenReader(4, buffer);
Review Comment:
nit: Little hygiene thing, but I guess we should make sure we close the
reader here.
(I can fix on commit.)
--
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]