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 creation safer #10

Open
3 tasks
fruch opened this issue Aug 12, 2024 · 1 comment
Open
3 tasks

Make schema creation safer #10

fruch opened this issue Aug 12, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@fruch
Copy link

fruch commented Aug 12, 2024

currently this how c-s is creating the schema

//Keyspace
client.execute(createKeyspaceStatementCQL3(), org.apache.cassandra.db.ConsistencyLevel.LOCAL_ONE);

client.execute("USE \""+keyspace+"\"", org.apache.cassandra.db.ConsistencyLevel.LOCAL_ONE);

//Add standard1
client.execute(createStandard1StatementCQL3(settings), org.apache.cassandra.db.ConsistencyLevel.LOCAL_ONE);

System.out.println(String.format("Created keyspaces. Sleeping %ss for propagation.", settings.node.nodes.size()));
Thread.sleep(settings.node.nodes.size() * 1000L); // seconds

it had an assumption all of the nodes are up and running, when this code is running,
node taking down during this phase, might fail this phase, and not retires for it.

also we are running it from multiple command at the same time, and the schema creation and the USE statement might going to other node that might not yet got the schema update, and would fail.

Tasks

Preview Give feedback
@fruch fruch added the bug Something isn't working label Aug 12, 2024
@fruch
Copy link
Author

fruch commented Aug 14, 2024

@CodeLieutenant try to estimate this work (or every step of it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants