Repository navigation
[2.4pick][core] Improve the workflow finding Redis leader. (#34108) - #34183
Conversation
|
are the failing tests just flakey? |
The current way of finding Redis leader sometimes giving error information. The main reason is because the ip address is not resolved.
If in the initialization stage, it connect to the master, it'll use passed in address as the leader which later might make Ray pick follower redis.
This PR fixed the issue and also uses the way redis-cli used to pick the leader.
The PR makes the checking more strict to give better error message. New protocol as below:
- use boost to resolve the ip address from domain name.
- connect to the first ip address
- if it's cluster mode,
- make sure it's healthy; make sure only 1 shard
- send a dummy write and check the return
- if return OK, use the ip address directly
- otherwise, use the one mentioned in the error message
- if not cluster mode, just use the ip address
Refactoring is also done in this PR. Moving connection related information to redis context
25ddc43 to
1a4cc32
Compare
|
I think so. maybe just let me rebase to the 2.4.0 |
|
Btw looks like some test failure is related, but since it doesn't on master I'll assume if is flakey, and if not will open a new issue //python/ray/tests:test_redis_tls TIMEOUT in 3 out of 3 in 60.4s | Stats over 3 runs: max = 60.4s, min = 60.4s, avg = 60.4s, dev = 0.0s |
The current way of finding Redis leader sometimes giving error information. The main reason is because the ip address is not resolved.
If in the initialization stage, it connect to the master, it'll use passed in address as the leader which later might make Ray pick follower redis.
This PR fixed the issue and also uses the way redis-cli used to pick the leader.
The PR makes the checking more strict to give better error message. New protocol as below:
Refactoring is also done in this PR. Moving connection related information to redis context
Why are these changes needed?
Related issue number
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/under thecorresponding
.rstfile.