service: move to cleanup stage if allow_write_both_read_old fails
If allow_write_both_read_old tablet transition stage fails, move to cleanup_target stage before reverting migration. It's a preparation for further patches which deallocate storage group of a tablet during cleanup.
This commit is contained in:
@@ -292,7 +292,7 @@ stateDiagram-v2
|
||||
use_new --> cleanup
|
||||
cleanup --> end_migration
|
||||
end_migration --> [*]
|
||||
allow_write_both_read_old --> revert_migration: error
|
||||
allow_write_both_read_old --> cleanup_target: error
|
||||
write_both_read_old --> cleanup_target: error
|
||||
streaming --> cleanup_target: error
|
||||
write_both_read_new --> if_state: error
|
||||
|
||||
@@ -1046,7 +1046,7 @@ class topology_coordinator : public endpoint_lifecycle_subscriber {
|
||||
case locator::tablet_transition_stage::allow_write_both_read_old:
|
||||
if (action_failed(tablet_state.barriers[trinfo.stage])) {
|
||||
if (check_excluded_replicas()) {
|
||||
transition_to_with_barrier(locator::tablet_transition_stage::revert_migration);
|
||||
transition_to_with_barrier(locator::tablet_transition_stage::cleanup_target);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user