beobal commented on code in PR #3165:
URL: https://github.com/apache/cassandra/pull/3165#discussion_r1519864466


##########
test/distributed/org/apache/cassandra/distributed/test/log/BounceIndexRebuildTest.java:
##########
@@ -41,10 +41,12 @@ public void bounceTest() throws Exception
             cluster.schemaChange(withKeyspace("create index idx on %s.tbl 
(x)"));
             Object[][] res = 
cluster.coordinator(1).execute(withKeyspace("select * from %s.tbl where x=5"), 
ConsistencyLevel.ALL);
             assert res.length > 0;
+            final String pattern = "Index build of idx complete|Index 
\\[idx\\] became queryable after successful build";

Review Comment:
   > From what I can see, though, it does get rebuilt after the restart. With 
legacy index the pre-bounce count is 0 and it becomes 1 after the restart. 
   
   Are you sure? What I see on trunk is that the pre-bounce count is 1 and 
stays at 1 following the restart.
   If we change the search to use your pattern that changes to 2 pre-bounce and 
3 after, because we always log the `Index [idx] became queryable` message, 
whether the index was rebuilt or not. 
   
   > With SAI the numbers are 1 and 2, respectively
   
   Yes, because both SAI and legacy 2i indexes will log the `Index [idx] became 
queryable...` as I said in the comment, but SAI will never log `Index build of 
idx complete`.
   
   > I really don't know what the test is supposed to verify; it is introduced 
with TCM and I went with the understanding that the test is checking that there 
is a rebuild after the restart.
   
   er, no it's the opposite. It's verifying that the legacy 2i index is _not_ 
rebuilt after a bounce (which would cause it to log `Index build of idx 
complete`).
   



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