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

In Cassandra3 storage, only use consistency level LOCAL_ONE if a local_dc has been defined, otherwise use ONE #1753

Merged
merged 4 commits into from
Oct 2, 2017

Conversation

michaelsembwever
Copy link
Member

Also…

  • Mark all writes as idempotent.
  • Update the retry policy, honouring idempotence, consistency level, and applying appropriate back-pressure.

michaelsembwever and others added 3 commits October 1, 2017 22:31
…l_dc has been defined, otherwise use ONE.

Mark all writes as idempotent.
Update the retry policy, honouring idempotence, consistency level, and applying appropriate back-pressure.
Copy link
Member

@codefromthecrypt codefromthecrypt left a comment

Choose a reason for hiding this comment

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

reformatted w/ https://github.com/square/java-code-styles vs nagging you :)

just one thing on my end, just to understand this. @llinder how do you feel?

@@ -123,6 +125,13 @@ static Cluster buildCluster(Cassandra3Storage cassandra) {
builder.withPoolingOptions(new PoolingOptions().setMaxConnectionsPerHost(
HostDistance.LOCAL, cassandra.maxConnections
));

builder.withQueryOptions(
Copy link
Member

Choose a reason for hiding this comment

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

this is the only one I don't know just by reading it. Can you put a comment line of why we do this, or tell me and I'll add it? Thx!

Copy link
Member Author

@michaelsembwever michaelsembwever Oct 2, 2017

Choose a reason for hiding this comment

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

if local_dc isn't defined then LOCAL_ONE sticks requests to the dc of the first seed host that the driver connects to.
ONE will at least in this situation connect to any dc, and then any latency awareness will bring it back to (eventually) using the local dc.

furthermore LOCAL_ONE can fail easily if you're not using 'NetworkTopologyStrategy` but that's a fix for another day.

Copy link
Member Author

Choose a reason for hiding this comment

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

added comment. (can you please squash the 4 commits!)

Copy link
Member

Choose a reason for hiding this comment

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

great info. ty

@codefromthecrypt codefromthecrypt merged commit 4420e3b into master Oct 2, 2017
@codefromthecrypt codefromthecrypt deleted the mck/cassandra3-improve-query-options branch October 2, 2017 09:09
@codefromthecrypt
Copy link
Member

codefromthecrypt commented Oct 2, 2017 via email

naoman pushed a commit to naoman/zipkin that referenced this pull request Oct 4, 2017
…l_dc has been defined, otherwise use ONE (openzipkin#1753)

Mark all writes as idempotent.
Update the retry policy, honouring idempotence, consistency level, and applying appropriate back-pressure.
abesto pushed a commit to abesto/zipkin that referenced this pull request Sep 10, 2019
…l_dc has been defined, otherwise use ONE (openzipkin#1753)

Mark all writes as idempotent.
Update the retry policy, honouring idempotence, consistency level, and applying appropriate back-pressure.
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.

3 participants