Skip to content

HBASE-22404 Open/Close region request may be executed twice when mast… - #234

Merged
infraio merged 1 commit into
apache:masterfrom
infraio:only-once-open-close
May 16, 2019
Merged

HBASE-22404 Open/Close region request may be executed twice when mast…#234
infraio merged 1 commit into
apache:masterfrom
infraio:only-once-open-close

Conversation

@infraio

Copy link
Copy Markdown
Contributor

…er restart

.expireAfterAccess(scannerLeaseTimeoutPeriod, TimeUnit.MILLISECONDS).build();
sumbittedOpenProcedures =
CacheBuilder.newBuilder().expireAfterAccess(600, TimeUnit.SECONDS).build();
sumbittedCloseProcedures =

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this enough? What if the master crashed for an hour and then restart...

@infraio
infraioforce-pushed the only-once-open-close branch 3 times, most recently from dafd0c1 to 037e081CompareMay 13, 2019 10:42
@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
0reexec0Docker mode activated.
-1docker144Docker failed to build yetus/hbase:b002b0b.
SubsystemReport/Notes
GITHUB PR#234
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/4/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
0reexec29Docker mode activated.
_ Prechecks _
+1hbaseanti0Patch does not have any anti-patterns.
+1@author0The patch does not contain any @author tags.
-0test4tests0The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1mvninstall246master passed
+1compile52master passed
+1checkstyle69master passed
+1shadedjars263branch has no errors when building our shaded downstream artifacts.
+1findbugs190master passed
+1javadoc33master passed
_ Patch Compile Tests _
+1mvninstall240the patch passed
+1compile50the patch passed
+1javac50the patch passed
+1checkstyle68the patch passed
+1whitespace0The patch has no whitespace issues.
+1shadedjars260patch has no errors when building our shaded downstream artifacts.
+1hadoopcheck483Patch does not cause any errors with Hadoop 2.7.4 or 3.0.0.
+1findbugs195the patch passed
+1javadoc34the patch passed
_ Other Tests _
-1unit8545hbase-server in the patch failed.
+1asflicense21The patch does not generate ASF License warnings.
10855
ReasonTests
Failed junit testshadoop.hbase.master.locking.TestLockManager
hadoop.hbase.snapshot.TestMobRestoreFlushSnapshotFromClient
hadoop.hbase.TestHBaseTestingUtility
SubsystemReport/Notes
DockerClient=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/1/artifact/out/Dockerfile
GITHUB PR#234
Optional Testsdupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux bea165b3a4db 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 / 62ad94c
mavenversion: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java1.8.0_181
findbugsv3.1.11
unithttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/1/artifact/out/patch-unit-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/1/testReport/
Max. process+thread count4951 (vs. ulimit of 10000)
modulesC: hbase-server U: hbase-server
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/1/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
0reexec16Docker mode activated.
_ Prechecks _
+1hbaseanti0Patch does not have any anti-patterns.
+1@author0The patch does not contain any @author tags.
+1test4tests0The patch appears to include 2 new or modified test files.
_ master Compile Tests _
+1mvninstall262master passed
+1compile54master passed
+1checkstyle78master passed
+1shadedjars267branch has no errors when building our shaded downstream artifacts.
+1findbugs223master passed
+1javadoc33master passed
_ Patch Compile Tests _
+1mvninstall249the patch passed
+1compile53the patch passed
+1javac53the patch passed
-1checkstyle77hbase-server: The patch generated 3 new + 148 unchanged - 0 fixed = 151 total (was 148)
+1whitespace0The patch has no whitespace issues.
+1shadedjars264patch has no errors when building our shaded downstream artifacts.
+1hadoopcheck510Patch does not cause any errors with Hadoop 2.7.4 or 3.0.0.
+1findbugs225the patch passed
+1javadoc33the patch passed
_ Other Tests _
+1unit9213hbase-server in the patch passed.
+1asflicense28The patch does not generate ASF License warnings.
11666
SubsystemReport/Notes
DockerClient=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/2/artifact/out/Dockerfile
GITHUB PR#234
Optional Testsdupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux e018170f91e1 4.4.0-143-generic #169~14.04.2-Ubuntu SMP Wed Feb 13 15:00:41 UTC 2019 x86_64 GNU/Linux
Build toolmaven
Personality/testptch/patchprocess/precommit/personality/provided.sh
git revisionmaster / 62ad94c
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-234/2/artifact/out/diff-checkstyle-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/2/testReport/
Max. process+thread count4629 (vs. ulimit of 10000)
modulesC: hbase-server U: hbase-server
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/2/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
0reexec30Docker mode activated.
_ Prechecks _
+1hbaseanti0Patch does not have any anti-patterns.
+1@author0The patch does not contain any @author tags.
+1test4tests0The patch appears to include 2 new or modified test files.
_ master Compile Tests _
+1mvninstall246master passed
+1compile53master passed
+1checkstyle70master passed
+1shadedjars259branch has no errors when building our shaded downstream artifacts.
+1findbugs216master passed
+1javadoc33master passed
_ Patch Compile Tests _
+1mvninstall235the patch passed
+1compile54the patch passed
+1javac54the patch passed
-1checkstyle72hbase-server: The patch generated 9 new + 148 unchanged - 0 fixed = 157 total (was 148)
+1whitespace0The patch has no whitespace issues.
+1shadedjars263patch has no errors when building our shaded downstream artifacts.
+1hadoopcheck485Patch does not cause any errors with Hadoop 2.7.4 or 3.0.0.
+1findbugs202the patch passed
+1javadoc32the patch passed
_ Other Tests _
+1unit8467hbase-server in the patch passed.
+1asflicense27The patch does not generate ASF License warnings.
10825
SubsystemReport/Notes
DockerClient=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/3/artifact/out/Dockerfile
GITHUB PR#234
Optional Testsdupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux 64f3db9017b4 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 / 62ad94c
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-234/3/artifact/out/diff-checkstyle-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/3/testReport/
Max. process+thread count4850 (vs. ulimit of 10000)
modulesC: hbase-server U: hbase-server
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/3/console
Powered byApache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@infraio
infraioforce-pushed the only-once-open-close branch 3 times, most recently from b96bb38 to d435f7fCompareMay 14, 2019 00:46
@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
0reexec68Docker mode activated.
_ Prechecks _
+1hbaseanti0Patch does not have any anti-patterns.
+1@author0The patch does not contain any @author tags.
-0test4tests0The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1mvninstall253master passed
+1compile50master passed
+1checkstyle69master passed
+1shadedjars258branch has no errors when building our shaded downstream artifacts.
+1findbugs223master passed
+1javadoc30master passed
_ Patch Compile Tests _
+1mvninstall235the patch passed
+1compile51the patch passed
+1javac51the patch passed
+1checkstyle66the patch passed
+1whitespace0The patch has no whitespace issues.
+1shadedjars257patch has no errors when building our shaded downstream artifacts.
+1hadoopcheck490Patch does not cause any errors with Hadoop 2.7.4 or 3.0.0.
+1findbugs196the patch passed
+1javadoc31the patch passed
_ Other Tests _
-1unit8256hbase-server in the patch failed.
+1asflicense24The patch does not generate ASF License warnings.
10592
ReasonTests
Failed junit testshadoop.hbase.replication.regionserver.TestRegionReplicaReplicationEndpoint
SubsystemReport/Notes
DockerClient=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/7/artifact/out/Dockerfile
GITHUB PR#234
Optional Testsdupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux 06ca80c74220 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 / 0b8493f
mavenversion: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java1.8.0_181
findbugsv3.1.11
unithttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/7/artifact/out/patch-unit-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/7/testReport/
Max. process+thread count5111 (vs. ulimit of 10000)
modulesC: hbase-server U: hbase-server
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/7/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
0reexec167Docker mode activated.
_ Prechecks _
+1hbaseanti0Patch does not have any anti-patterns.
+1@author0The patch does not contain any @author tags.
-0test4tests0The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1mvninstall289master passed
+1compile54master passed
+1checkstyle72master passed
+1shadedjars266branch has no errors when building our shaded downstream artifacts.
+1findbugs177master passed
+1javadoc34master passed
_ Patch Compile Tests _
+1mvninstall255the patch passed
+1compile53the patch passed
+1javac53the patch passed
+1checkstyle72the patch passed
+1whitespace0The patch has no whitespace issues.
+1shadedjars255patch has no errors when building our shaded downstream artifacts.
+1hadoopcheck540Patch does not cause any errors with Hadoop 2.7.4 or 3.0.0.
+1findbugs200the patch passed
+1javadoc32the patch passed
_ Other Tests _
-1unit16127hbase-server in the patch failed.
+1asflicense32The patch does not generate ASF License warnings.
18698
ReasonTests
Failed junit testshadoop.hbase.client.TestFromClientSideWithCoprocessor
hadoop.hbase.master.TestAssignmentManagerMetrics
hadoop.hbase.master.TestSplitWALManager
hadoop.hbase.master.procedure.TestSCPWithReplicas
hadoop.hbase.replication.multiwal.TestReplicationSyncUpToolWithMultipleAsyncWAL
hadoop.hbase.replication.TestReplicationSmallTests
hadoop.hbase.master.procedure.TestSCPWithReplicasWithoutZKCoordinated
hadoop.hbase.client.TestAdmin1
SubsystemReport/Notes
DockerClient=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/6/artifact/out/Dockerfile
GITHUB PR#234
Optional Testsdupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux 18c1fdf783f1 4.4.0-137-generic #163-Ubuntu SMP Mon Sep 24 13:14:43 UTC 2018 x86_64 GNU/Linux
Build toolmaven
Personality/testptch/patchprocess/precommit/personality/provided.sh
git revisionmaster / 0b8493f
mavenversion: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java1.8.0_181
findbugsv3.1.11
unithttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/6/artifact/out/patch-unit-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/6/testReport/
Max. process+thread count5140 (vs. ulimit of 10000)
modulesC: hbase-server U: hbase-server
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/6/console
Powered byApache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

