Skip to content

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

Merged
dkropachev merged 1 commit into
scylladb:scylla-4.xfrom
dkropachev:dk/fix-schema-agreement-query
Mar 21, 2025
Merged

dkropachev merged 1 commit into
scylladb:scylla-4.xfrom
dkropachev:dk/fix-schema-agreement-query

Conversation

@dkropachev

@dkropachev dkropachev commented Mar 20, 2025 •

Copy link
Copy Markdown

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

@Bouncheck Bouncheck left a comment

Copy link
Copy Markdown

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
Copy Markdown
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
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