service: Announce the new schema version when features are enabled

Introduced in c96ee98.

We call update_schema_version() after features are enabled and we
recalculate the schema version. This method is not updating gossip
though. The node will still use it's database::version() to decide on
syncing, so it will not sync and stay inconsistent in gossip until the
next schema change.

We should call updatE_schema_version_and_announce() instead so that
the gossip state is also updated.

There is no actual schema inconsistency, but the joining node will
think there is and will wait indefinitely. Making a random schema
change would unbock it.

Fixes #4647.

Message-Id: <1566825684-18000-1-git-send-email-tgrabiec@scylladb.com>
This commit is contained in:
Tomasz Grabiec
2019-08-26 15:21:24 +02:00
committed by Avi Kivity
parent a7b82af4c3
commit ac5ff4994a

View File

@@ -86,7 +86,7 @@ void migration_manager::init_messaging_service()
auto update_schema = [this, &ss] {
with_gate(_background_tasks, [this, &ss] {
mlogger.debug("features changed, recalculating schema version");
return update_schema_version(get_storage_proxy(), ss.cluster_schema_features());
return update_schema_version_and_announce(get_storage_proxy(), ss.cluster_schema_features());
});
};