-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HDFS-16684. Exclude the current JournalNode #4723
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
Exclude bound local addresses, including the use of a wildcard address in the bound host configurations.
|
🎊 +1 overall
This message was automatically generated. |
saintstack
left a comment
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.
LGTM... .would be good to clean up minor items in below if you can.
...ject/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/JournalNodeSyncer.java
Outdated
Show resolved
Hide resolved
| } | ||
| if (otherJNProxies.isEmpty()) { | ||
| // Check if any of there are any resolvable JournalNodes before starting the sync. | ||
| if (otherJNProxies.stream().filter(jnp -> !jnp.jnAddr.isUnresolved()).count() == 0) { |
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.
We are waiting on them to resolve? If resolve fails, we make no progress ... This is better (and aligns w/ other checks done above in this method returning false...)
...ject/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/JournalNodeSyncer.java
Show resolved
Hide resolved
...ject/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/JournalNodeSyncer.java
Outdated
Show resolved
Hide resolved
...ct/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/server/TestJournalNodeSync.java
Show resolved
Hide resolved
...ct/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/server/TestJournalNodeSync.java
Show resolved
Hide resolved
Update the comments.
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
@saintstack The changes were made in response to your questions, so I wouldn't classify them as draft. You also indirectly identified a scenario where the startup sequence was delayed unnecessarily, so I've gone ahead an incorporated the update. Let me know if you have any further questions. |
Exclude bound local addresses, including the use of a wildcard address in the bound host configurations. * Allow sync attempts with unresolved addresses * Update the comments. * Remove unused import Signed-off-by: stack <[email protected]>
Exclude bound local addresses, including the use of a wildcard address in the bound host configurations. * Allow sync attempts with unresolved addresses * Update the comments. * Remove unused import Signed-off-by: stack <[email protected]>
Description of PR
The JournalNodeSyncer will include the local instance in syncing when using a bind host (e.g. 0.0.0.0). There is a mechanism that is supposed to exclude the local instance, but it doesn't recognize the meta-address as a local address.
Running with bind addresses set to 0.0.0.0, the JournalNodeSyncer will log attempts to sync with itself as part of the normal syncing rotation. For an HA configuration running 3 JournalNodes, the "other" list used by the JournalNodeSyncer will include 3 proxies.
Exclude bound local addresses, including the use of a wildcard address in the bound host configurations.
How was this patch tested?
An additional unit tests was added to verify the call getJournalAddrList dropped the current instance.
Integration tests were conducted in HA configuration in Kubernetes, running Java 11. After the patch, all JournalNodes stopped attempting to sync with themselves.
For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?