Skip to content
This repository was archived by the owner on Jan 2, 2025. It is now read-only.

[v2.0.0] Please wait for schema agreement on table creation #121

Open
sroebuck opened this issue Mar 18, 2017 · 1 comment
Open

[v2.0.0] Please wait for schema agreement on table creation #121

sroebuck opened this issue Mar 18, 2017 · 1 comment
Assignees
Labels

Comments

@sroebuck
Copy link

In a clustered cassandra environment I'm hitting occassional errors in code which creates a table and then immediately starts writing into it. The errors appear in the cassandra log as org.apache.cassandra.db.UnknownColumnFamilyException: Got slice command for nonexistent table my.test. If the table was just created, this is likely due to the schema not being fully propagated. Please wait for schema agreement on table creation.

Googling this issue it appears that this issue may be handled by other drivers by waiting for schema agreement before returning from the CREATE TABLE call.

There's a related StackOverflow response here, to quote:

The modern DataStax drivers automatically check and wait for schema agreement after you execute a schema-altering statement. Cassandra returns a special response for schema-altering statements that allows the drivers to do this automatically. Once the drivers gets that response, it (blockingly) queries the system.peers table of the node the query was executed against to check the reported schema versions of other nodes. It will continue to execute this query in a loop until either schema agreement is reached or a timeout is hit.

@AlexPikalov AlexPikalov self-assigned this Mar 19, 2017
@AlexPikalov
Copy link
Owner

AlexPikalov commented Mar 19, 2017

Looks as if it makes sense to investigate this more closely.
Thank you.

@AlexPikalov AlexPikalov added v2 and removed bug labels Nov 25, 2017
@AlexPikalov AlexPikalov changed the title Please wait for schema agreement on table creation [v2.0.0] Please wait for schema agreement on table creation Nov 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants