Skip to content
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

Make schema agreement query pull only columns that are used #470

Merged

Conversation

dkropachev
Copy link
Collaborator

@dkropachev dkropachev commented Mar 20, 2025

Currently schema agreement logic run select * from system.peers, while only schema_version is used, it creates excessive load on cluster and driver side.

Fixes: #468

@dkropachev dkropachev force-pushed the dk/fix-schema-agreement-query branch from edc89f9 to 955b92e Compare March 20, 2025 14:47
@dkropachev dkropachev force-pushed the dk/fix-schema-agreement-query branch 2 times, most recently from 0c12648 to eff235b Compare March 21, 2025 11:18
@dkropachev dkropachev marked this pull request as ready for review March 21, 2025 14:00
@dkropachev dkropachev requested a review from Bouncheck March 21, 2025 14:00
Copy link
Collaborator

@Bouncheck Bouncheck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment in SchemaAgreementChecker.java.

I think TokenMap may be sometimes slightly out of sync. I don't know yet if this is a problem.
Coupling the schema agreement check with token map this way has the consequence that zero token nodes will be considered valid peers in the absence of token map regardless of METADATA_ALLOW_ZERO_TOKEN_PEERS setting. Token map may be absent if METADATA_TOKEN_MAP_ENABLED is set to false.

@dkropachev
Copy link
Collaborator Author

See comment in SchemaAgreementChecker.java.

I think TokenMap may be sometimes slightly out of sync. I don't know yet if this is a problem. Coupling the schema agreement check with token map this way has the consequence that zero token nodes will be considered valid peers in the absence of token map regardless of METADATA_ALLOW_ZERO_TOKEN_PEERS setting. Token map may be absent if METADATA_TOKEN_MAP_ENABLED is set to false.

When token information is not avaialble it includes all peers into schema agreement agreement

Currently schema agreement logic run `select * from system.peers`, while
only `schema_version` is used, it creates excessive load on cluster and
driver side.
@dkropachev dkropachev force-pushed the dk/fix-schema-agreement-query branch from eff235b to 7f9be7a Compare March 21, 2025 16:28
@dkropachev dkropachev requested review from Bouncheck and mykaul March 21, 2025 16:28
@dkropachev dkropachev merged commit cd00c97 into scylladb:scylla-4.x Mar 21, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4.x: Don't use overly broad SELECTs when checking schema agreement
3 participants