Skip to content
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

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

Merged
merged 1 commit into from
May 16, 2019

Conversation

infraio
Copy link
Contributor

@infraio infraio commented May 13, 2019

…er restart

@@ -1272,6 +1279,10 @@ public RSRpcServices(HRegionServer rs) throws IOException {

closedScanners = CacheBuilder.newBuilder()
.expireAfterAccess(scannerLeaseTimeoutPeriod, TimeUnit.MILLISECONDS).build();
sumbittedOpenProcedures =
CacheBuilder.newBuilder().expireAfterAccess(600, TimeUnit.SECONDS).build();
sumbittedCloseProcedures =
Copy link
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 infraio force-pushed the only-once-open-close branch 3 times, most recently from dafd0c1 to 037e081 Compare May 13, 2019 10:42
@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 0 Docker mode activated.
-1 docker 144 Docker failed to build yetus/hbase:b002b0b.
Subsystem Report/Notes
GITHUB PR #234
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/4/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 29 Docker mode activated.
_ Prechecks _
+1 hbaseanti 0 Patch does not have any anti-patterns.
+1 @author 0 The patch does not contain any @author tags.
-0 test4tests 0 The 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 _
+1 mvninstall 246 master passed
+1 compile 52 master passed
+1 checkstyle 69 master passed
+1 shadedjars 263 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 190 master passed
+1 javadoc 33 master passed
_ Patch Compile Tests _
+1 mvninstall 240 the patch passed
+1 compile 50 the patch passed
+1 javac 50 the patch passed
+1 checkstyle 68 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 260 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 483 Patch does not cause any errors with Hadoop 2.7.4 or 3.0.0.
+1 findbugs 195 the patch passed
+1 javadoc 34 the patch passed
_ Other Tests _
-1 unit 8545 hbase-server in the patch failed.
+1 asflicense 21 The patch does not generate ASF License warnings.
10855
Reason Tests
Failed junit tests hadoop.hbase.master.locking.TestLockManager
hadoop.hbase.snapshot.TestMobRestoreFlushSnapshotFromClient
hadoop.hbase.TestHBaseTestingUtility
Subsystem Report/Notes
Docker Client=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 Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux bea165b3a4db 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 GNU/Linux
Build tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision master / 62ad94c
maven version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java 1.8.0_181
findbugs v3.1.11
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/1/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/1/testReport/
Max. process+thread count 4951 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/1/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 16 Docker mode activated.
_ Prechecks _
+1 hbaseanti 0 Patch does not have any anti-patterns.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 2 new or modified test files.
_ master Compile Tests _
+1 mvninstall 262 master passed
+1 compile 54 master passed
+1 checkstyle 78 master passed
+1 shadedjars 267 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 223 master passed
+1 javadoc 33 master passed
_ Patch Compile Tests _
+1 mvninstall 249 the patch passed
+1 compile 53 the patch passed
+1 javac 53 the patch passed
-1 checkstyle 77 hbase-server: The patch generated 3 new + 148 unchanged - 0 fixed = 151 total (was 148)
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 264 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 510 Patch does not cause any errors with Hadoop 2.7.4 or 3.0.0.
+1 findbugs 225 the patch passed
+1 javadoc 33 the patch passed
_ Other Tests _
+1 unit 9213 hbase-server in the patch passed.
+1 asflicense 28 The patch does not generate ASF License warnings.
11666
Subsystem Report/Notes
Docker Client=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 Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 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 tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision master / 62ad94c
maven version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java 1.8.0_181
findbugs v3.1.11
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/2/artifact/out/diff-checkstyle-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/2/testReport/
Max. process+thread count 4629 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/2/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 30 Docker mode activated.
_ Prechecks _
+1 hbaseanti 0 Patch does not have any anti-patterns.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 2 new or modified test files.
_ master Compile Tests _
+1 mvninstall 246 master passed
+1 compile 53 master passed
+1 checkstyle 70 master passed
+1 shadedjars 259 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 216 master passed
+1 javadoc 33 master passed
_ Patch Compile Tests _
+1 mvninstall 235 the patch passed
+1 compile 54 the patch passed
+1 javac 54 the patch passed
-1 checkstyle 72 hbase-server: The patch generated 9 new + 148 unchanged - 0 fixed = 157 total (was 148)
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 263 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 485 Patch does not cause any errors with Hadoop 2.7.4 or 3.0.0.
+1 findbugs 202 the patch passed
+1 javadoc 32 the patch passed
_ Other Tests _
+1 unit 8467 hbase-server in the patch passed.
+1 asflicense 27 The patch does not generate ASF License warnings.
10825
Subsystem Report/Notes
Docker Client=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 Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 64f3db9017b4 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 GNU/Linux
Build tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision master / 62ad94c
maven version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java 1.8.0_181
findbugs v3.1.11
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/3/artifact/out/diff-checkstyle-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/3/testReport/
Max. process+thread count 4850 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/3/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@infraio infraio force-pushed the only-once-open-close branch 3 times, most recently from b96bb38 to d435f7f Compare May 14, 2019 00:46
@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 68 Docker mode activated.
_ Prechecks _
+1 hbaseanti 0 Patch does not have any anti-patterns.
+1 @author 0 The patch does not contain any @author tags.
-0 test4tests 0 The 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 _
+1 mvninstall 253 master passed
+1 compile 50 master passed
+1 checkstyle 69 master passed
+1 shadedjars 258 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 223 master passed
+1 javadoc 30 master passed
_ Patch Compile Tests _
+1 mvninstall 235 the patch passed
+1 compile 51 the patch passed
+1 javac 51 the patch passed
+1 checkstyle 66 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 257 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 490 Patch does not cause any errors with Hadoop 2.7.4 or 3.0.0.
+1 findbugs 196 the patch passed
+1 javadoc 31 the patch passed
_ Other Tests _
-1 unit 8256 hbase-server in the patch failed.
+1 asflicense 24 The patch does not generate ASF License warnings.
10592
Reason Tests
Failed junit tests hadoop.hbase.replication.regionserver.TestRegionReplicaReplicationEndpoint
Subsystem Report/Notes
Docker Client=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 Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 06ca80c74220 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 GNU/Linux
Build tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision master / 0b8493f
maven version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java 1.8.0_181
findbugs v3.1.11
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/7/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/7/testReport/
Max. process+thread count 5111 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/7/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 167 Docker mode activated.
_ Prechecks _
+1 hbaseanti 0 Patch does not have any anti-patterns.
+1 @author 0 The patch does not contain any @author tags.
-0 test4tests 0 The 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 _
+1 mvninstall 289 master passed
+1 compile 54 master passed
+1 checkstyle 72 master passed
+1 shadedjars 266 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 177 master passed
+1 javadoc 34 master passed
_ Patch Compile Tests _
+1 mvninstall 255 the patch passed
+1 compile 53 the patch passed
+1 javac 53 the patch passed
+1 checkstyle 72 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 255 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 540 Patch does not cause any errors with Hadoop 2.7.4 or 3.0.0.
+1 findbugs 200 the patch passed
+1 javadoc 32 the patch passed
_ Other Tests _
-1 unit 16127 hbase-server in the patch failed.
+1 asflicense 32 The patch does not generate ASF License warnings.
18698
Reason Tests
Failed junit tests hadoop.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
Subsystem Report/Notes
Docker Client=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 Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 18c1fdf783f1 4.4.0-137-generic #163-Ubuntu SMP Mon Sep 24 13:14:43 UTC 2018 x86_64 GNU/Linux
Build tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision master / 0b8493f
maven version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java 1.8.0_181
findbugs v3.1.11
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/6/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/6/testReport/
Max. process+thread count 5140 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/6/console
Powered by Apache 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
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...

Copy link
Contributor

@Apache9 Apache9 left a comment

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.

@@ -232,8 +233,9 @@ public RemoteProcedure getRemoteProcedure() {
public interface RemoteProcedure<TEnv, TRemote> {
/**
* For building the remote operation.
* May be empty if no need to send remote call.
Copy link
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.'

@@ -84,11 +85,12 @@ protected void deserializeStateData(ProcedureStateSerializer serializer) throws
}

@Override
public RemoteProcedureDispatcher.RemoteOperation remoteCallBuild(MasterProcedureEnv env,
public Optional<RemoteProcedureDispatcher.RemoteOperation> remoteCallBuild(MasterProcedureEnv env,
Copy link
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.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 55 Docker mode activated.
_ Prechecks _
+1 hbaseanti 0 Patch does not have any anti-patterns.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 1 new or modified test files.
_ master Compile Tests _
0 mvndep 21 Maven dependency ordering for branch
+1 mvninstall 322 master passed
+1 compile 79 master passed
+1 checkstyle 90 master passed
+1 shadedjars 301 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 258 master passed
+1 javadoc 49 master passed
_ Patch Compile Tests _
0 mvndep 14 Maven dependency ordering for patch
+1 mvninstall 258 the patch passed
+1 compile 80 the patch passed
+1 javac 80 the patch passed
-1 checkstyle 68 hbase-server: The patch generated 1 new + 136 unchanged - 0 fixed = 137 total (was 136)
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 286 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 783 Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.0.0.
+1 findbugs 224 the patch passed
+1 javadoc 51 the patch passed
_ Other Tests _
+1 unit 214 hbase-procedure in the patch passed.
+1 unit 9052 hbase-server in the patch passed.
+1 asflicense 43 The patch does not generate ASF License warnings.
12321
Subsystem Report/Notes
Docker Client=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 Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux f97bbb52a214 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 GNU/Linux
Build tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision master / fab2e15
maven version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java 1.8.0_181
findbugs v3.1.11
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/9/artifact/out/diff-checkstyle-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/9/testReport/
Max. process+thread count 5115 (vs. ulimit of 10000)
modules C: hbase-procedure hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-234/9/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@infraio infraio merged commit bdd2fc6 into apache:master May 16, 2019
Sign up for free to 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