fix(router): emit clearer error when conflicting schemas in use

This commit is contained in:
Andrew Mayorov 2023-09-04 16:37:38 +04:00
parent 893f69617a
commit 7d26b7bc1a
No known key found for this signature in database
GPG Key ID: 2837C62ACFBFED5D
1 changed files with 13 additions and 1 deletions

View File

@ -503,7 +503,19 @@ choose_schema_vsn(ConfType) ->
{false, true} -> {false, true} ->
v1; v1;
{true, false} -> {true, false} ->
v2 v2;
{false, false} ->
?SLOG(critical, #{
msg => "conflicting_routing_schemas_detected_in_cluster",
configured => ConfType,
reason =>
"There are records in the routing tables related to both v1 "
"and v2 storage schemas. This probably means that some nodes "
"in the cluster use v1 schema and some use v2, independently "
"of each other. The routing is likely broken. Manual intervention "
"and full cluster restart is required. This node will shut down."
}),
error(conflicting_routing_schemas_detected_in_cluster)
end. end.
is_empty(Tab) -> is_empty(Tab) ->