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-23744 - FastPathBalancedQueueRpcExecutor should enforce queue l… #1094

Closed
wants to merge 2 commits into from

Conversation

gjacoby126
Copy link
Contributor

…ength of 0

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 32s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ master Compile Tests _
+1 💚 mvninstall 5m 31s master passed
+1 💚 compile 0m 58s master passed
+1 💚 checkstyle 1m 7s master passed
+1 💚 shadedjars 4m 40s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 37s master passed
+0 🆗 spotbugs 4m 23s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 4m 20s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 5m 2s the patch passed
+1 💚 compile 0m 58s the patch passed
+1 💚 javac 0m 58s the patch passed
+1 💚 checkstyle 1m 7s the patch passed
+1 💚 whitespace 0m 1s The patch has no whitespace issues.
+1 💚 shadedjars 4m 43s patch has no errors when building our shaded downstream artifacts.
+1 💚 hadoopcheck 16m 1s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚 javadoc 0m 36s the patch passed
+1 💚 findbugs 4m 13s the patch passed
_ Other Tests _
+1 💚 unit 156m 52s hbase-server in the patch passed.
+1 💚 asflicense 0m 32s The patch does not generate ASF License warnings.
214m 17s
Subsystem Report/Notes
Docker Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/1/artifact/out/Dockerfile
GITHUB PR #1094
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux b99e1f3cf3b6 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/Base-PreCommit-GitHub-PR_PR-1094/out/precommit/personality/provided.sh
git revision master / fb06ca5
Default Java 1.8.0_181
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/1/testReport/
Max. process+thread count 5569 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/1/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@xcangCRM xcangCRM left a comment

Choose a reason for hiding this comment

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

Left some comments in JIRA.
LTGM +1

Copy link
Contributor

@virajjasani virajjasani left a comment

Choose a reason for hiding this comment

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

+1

@ndimiduk
Copy link
Member

ndimiduk commented Feb 8, 2020

I have the same question as @xcangCRM .

@Apache9
Copy link
Contributor

Apache9 commented Jun 24, 2020

Any updates here? Should we merge the PR?

Thanks.

@virajjasani
Copy link
Contributor

Looks like the discussion was going on Jira. The conclusion seems pending?

@gjacoby126 @xcangCRM @ndimiduk

@ndimiduk
Copy link
Member

Questions pending on Jira appear to await response from the author.

@gjacoby126
Copy link
Contributor Author

@ndimiduk Questions pending on JIRA from the author are waiting for response from reviewers. :-)

TestSimpleRpcScehduler.testSoftAndHardQueueLimits asserts that a call queue length of 0 means that the executor should refuse writes. There is one code path in FastPathBalancedQueueRpcExecutor that doesn't (the "fast" one); it just so happens to pass the test because that code path never gets used in the test.

There are two potential solutions. In this patch, I've assumed the test is right, and fixed the FastPathBalancedQueueRpcExecutor to conform to it. Multiple reviewers wondered if this undocumented behavior should really exist as-is. If the test is wrong, the correct fix would be to change the test to not assert it.

On a tangent, I mentioned that a write kill-switch is a useful feature (however achieved), and it was suggested that I file it as a JIRA, which I meant to do but never got around to doing.

But this patch is still waiting on a judgment from the reviewers whether the test or the code is wrong. I'm happy to fix either one.

Copy link
Member

@ndimiduk ndimiduk left a comment

Choose a reason for hiding this comment

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

TestSimpleRpcScehduler.testSoftAndHardQueueLimits asserts that a call queue length of 0 means that the executor should refuse writes. There is one code path in FastPathBalancedQueueRpcExecutor that doesn't (the "fast" one); it just so happens to pass the test because that code path never gets used in the test.

There are two potential solutions. In this patch, I've assumed the test is right, and fixed the FastPathBalancedQueueRpcExecutor to conform to it. Multiple reviewers wondered if this undocumented behavior should really exist as-is. If the test is wrong, the correct fix would be to change the test to not assert it.

This test seems to have been introduced via HBASE-15306. Reading over that ticket, behavior around currentQueueLimit seems to be a convenient side-effect for test validation, not an intentional feature. But that's just my read.

On a tangent, I mentioned that a write kill-switch is a useful feature (however achieved), and it was suggested that I file it as a JIRA, which I meant to do but never got around to doing.

But this patch is still waiting on a judgment from the reviewers whether the test or the code is wrong. I'm happy to fix either one.

I think the implementations should be consistent wherever possible, so I'm good with your approach.

I have one comment for cleanup, otherwise, +1

@@ -559,6 +561,25 @@ public void testCoDelScheduling() throws Exception {
}
}

