-
Notifications
You must be signed in to change notification settings - Fork 594
HDDS-11667. Validating DatanodeID on any request to the datanode #7418
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
Changes from 10 commits
42b036f
e111735
fcd8c5e
1d85c17
fae0234
989d564
844b407
aa760ce
d3094fa
2f9b611
13e000d
ae49c6c
2f8efa3
028a3ed
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -330,7 +330,8 @@ public List<DatanodeDetails> getNodesInOrder() { | |
| } | ||
|
|
||
| void reportDatanode(DatanodeDetails dn) throws IOException { | ||
| if (nodeStatus.get(dn) == null) { | ||
| if (dn == null || (nodeStatus.get(dn) == null | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Which case is this validation expected to catch?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the case where a DN has gone down and has come back up with a different dnId. In such a case the DN could still be a part of an existing pipeline. The registeration of this dn on SCM should not fail since it is the same node. This is a very dumb way to work around https://issues.apache.org/jira/browse/HDDS-11670. Eventually these pipeline would get closed once the datanode proposes to close the existing pipeline on the next in-flight write or SCM will close it automatically marking the older datanodeId as dead and closing all the pipelines which contains the node with the old datanode id. |
||
| && nodeStatus.keySet().stream().noneMatch(node -> node.validateNodeValue(dn)))) { | ||
| throw new IOException( | ||
| String.format("Datanode=%s not part of pipeline=%s", dn, id)); | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.