-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
pool_dynamics_test.go
Outdated
// no more than 5 cids from the cid list of 20 should get re-routed (25%) | ||
assert.LessOrEqual(t, rerouteCount, 4) |
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.
should this be 5, rather than 4?
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.
Done.
if n.URL == nodes[0].URL { | ||
rerouteCount++ | ||
} |
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.
should 'reroute' be incremented when this doesn't match?
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.
I believe reroute is meant to keep track of how often caboose returns a new joining node as the candidate node to fetch a cid in which case caboose is "rerouting" where it fetches that cid from. In that case, the increment here is good imo.
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.
Yeah what Amean said.
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.
We're iterating over bad nodes here.
Hey @aarshkshah1992 I think we should change notation of "bad" and "good" nodes in the affinity tests to maybe just "baseNodes" and "newNodes". I know I started with that notation in the test but I think its better to change it to make the test a bit more clear. |
@AmeanAsad Done. |
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!
Supersedes #162.