Don't update node ip when peer ip is unreachable#10696
Don't update node ip when peer ip is unreachable#10696madolson merged 3 commits intoredis:unstablefrom
Conversation
bjosv
left a comment
There was a problem hiding this comment.
It would be nice if we had a testcase to trigger this. Current testcases seem all have a valid ip.
|
Just as a thought, I think the reviewers in the core team would appreciate some details in the PR description above. |
|
@bjosv thanks a lot for your suggestions! I will deal them one by one.
I will try to make up a testcase for it, feeling it's not easy thouth... |
|
I left a comment on the issue explaining the root cause. In order to reproduce the issue you could try to write a test that does the following:
|
|
@pieturin Yeah I read the comment you left on the issue, the analysis is pretty reasonable. I tried to reproduce this problem by |
madolson
left a comment
There was a problem hiding this comment.
If there isn't a good way to test this change, I'm okay merging it as is.
A little late to get back. It's somewhat hard to simulate the situation... since it need something blocking the process quite a long time exactly just before handling the PING message. But at least it won't have negative effect, if the inference by pieturin is correct, it should solve it in theory.
Yep, as for result it's not a problem as it's being handled gracefully, a NOTICE to log the event is just sufficient. |
|
https://github.com/redis/redis/actions/runs/2708342317 running some tests before merging. |
(cherry picked from commit d00b8af)
As discussed in #9351, @bjosv mentioned that the cluster node IP may be updated to
?whengetpeername()fails due to some reasons like the fd is invalid somehow, and the log looks like:To solve this issue, the patch primarily do 2 things:
nodeUpdateAddressIfNeeded. It won't affect the normal IP update process as it will be retried the next round of PING.getpeername(), for further debug and so on