tablets: Fix topology_metadata_guard holding on to the old erm
Since abort callbacks are fired synchronously, we must change the table's erm before we do that so that the callbacks obtain the new erm. Otherwise, we will block barriers.
This commit is contained in:
@@ -1695,10 +1695,10 @@ table::table(schema_ptr schema, config config, lw_shared_ptr<const storage_optio
|
||||
}
|
||||
|
||||
void table::update_effective_replication_map(locator::effective_replication_map_ptr erm) {
|
||||
if (_erm) {
|
||||
_erm->invalidate();
|
||||
auto old_erm = std::exchange(_erm, std::move(erm));
|
||||
if (old_erm) {
|
||||
old_erm->invalidate();
|
||||
}
|
||||
_erm = std::move(erm);
|
||||
}
|
||||
|
||||
partition_presence_checker
|
||||
|
||||
Reference in New Issue
Block a user