Skip to content

HBASE-20902 when WAL sync failed, we should bypass the failed DN that previously used - #205

Closed
chenxu14 wants to merge 7 commits into
apache:masterfrom
chenxu14:HBASE-20902
Closed

HBASE-20902 when WAL sync failed, we should bypass the failed DN that previously used#205
chenxu14 wants to merge 7 commits into
apache:masterfrom
chenxu14:HBASE-20902

Conversation

@chenxu14

Copy link
Copy Markdown
Contributor

during Log rolling, we should bypass the slow DN that the previously Log used.

@chenxu14chenxu14 changed the title when WAL sync failed, we should bypass the failed DN that previously usedHBASE-20902 when WAL sync failed, we should bypass the failed DN that previously usedApr 30, 2019
}
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 :");

Copy link
Copy Markdown

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) {

Copy link
Copy Markdown

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(";");

Copy link
Copy Markdown

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(";");
}

Copy link
Copy Markdown

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());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespace:tabs in line

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
0reexec23Docker mode activated.
_ Prechecks _
+1hbaseanti0Patch does not have any anti-patterns.
+1@author0The patch does not contain any @author tags.
+1test4tests0The patch appears to include 23 new or modified test files.
_ master Compile Tests _
0mvndep26Maven dependency ordering for branch
+1mvninstall240master passed
+1compile83master passed
+1checkstyle92master passed
+1shadedjars265branch has no errors when building our shaded downstream artifacts.
+1findbugs264master passed
+1javadoc64master passed
_ Patch Compile Tests _
0mvndep16Maven dependency ordering for patch
+1mvninstall234the patch passed
+1compile86the patch passed
+1javac86the patch passed
-1checkstyle71hbase-server: The patch generated 14 new + 157 unchanged - 0 fixed = 171 total (was 157)
-1whitespace0The patch 5 line(s) with tabs.
+1shadedjars257patch has no errors when building our shaded downstream artifacts.
+1hadoopcheck509Patch does not cause any errors with Hadoop 2.7.4 or 3.0.0.
+1findbugs279the patch passed
+1javadoc63the patch passed
_ Other Tests _
+1unit27hbase-hadoop-compat in the patch passed.
+1unit36hbase-hadoop2-compat in the patch passed.
-1unit8582hbase-server in the patch failed.
+1asflicense62The patch does not generate ASF License warnings.
11424
ReasonTests
Failed junit testshadoop.hbase.replication.TestSerialSyncReplication
hadoop.hbase.replication.TestSyncReplicationMoreLogsInLocalCopyToRemote
hadoop.hbase.TestFullLogReconstruction
hadoop.hbase.replication.TestSyncReplicationActive
SubsystemReport/Notes
DockerClient=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-205/1/artifact/out/Dockerfile
GITHUB PR#205
Optional Testsdupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux 1b4b38d5e6a3 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 GNU/Linux
Build toolmaven
Personality/testptch/patchprocess/precommit/personality/provided.sh
git revisionmaster / 3f40df8
mavenversion: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java1.8.0_181
findbugsv3.1.11
checkstylehttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-205/1/artifact/out/diff-checkstyle-hbase-server.txt
whitespacehttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-205/1/artifact/out/whitespace-tabs.txt
unithttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-205/1/artifact/out/patch-unit-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-205/1/testReport/
Max. process+thread count4812 (vs. ulimit of 10000)
modulesC: hbase-hadoop-compat hbase-hadoop2-compat hbase-server U: .
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-205/1/console
Powered byApache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@Apache9

Copy link
Copy Markdown
Contributor

Mind explaining the implementation a bit? The patch is so big, and across lots of files, not easy to follow up...

@chenxu14

Copy link
Copy Markdown
ContributorAuthor

Mind explaining the implementation a bit? The patch is so big, and across lots of files, not easy to follow up...

  1. modified WALActionsListener#logRollRequested(boolean tooFewReplicas, boolean syncFailed)
    add syncFailed param to identify whether logRoll request was caused by a sync failure,
    If so, LogRoller thread will call WAL#rollWriter(boolean force, boolean syncFailed), and pass syncFailed param to it

  2. modified WAL#rollWriter(boolean force, boolean syncFailed) throws FailedLogCloseException, IOException;
    If syncFailed is true, pass current WAL’s path to AbstractFSWAL#createWriterInstance(newPath, oldPath) as oldPath,
    so FanOutOneBlockAsyncDFSOutputHelper can determine which DN is slow based on the oldPath, and add it to excludesNodes

@carp84carp84 left a comment

Copy link
Copy Markdown
Member

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);

Copy link
Copy Markdown
Member

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?

@chenxu14chenxu14May 10, 2019

Copy link
Copy Markdown
ContributorAuthor

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)

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
0reexec0Docker mode activated.
-1patch7#205 does not apply to master. Rebase required? Wrong Branch? See https://yetus.apache.org/documentation/in-progress/precommit-patchnames for help.
SubsystemReport/Notes
GITHUB PR#205
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-205/3/console
Powered byApache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
0reexec0Docker mode activated.
-1patch6#205 does not apply to master. Rebase required? Wrong Branch? See https://yetus.apache.org/documentation/in-progress/precommit-patchnames for help.
SubsystemReport/Notes
GITHUB PR#205
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-205/4/console
Powered byApache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@saintstack

Copy link
Copy Markdown
Contributor

Any updates @chenxu14 ? Thanks.

@Apache9

Copy link
Copy Markdown
Contributor

Close since the PR is stale. Feel free to reopen.

@Apache9Apache9 closed this Jul 23, 2019
ndimiduk pushed a commit to ndimiduk/hbase that referenced this pull request Oct 14, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@chenxu14@Apache-HBase@Apache9@saintstack@carp84