@Test
public void testFastPathBalancedQueueRpcExecutorWithQueueLength0() throws Exception {
String name = "testFastPathBalancedQueueRpcExecutorWithQueueLength0";
Copy link
Member

Choose a reason for hiding this comment

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

Use the TestName junit rule instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ndimiduk - thanks for the suggestion. I've replaced the constant with a TestName rule.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 20s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+1 💚 mvninstall 4m 9s master passed
+1 💚 checkstyle 1m 12s master passed
+1 💚 spotbugs 2m 5s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 3m 43s the patch passed
+1 💚 checkstyle 1m 10s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 12m 11s Patch does not cause any errors with Hadoop 3.1.2 3.2.1.
+1 💚 spotbugs 2m 16s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 13s The patch does not generate ASF License warnings.
36m 2s
Subsystem Report/Notes
Docker Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #1094
Optional Tests dupname asflicense spotbugs hadoopcheck hbaseanti checkstyle
uname Linux d2240927a499 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 7b92510
Max. process+thread count 84 (vs. ulimit of 12500)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/2/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) spotbugs=3.1.12
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 34s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 4m 33s master passed
+1 💚 compile 1m 7s master passed
+1 💚 shadedjars 5m 55s branch has no errors when building our shaded downstream artifacts.
-0 ⚠️ javadoc 0m 42s hbase-server in master failed.
_ Patch Compile Tests _
+1 💚 mvninstall 4m 8s the patch passed
+1 💚 compile 1m 6s the patch passed
+1 💚 javac 1m 6s the patch passed
+1 💚 shadedjars 6m 7s patch has no errors when building our shaded downstream artifacts.
-0 ⚠️ javadoc 0m 49s hbase-server in the patch failed.
_ Other Tests _
+1 💚 unit 149m 39s hbase-server in the patch passed.
176m 47s
Subsystem Report/Notes
Docker Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #1094
Optional Tests javac javadoc unit shadedjars compile
uname Linux cf4ff6541c7a 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 7b92510
Default Java 2020-01-14
javadoc https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/2/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt
javadoc https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/2/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/2/testReport/
Max. process+thread count 3871 (vs. ulimit of 12500)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/2/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 34s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 4m 1s master passed
+1 💚 compile 0m 54s master passed
+1 💚 shadedjars 5m 35s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 39s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 3m 35s the patch passed
+1 💚 compile 0m 55s the patch passed
+1 💚 javac 0m 55s the patch passed
+1 💚 shadedjars 5m 34s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 36s the patch passed
_ Other Tests _
-1 ❌ unit 159m 57s hbase-server in the patch failed.
184m 36s
Subsystem Report/Notes
Docker Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR #1094
Optional Tests javac javadoc unit shadedjars compile
uname Linux 85fd52593019 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 7b92510
Default Java 1.8.0_232
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/2/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/2/testReport/
Max. process+thread count 3945 (vs. ulimit of 12500)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/2/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 3s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+1 💚 mvninstall 4m 5s master passed
+1 💚 checkstyle 1m 12s master passed
+1 💚 spotbugs 2m 7s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 3m 43s the patch passed
+1 💚 checkstyle 1m 11s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 12m 12s Patch does not cause any errors with Hadoop 3.1.2 3.2.1.
+1 💚 spotbugs 2m 17s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 13s The patch does not generate ASF License warnings.
35m 23s
Subsystem Report/Notes
Docker Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/3/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #1094
Optional Tests dupname asflicense spotbugs hadoopcheck hbaseanti checkstyle
uname Linux c8df59c40358 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 724f047
Max. process+thread count 84 (vs. ulimit of 12500)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/3/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) spotbugs=3.1.12
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 27s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 4m 12s master passed
+1 💚 compile 1m 4s master passed
+1 💚 shadedjars 5m 48s branch has no errors when building our shaded downstream artifacts.
-0 ⚠️ javadoc 0m 42s hbase-server in master failed.
_ Patch Compile Tests _
+1 💚 mvninstall 4m 4s the patch passed
+1 💚 compile 1m 3s the patch passed
+1 💚 javac 1m 3s the patch passed
+1 💚 shadedjars 5m 40s patch has no errors when building our shaded downstream artifacts.
-0 ⚠️ javadoc 0m 38s hbase-server in the patch failed.
_ Other Tests _
-1 ❌ unit 129m 38s hbase-server in the patch failed.
155m 14s
Subsystem Report/Notes
Docker Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/3/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #1094
Optional Tests javac javadoc unit shadedjars compile
uname Linux 35eb357a7ada 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 724f047
Default Java 2020-01-14
javadoc https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/3/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt
javadoc https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/3/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/3/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/3/testReport/
Max. process+thread count 4464 (vs. ulimit of 12500)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/3/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 29s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 3m 44s master passed
+1 💚 compile 0m 56s master passed
+1 💚 shadedjars 5m 36s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 37s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 3m 25s the patch passed
+1 💚 compile 0m 56s the patch passed
+1 💚 javac 0m 56s the patch passed
+1 💚 shadedjars 5m 31s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 36s the patch passed
_ Other Tests _
+1 💚 unit 139m 33s hbase-server in the patch passed.
163m 15s
Subsystem Report/Notes
Docker Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/3/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR #1094
Optional Tests javac javadoc unit shadedjars compile
uname Linux b09100998628 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 724f047
Default Java 1.8.0_232
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/3/testReport/
Max. process+thread count 4252 (vs. ulimit of 12500)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1094/3/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@virajjasani
Copy link
Contributor

Test failures are not relevant.

pull bot referenced this pull request in Mu-L/hbase Jul 13, 2020
…ength of 0

Closes #1094

Signed-off-by: Xu Cang <xucang@apache.org>
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
virajjasani pushed a commit that referenced this pull request Jul 13, 2020
…ength of 0

Closes #1094

Co-authored-by: Viraj Jasani <vjasani@apache.org>

Signed-off-by: Xu Cang <xucang@apache.org>
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
mapr-devops pushed a commit to mapr/hbase that referenced this pull request Jul 13, 2020
…ength of 0

Closes apache#1094

Signed-off-by: Xu Cang <xucang@apache.org>
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
clarax pushed a commit to clarax/hbase that referenced this pull request Nov 15, 2020
…ength of 0

Closes apache#1094

Signed-off-by: Xu Cang <xucang@apache.org>
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants