-
Notifications
You must be signed in to change notification settings - Fork 16
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
Topology refresh changes #8
Conversation
b83ed5d
to
189010b
Compare
189010b
to
cf777b0
Compare
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.
first round
redis/src/cluster_async/mod.rs
Outdated
if idx == topology_vec.len() - 1 { | ||
return Err(e); | ||
} else { | ||
continue; |
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.
so, while we want to use the best view, we're fine with using a view that is held by the minority of nodes?
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.
If it's the last retry AND we still couldn't find a majority, yes, we will be ok by taking a view with full coverage
744ab15
to
fbbb9df
Compare
@nihohit Finished first round |
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.
Fix & Squash
adba2d6
to
24475ae
Compare
@nihohit Ready for review: two last commits, addressing your last comments and added retries. |
Ok(()) | ||
} | ||
} | ||
|
||
// Query a node to discover slot-> master mappings | ||
async fn refresh_slots(inner: Arc<InnerCore<C>>, curr_retry: usize) -> RedisResult<()> { |
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.
sadly, the diff isn't there. Did something change in the logic here?
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.
nope, only changed it to get curr_retry: usize instead of AtomicUsize
6c63afa
to
6384fcd
Compare
@nihohit round |
1bf7465
to
2f71bcd
Compare
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.
minor comments
2f71bcd
to
45db032
Compare
45db032
to
48cf685
Compare
Changed refresh_slots to run with retries and query multiple nodes and return the most frequent topology.