tests: tablets: Set initial tablets to 1 to exit growing mode
After tablet hints, there is no notion of leaving growing mode and tablet count is sustained continuously by initial tablet option, so we need to lower it for merge to happen.
This commit is contained in:
@@ -2642,6 +2642,8 @@ static void do_test_load_balancing_merge_colocation(cql_test_env& e, const int n
|
||||
save_tablet_metadata(e.local_db(), stm.get()->tablets(), guard.write_timestamp()).get();
|
||||
}
|
||||
|
||||
// Lower "initial" tablets option, allowing for merge decision.
|
||||
e.execute_cql(fmt::format("alter keyspace {} with tablets = {{'enabled': true, 'initial': 1}}", ks_name)).get();
|
||||
|
||||
auto tablet_count = [&] {
|
||||
return stm.get()->tablets().get_tablet_map(table1).tablet_count();
|
||||
@@ -2833,6 +2835,9 @@ SEASTAR_THREAD_TEST_CASE(test_load_balancing_resize_requests) {
|
||||
BOOST_REQUIRE(std::holds_alternative<locator::resize_decision::none>(resize_decision().way));
|
||||
}
|
||||
|
||||
// Drop initial tablet count to 1 so merge can happen.
|
||||
e.execute_cql(fmt::format("alter keyspace {} with tablets = {{'enabled': true, 'initial': 1}}", ks_name)).get();
|
||||
|
||||
// avg size hits split threshold, and balancer emits split request
|
||||
{
|
||||
locator::load_stats load_stats = {
|
||||
|
||||
Reference in New Issue
Block a user