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-21426 TestEncryptionKeyRotation.testCFKeyRotation is flaky #375

Merged
merged 2 commits into from Jul 18, 2019
Merged

HBASE-21426 TestEncryptionKeyRotation.testCFKeyRotation is flaky #375

merged 2 commits into from Jul 18, 2019

Conversation

sunhelly
Copy link
Contributor

No description provided.

@sunhelly sunhelly changed the title HBASE-21426 TestEncryptionKeyRotation.testCFKeyRotation is flakey HBASE-21426 TestEncryptionKeyRotation.testCFKeyRotation is flaky Jul 12, 2019
return !found;
public boolean evaluate() throws IOException {
return TEST_UTIL.getAdmin().getCompactionState(htd.getTableName()) ==
CompactionState.NONE;
Copy link
Contributor

Choose a reason for hiding this comment

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

So here you are checking table's compaction state is "NONE" to determine compaction is done.
How is this sufficient? Can this state never changed? Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi, @xcangCRM , thanks your questions.

How is this sufficient? Can this state never changed?

We all know majorCompact() is a async method, returning not means compaction completed.
But the method will return after building the compaction context and adding the compaction to the executor pool. And before the executor runs compaction, when building the compaction context, state of table regions that want to compact will be set to MAJOR by calling reportCompactionRequestStart(). So calling majorCompact() returns means table compaction state is not 'NONE' until the major compaction is completed.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 32 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 _
+1 mvninstall 265 master passed
+1 compile 57 master passed
+1 checkstyle 71 master passed
+1 shadedjars 271 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 217 master passed
+1 javadoc 32 master passed
_ Patch Compile Tests _
+1 mvninstall 249 the patch passed
+1 compile 56 the patch passed
+1 javac 56 the patch passed
+1 checkstyle 72 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 278 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 753 Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 findbugs 225 the patch passed
+1 javadoc 33 the patch passed
_ Other Tests _
-1 unit 8450 hbase-server in the patch failed.
+1 asflicense 24 The patch does not generate ASF License warnings.
11389
Reason Tests
Failed junit tests hadoop.hbase.replication.TestSyncReplicationNewRSJoinBetweenRefreshes
hadoop.hbase.replication.TestPerTableCFReplication
hadoop.hbase.replication.regionserver.TestSyncReplicationShipperQuit
hadoop.hbase.replication.TestReplicationKillMasterRSWithSeparateOldWALs
Subsystem Report/Notes
Docker Client=18.09.7 Server=18.09.7 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-375/1/artifact/out/Dockerfile
GITHUB PR #375
Optional Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 8f3b7bafc9f2 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 / 438bf32
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-375/1/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-375/1/testReport/
Max. process+thread count 4571 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-375/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 204 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 _
+1 mvninstall 261 master passed
+1 compile 57 master passed
+1 checkstyle 73 master passed
+1 shadedjars 254 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 215 master passed
+1 javadoc 31 master passed
_ Patch Compile Tests _
+1 mvninstall 247 the patch passed
+1 compile 54 the patch passed
+1 javac 54 the patch passed
+1 checkstyle 69 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 268 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 713 Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 findbugs 216 the patch passed
+1 javadoc 33 the patch passed
_ Other Tests _
-1 unit 17784 hbase-server in the patch failed.
+1 asflicense 43 The patch does not generate ASF License warnings.
20838
Reason Tests
Failed junit tests hadoop.hbase.client.TestSnapshotDFSTemporaryDirectory
hadoop.hbase.client.TestAsyncTableAdminApi3
hadoop.hbase.client.TestCloneSnapshotFromClientNormal
hadoop.hbase.client.TestSnapshotFromClient
hadoop.hbase.client.TestSnapshotTemporaryDirectory
hadoop.hbase.namespace.TestNamespaceAuditor
Subsystem Report/Notes
Docker Client=18.09.7 Server=18.09.7 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-375/2/artifact/out/Dockerfile
GITHUB PR #375
Optional Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 44ac78af58c1 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 GNU/Linux
Build tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision master / 74731c2
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-375/2/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-375/2/testReport/
Max. process+thread count 5171 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-375/2/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@@ -91,6 +92,7 @@ public static void setUp() throws Exception {
conf.setInt("hfile.format.version", 3);
conf.set(HConstants.CRYPTO_KEYPROVIDER_CONF_KEY, KeyProviderForTesting.class.getName());
conf.set(HConstants.CRYPTO_MASTERKEY_NAME_CONF_KEY, "hbase");
conf.setInt("hbase.hfile.compaction.discharger.interval", 10 * 60 * 1000);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this config change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@infraio Thanks for reviewing.

Why this config change?

I changed this to let the compacted files be cleaned up slower than normal(10min instead of 2min). Because when I run testCFKeyRotation() for 100 times, I have met assertion fail at List<Path> compactedPaths = findCompactedStorefilePaths(htd.getTableName()); assertTrue(compactedPaths.size() > 0);. So this test case may also be flaky at this assertion.
Enlarging the compaction discharger interval can ensure compacted files still be there after major compaction is completed but compacted paths are not checked in testCFKeyRotation().

Copy link
Contributor

Choose a reason for hiding this comment

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

How about a bigger value? The test will timeout if it can't finished after 780 seconds. So may be use 30 * 60 * 1000 is better which is bigger than 2 * 780?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I checked the test class config, it's a MediumTests.class, which will complete in 50 seconds. So the test method testCFKeyRotation() must complete in 50 secs, less than the cleaner interval(2 mins). I met this problem because when I ran 100 times of the method, I used parameterized running. All 100 cases used the same minicluster and when ran after 2 mins the case may met with checking compacted files fail.
@infraio I will convert the change of the conf.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 54 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 _
+1 mvninstall 257 master passed
+1 compile 52 master passed
+1 checkstyle 68 master passed
+1 shadedjars 265 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 202 master passed
+1 javadoc 34 master passed
_ Patch Compile Tests _
+1 mvninstall 259 the patch passed
+1 compile 56 the patch passed
+1 javac 56 the patch passed
+1 checkstyle 66 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 287 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 731 Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 findbugs 210 the patch passed
+1 javadoc 34 the patch passed
_ Other Tests _
-1 unit 1653 hbase-server in the patch failed.
+1 asflicense 12 The patch does not generate ASF License warnings.
4540
Reason Tests
Failed junit tests hadoop.hbase.regionserver.TestDefaultStoreEngine
Subsystem Report/Notes
Docker Client=18.09.7 Server=18.09.7 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-375/3/artifact/out/Dockerfile
GITHUB PR #375
Optional Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 4636f459968a 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 GNU/Linux
Build tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision master / cc38de1
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-375/3/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-375/3/testReport/
Max. process+thread count 688 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-375/3/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 1 new or modified test files.
_ master Compile Tests _
+1 mvninstall 237 master passed
+1 compile 53 master passed
+1 checkstyle 69 master passed
+1 shadedjars 257 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 216 master passed
+1 javadoc 31 master passed
_ Patch Compile Tests _
+1 mvninstall 230 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 253 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 727 Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 findbugs 208 the patch passed
+1 javadoc 31 the patch passed
_ Other Tests _
+1 unit 8282 hbase-server in the patch passed.
+1 asflicense 24 The patch does not generate ASF License warnings.
11080
Subsystem Report/Notes
Docker Client=18.09.7 Server=18.09.7 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-375/4/artifact/out/Dockerfile
GITHUB PR #375
Optional Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 379dace03d55 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 / 72e58a8
maven version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java 1.8.0_181
findbugs v3.1.11
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-375/4/testReport/
Max. process+thread count 4712 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-375/4/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@infraio infraio merged commit e08ac5f into apache:master Jul 18, 2019
asfgit pushed a commit that referenced this pull request Jul 19, 2019
Signed-off-by: Guanghao Zhang <zghao@apache.org>
asfgit pushed a commit that referenced this pull request Jul 19, 2019
Signed-off-by: Guanghao Zhang <zghao@apache.org>
infraio pushed a commit to infraio/hbase that referenced this pull request Aug 17, 2020
symat pushed a commit to symat/hbase that referenced this pull request Feb 17, 2021
…che#375)

Signed-off-by: Guanghao Zhang <zghao@apache.org>
(cherry picked from commit 13f7499)

Change-Id: Id1b781901d80646d82728c7434c57d0f59f70bcf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants