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

Handle new messaging service verbs for dropped reads in Cassandra 4.0 #714

Merged
merged 1 commit into from
Jul 12, 2019

Conversation

michaelsembwever
Copy link
Member

@michaelsembwever michaelsembwever commented Jul 11, 2019

With the messaging service rewrite in Cassandra 4.0 there has been an overhaul (and addition of many) of the VERBs: https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/net/Verb.java

This PR allows the dropped messages integration test step to use either VERB READ or READ_REQ to be compatible with all versions of Cassandra.

@michaelsembwever michaelsembwever changed the base branch from master to 1.4 July 11, 2019 10:06
@michaelsembwever michaelsembwever changed the base branch from 1.4 to master July 11, 2019 10:07
List<DroppedMessages> tpstats = SimpleReaperClient.parseDroppedMessagesJSON(responseData);

long readDroppedTotal = tpstats.stream()
.filter(tpstat -> "READ".equals(tpstat.getName()) || "READ_REQ".equals(tpstat.getName()))
Copy link
Member Author

Choose a reason for hiding this comment

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

this line and line 1606 is the core of the PR

.filter(tpstat -> tpstat.getCount() >= 0)
.count();
long readDroppedCount = tpstats.stream()
.filter(tpstat -> "READ".equals(tpstat.getName()) || "READ_REQ".equals(tpstat.getName()) )
Copy link
Member Author

Choose a reason for hiding this comment

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

this line and line 1602 is the core of the PR

Copy link
Contributor

@adejanovski adejanovski left a comment

Choose a reason for hiding this comment

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

LGTM. Good catch

@michaelsembwever michaelsembwever force-pushed the mck/fix-cassandra-4-new-messaging-verbs branch from cc78760 to dc8096f Compare July 11, 2019 16:59
@michaelsembwever michaelsembwever force-pushed the mck/fix-cassandra-4-new-messaging-verbs branch from dc8096f to f798244 Compare July 12, 2019 07:55
@michaelsembwever michaelsembwever merged commit f798244 into master Jul 12, 2019
@michaelsembwever michaelsembwever temporarily deployed to github-pages July 12, 2019 07:56 Inactive
@michaelsembwever michaelsembwever deleted the mck/fix-cassandra-4-new-messaging-verbs branch July 26, 2019 17:51
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