*
* After the open/close region request executed and report region transition succeed, cache it in
* executed region procedures cache. See {@link #finishRegionProcedure(long)}. And the cache will
* expire after 600 seconds. Because the duplicate open/close region request should not be delayed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

'Because the duplicated open/close region request is not likely to be delayed...'

And maybe we should also do something at master side? When reportRegionStateTransition succeeded, let's also remove the pending operations in RSProcedureDispatcher if possible? Or maybe add some checks in splitAndResolveOperation, if a RemoteProcedure has already been marked as succeeded, just give up and do not schedule it again. Otherwise we may still got duplicate requests if RSProcedureDispatcher keep retrying more than 10 minutes? Not likely but theoretically it is possible...

@infraio
infraioforce-pushed the only-once-open-close branch from d435f7f to e62519eCompareMay 15, 2019 01:30

@Apache9Apache9 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No big concerns. Just need to add more comments.

public interface RemoteProcedure<TEnv, TRemote> {
/**
* For building the remote operation.
* May be empty if no need to send remote call.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please append this 'Usually, this means the RemoteProcedure has been finished already. This is possible, as we may have already sent the procedure to RS but then the rpc connection is broken so the executeProcedures call fails, but the RS does receive the procedure and execute it and then report back, before we retry again.'


@Override
public RemoteProcedureDispatcher.RemoteOperation remoteCallBuild(MasterProcedureEnv env,
public Optional<RemoteProcedureDispatcher.RemoteOperation> remoteCallBuild(MasterProcedureEnv env,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think for these procedures we should also test whether the procedure has already been finished. Anyway, should be another issue.

@infraio
infraioforce-pushed the only-once-open-close branch from e62519e to 36c4fd2CompareMay 15, 2019 10:07
@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
0reexec55Docker mode activated.
_ Prechecks _
+1hbaseanti0Patch does not have any anti-patterns.
+1@author0The patch does not contain any @author tags.
+1test4tests0The patch appears to include 1 new or modified test files.
_ master Compile Tests _
0mvndep21Maven dependency ordering for branch
+1mvninstall322master passed
+1compile79master passed
+1checkstyle90master passed
+1shadedjars301branch has no errors when building our shaded downstream artifacts.
+1findbugs258master passed
+1javadoc49master passed
_ Patch Compile Tests _
0mvndep14Maven dependency ordering for patch
+1mvninstall258the patch passed
+1compile80the patch passed
+1javac80the patch passed
-1checkstyle68hbase-server: The patch generated 1 new + 136 unchanged - 0 fixed = 137 total (was 136)
+1whitespace0The patch has no whitespace issues.
+1shadedjars286patch has no errors when building our shaded downstream artifacts.
+1hadoopcheck783Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.0.0.
+1findbugs224the patch passed
+1javadoc51the patch passed
_ Other Tests _
+1unit214hbase-procedure in the patch passed.
+1unit9052hbase-server in the patch passed.
+1asflicense43The patch does not generate ASF License warnings.
12321
SubsystemReport/Notes
DockerClient=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/9/artifact/out/Dockerfile
GITHUB PR#234
Optional Testsdupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux f97bbb52a214 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 / fab2e15
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-234/9/artifact/out/diff-checkstyle-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/9/testReport/
Max. process+thread count5115 (vs. ulimit of 10000)
modulesC: hbase-procedure hbase-server U: .
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/9/console
Powered byApache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@infraio
infraioforce-pushed the only-once-open-close branch from 36c4fd2 to fc75239CompareMay 16, 2019 00:09
@infraio
infraio merged commit bdd2fc6 into apache:masterMay 16, 2019
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.

3 participants

@infraio@Apache-HBase@Apache9