-
Couldn't load subscription status.
- Fork 3.4k
HBASE-20902 when WAL sync failed, we should bypass the failed DN that previously used #205
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
sync master branch
| } | ||
| if (LOG.isDebugEnabled()) { | ||
| StringBuilder sb = new StringBuilder("create new output because old wal sync failed, old path is: "); | ||
| sb.append(oldPathStr).append(", newPath excludesNodes are :"); |
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.
whitespace:tabs in line
| if (LOG.isDebugEnabled()) { | ||
| StringBuilder sb = new StringBuilder("create new output because old wal sync failed, old path is: "); | ||
| sb.append(oldPathStr).append(", newPath excludesNodes are :"); | ||
| for(DatanodeInfo info : excludesNodes) { |
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.
whitespace:tabs in line
| StringBuilder sb = new StringBuilder("create new output because old wal sync failed, old path is: "); | ||
| sb.append(oldPathStr).append(", newPath excludesNodes are :"); | ||
| for(DatanodeInfo info : excludesNodes) { | ||
| sb.append(info.getInfoAddr()).append(";"); |
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.
whitespace:tabs in line
| sb.append(oldPathStr).append(", newPath excludesNodes are :"); | ||
| for(DatanodeInfo info : excludesNodes) { | ||
| sb.append(info.getInfoAddr()).append(";"); | ||
| } |
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.
whitespace:tabs in line
| for(DatanodeInfo info : excludesNodes) { | ||
| sb.append(info.getInfoAddr()).append(";"); | ||
| } | ||
| LOG.debug(sb.toString()); |
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.
whitespace:tabs in line
|
💔 -1 overall
This message was automatically generated. |
|
Mind explaining the implementation a bit? The patch is so big, and across lots of files, not easy to follow up... |
|
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.
Please also fix the checkstyle warnings reported by @Apache-HBase robot.
| for(LocatedBlock block : namenode.getBlockLocations(oldPathStr, Math.max(0, len - 1), len) | ||
| .getLocatedBlocks()) { | ||
| for(DatanodeInfo dn : block.getLocations()) { | ||
| excludesNodes = ArrayUtils.add(excludesNodes, dn); |
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.
Here it always adding nodes into exclude list but never check and remove even after the DN recovers, right? So it's possible that one day all DN nodes are excluded and the OutputStream will fail due to could only be replicated to 0 nodes?
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.
thank you for your review @carp84, there seems to be some difference opinions with HBASE-22301, i will fix the checkstyle first.
So it's possible that one day all DN nodes are excluded
excludesNodes are not a global variable, each FanOutOneBlockAsyncDFSOutput will use different instance, when new FanOutOneBlockAsyncDFSOutput created, it's Initial excludesNodes will be an empty array(code in FanOutOneBlockAsyncDFSOutputHelper#createOutput)
sync master branch
merge master branch
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
Any updates @chenxu14 ? Thanks. |
|
Close since the PR is stale. Feel free to reopen. |
This reverts commit 70f6120.
during Log rolling, we should bypass the slow DN that the previously Log used.