-
Notifications
You must be signed in to change notification settings - Fork 15
Fix Ec2HostLocationSupplier using a different format to Cassandra #4283
Conversation
Generate changelog in
|
|
||
return HostLocation.of(ec2region, ec2zone); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: We don't normally leave whitespace after the return statement
// possible, as the strings are later matched exactly. | ||
|
||
String ec2region; | ||
String ec2zone; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-actionable: This is fine and I guess copied from original, though we normally prefer to declare the variables as they occur
changelog/@unreleased/pr-4283.v2.yml
Outdated
Added a test to make sure that the parsing gives the expected result | ||
|
||
**Priority (whenever / two weeks / yesterday)**: | ||
Today |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably don't want to include all of this in the changelog. Most of the time, something along the lines of the initial message (i.e. "Ec2HostLocationSupplier now users a format consistent with Cassandra's Ec2Snitch") is sufficient.
Agree this is a fix - though for fixes it's usually good to say what the broken behaviour was, and what impact that might have had on users on the version without the fix (i.e. "Ec2HostLocationSupplier
may have produced results inconsistent with Cassandra's Ec2Snitch
, meaning that our feature to send more traffic to local nodes wouldn't work properly" or something like that).
…sdb into fixEC2HostLocationSupplier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Released 0.158.4 |
Goals (and why):
Modify Ec2HostLocationSupplier to emulate Cassandra's Ec2Snitch logic (as it is later comparing against parsed info from that class).
Implementation Description (bullets):
The response string from the AWS endpoint is now parsed using code copied from Cassandra's implementation (or as close as possible)
Testing (What was existing testing like? What have you done to improve it?):
Added a test to make sure that the parsing gives the expected result
Priority (whenever / two weeks / yesterday):
Today