maedhroz commented on code in PR #3700:
URL: https://github.com/apache/cassandra/pull/3700#discussion_r2427513535
##########
test/distributed/org/apache/cassandra/distributed/test/SecondaryIndexTest.java:
##########
@@ -122,4 +132,53 @@ public void test_only_coordinator_chooses_index_for_query()
});
}
}
+
+ @Test
+ public void test_secondary_rebuild_with_small_memtable_memory()
+ {
+ // populate data
+ for (int i = 0 ; i < 100 ; ++i)
+ cluster.coordinator(1).execute(String.format("INSERT INTO %s (k,
v) VALUES (?, ?)", tableName), ConsistencyLevel.ALL, i,
generateRandomString(50000));
+
+ cluster.forEach(i -> i.flush(KEYSPACE));
+
+ // restart node 1 with small memtable allocation so that index rebuild
will cause memtable flush which will need
+ // to reclaim the memory. see CASSANDRA-19564
+ waitOn(cluster.get(1).shutdown());
+ cluster.get(1).config().set("memtable_heap_space", "1MiB");
Review Comment:
If this case runs first, before
`test_only_coordinator_chooses_index_for_query`, I'd be a little worried that
we'll have overridden `memtable_heap_space` to a non-default value, which could
impact subsequent tests. It's not a hot-property, so the restart makes sense,
but we might want to ensure the default is active in `@Before`.
--
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]