-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HDFS-17321. RBF: Add RouterAutoMsyncService for auto msync in Router #6404
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
Conversation
|
🎊 +1 overall
This message was automatically generated. |
|
@simbadzina Can you help review this PR? Thank you very much! I see that |
|
|
||
| @Test | ||
| public void testMsync() throws InterruptedException, IOException { | ||
| Thread.sleep(msyncInterval); |
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.
In unit tests, we'd better not use sleep.
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.
Changed with GenericTestUtils . Thanks.
|
@LiuGuH can you expand more on the following
I see how multiple concurrent calls can read the same Additionally, the periodic redirection of calls to the active only happens in the case when there are no calls going to the active already so having some reads be sent to the active should not overload it. |
Yes, it can. But for only a single read is send to the active, we should add synchronized. And this maybe have performance impact. Add a seperate RouterAutoMsyncService maybe a way to slove it.
In most cases, that's true. But I think add RouterAutoMsyncService will be more robustness. Thanks |
That is fair. I'll take a closer look at the implementation now that we've discussed the higher level details. Please also address the unit test comment by @slfan1989 |
|
🎊 +1 overall
This message was automatically generated. |
|
@simbadzina Thanks for helping review the code! @LiuGuH Thanks for the contribution! but I think it's better if we don't introduce a new one if the original one works. Personally, I'm worried about the synchronization state of a single thread, it doesn't seem to be a good design. If some boundaries occur (such as NN restart, hang, etc.), how do we deal with it? If we are going to design a more complex mechanism to handle boundary issues, I think it is better to use the mechanisms that are already available. |
|
🎊 +1 overall
This message was automatically generated. |
|
We're closing this stale PR because it has been open for 100 days with no activity. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable. |
Description of PR
Router should have the ability to to auto msync to a nameservice. And it can ensure router periodically refreshes its record of a namespace's state.
Different from HDFS-17027, this is controled by router itself without configuring with AbstractNNFailoverProxyProvider.
And HDFS-16890 maybe lead to many read requests into active NN at the same time.
This PR provides a new way to implememts auto msync in Router.