Skip to content

Commit

Permalink
migration_manager: do not pull schema if raft is on
Browse files Browse the repository at this point in the history
After consistent schema changes, remove schema pulls from gossiper
events if Raft is enabled, and considering Raft upgrade state.

Only disable pull if Raft is fully enabled.

Fixes scylladb#12870

Signed-off-by: Alejo Sanchez <alejo.sanchez@scylladb.com>

Closes scylladb#13695
  • Loading branch information
alecco authored and kbr-scylla committed May 24, 2023
1 parent eb457b6 commit 91f609d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions service/migration_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,9 @@ future<column_mapping> get_column_mapping(table_id table_id, table_schema_versio
}

future<> migration_manager::on_join(gms::inet_address endpoint, gms::endpoint_state ep_state) {
schedule_schema_pull(endpoint, ep_state);
if (!_group0_client.using_raft()) {
schedule_schema_pull(endpoint, ep_state);
}
return make_ready_future();
}

Expand All @@ -1227,14 +1229,18 @@ future<> migration_manager::on_change(gms::inet_address endpoint, gms::applicati
return make_ready_future();
}
if (_storage_proxy.get_token_metadata_ptr()->is_normal_token_owner(endpoint)) {
schedule_schema_pull(endpoint, *ep_state);
if (!_group0_client.using_raft()) {
schedule_schema_pull(endpoint, *ep_state);
}
}
}
return make_ready_future();
}

future<> migration_manager::on_alive(gms::inet_address endpoint, gms::endpoint_state state) {
schedule_schema_pull(endpoint, state);
if (!_group0_client.using_raft()) {
schedule_schema_pull(endpoint, state);
}
return make_ready_future();
}

Expand Down

0 comments on commit 91f609d

Please sign in to comment.