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

Wait for schema consensus #312

Closed
bettio opened this issue Apr 10, 2020 · 2 comments
Closed

Wait for schema consensus #312

bettio opened this issue Apr 10, 2020 · 2 comments
Assignees
Labels
app:housekeeping This issue or pull request is about astarte_housekeeping application app:realm_management This issue or pull request is about astarte_realm_management application bug Something isn't working database This issue or pull request is about database (e.g. schema change, queries, support, etc...)

Comments

@bettio
Copy link
Contributor

bettio commented Apr 10, 2020

Each schema change statement should be executed only when Cassandra has reached schema consensus.
Schema changes without a consensus might bring to an undefined behavior.

Proposed solution:

  1. Check (and wait) consensus using system.peers.schema_version and system.local.schema_version columns.
  2. Execute schema change.
  3. Check (and wait) consensus again.
@bettio bettio added bug Something isn't working database This issue or pull request is about database (e.g. schema change, queries, support, etc...) app:housekeeping This issue or pull request is about astarte_housekeeping application app:realm_management This issue or pull request is about astarte_realm_management application labels Apr 10, 2020
@bettio bettio self-assigned this Apr 10, 2020
@bettio
Copy link
Contributor Author

bettio commented Apr 10, 2020

See also whatyouhide/xandra#181 .

@rbino
Copy link
Collaborator

rbino commented Dec 2, 2020

Closed by #350

@rbino rbino closed this as completed Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app:housekeeping This issue or pull request is about astarte_housekeeping application app:realm_management This issue or pull request is about astarte_realm_management application bug Something isn't working database This issue or pull request is about database (e.g. schema change, queries, support, etc...)
Projects
None yet
Development

No branches or pull requests

2 participants