-
Notifications
You must be signed in to change notification settings - Fork 911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read cluster shard count from DB #3788
Conversation
@@ -733,10 +733,16 @@ func loadClusterInformationFromStore(ctx context.Context, config *config.Config, | |||
return err | |||
} | |||
metadata := item.(*persistence.GetClusterMetadataResponse) | |||
shardCount := metadata.HistoryShardCount | |||
if shardCount == 0 { | |||
// This is to add backward compatibility to the config based cluster connection. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I understand correct this only applies to ancient versions of Temporal Server?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recent versions should always have this stored in DB?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. If the clusters are using tctl to connect, then it should have the shard count. If the clusters connection is the legacy config-base, the shard count could be 0. We don't want to support the config base connection so I just assume the clusters shard count must be equal if they are using config base connection.
What changed?
Read cluster shard count from DB
Why?
Read cluster shard count from DB and use in cluster cache.
How did you test it?
Unit tests
Potential risks
Is hotfix candidate?