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

[#82] Update PeerMetadataHandler to support new cluster name query #83

Merged
merged 2 commits into from
Sep 23, 2019

Conversation

adutra
Copy link
Contributor

@adutra adutra commented Sep 23, 2019

The change below:

apache/cassandra-java-driver@85f2ced#diff-8dd2643235bd91722e75bdd299d4ca8c

Was released in drivers OSS 3.7.2 and DSE 1.8.2. We need to update
PeerMetadataHandler accordingly.

The change below:

apache/cassandra-java-driver@85f2ced#diff-8dd2643235bd91722e75bdd299d4ca8c

Was released in drivers OSS 3.7.2 and DSE 1.8.2. We need to update
`PeerMetadataHandler` accordingly.
@adutra adutra added this to the 0.8.10 milestone Sep 23, 2019
Copy link

@mikefero mikefero left a comment

Choose a reason for hiding this comment

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

+1;

Small nit, but feel free to ignore.

private static final String queryClusterName = "select cluster_name from system.local";
private static final Pattern queryClusterName =
Pattern.compile(
"select cluster_name from system.local( where key='local')?", Pattern.CASE_INSENSITIVE);

Choose a reason for hiding this comment

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

nit: select cluster_name from system.local( where key='local')? => SELECT cluster_name FROM system.local( WHERE key='local')?

Just going for consistency with other CQL patterns (even though it looks like this one slipped through before).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The queries here try to stick as close as possible to what the DS Java driver actually sends, and indeed, oddly enough, the driver usually sends SELECT but for the cluster name, it's select. But I agree with you, now that I turned the patterns case-insensitive we can safely harmonize everything and use SELECT consistently.

@adutra adutra merged commit f7a538a into master Sep 23, 2019
@adutra adutra deleted the issue82 branch September 23, 2019 20:15
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.

2 participants