-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HDFS-16845: Adds configuration flag to allow clients to use router observer reads without using the ObserverReadProxyProvider. #5142
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 I did a quick review. The change looks good to me. I am curious about that what scenarios will use this feature without |
Thanks for the quick review @ZanderXu . Third party readers issuing multiple reads will use msync if they want consistency, both before and after this path. The msync this flag eliminates is the one at the initialization of the ObserverReadProxyProvider here Taking an example of a client just doing a list status. If the client is using ObserverReadProxyProvider. They'll be two calls.
With this patch, they'll only be one call.
For future reads after this, there is no difference. These will go to the observer. |
Mostly mechanical review, with some questions. |
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.
Mostly mechanical review, some questions.
...bf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestObserverWithRouter.java
Show resolved
Hide resolved
...s-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/NameNodeProxiesClient.java
Outdated
Show resolved
Hide resolved
668d5d2
to
95d23f0
Compare
💔 -1 overall
This message was automatically generated. |
...s-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/NameNodeProxiesClient.java
Outdated
Show resolved
Hide resolved
dbea3da
to
4eda670
Compare
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
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.
+1 LGTM
💔 -1 overall
This message was automatically generated. |
1a6ee21
to
994ab62
Compare
💔 -1 overall
This message was automatically generated. |
…server reads without using the ObserverReadProxyProvider.
994ab62
to
4d19c51
Compare
💔 -1 overall
This message was automatically generated. |
…server reads without using the ObserverReadProxyProvider. (apache#5142)
…server reads without using the ObserverReadProxyProvider. (apache#5142)
…server reads without using the ObserverReadProxyProvider. (apache#5142) (Cherry-picked from 909aeca)
…server reads without using the ObserverReadProxyProvider. (apache#5142)
HDFS-16845: Adds configuration flag to allow clients to use router observer reads without using the ObserverReadProxyProvider.
Description of PR
Description
In order for clients to have routers forward their reads to observers, the clients must use a proxy with an alignment context. This is currently achieved by using the ObserverReadProxyProvider.
Using ObserverReadProxyProvider allows backward compatible for client configurations.
However, the ObserverReadProxyProvider forces an msync on initialization which is not required with routers.
Performing msync calls is more expensive with routers because the router fans out the cal to all namespaces, so we'd like to avoid this when possible since the router will proxy the initial client call without federatedstate to the Active.
How was this patch tested?
New test cases in TestObserverWithRouter.
For code changes: