Skip to content

HBASE-26759 Fix trace continuity through CallRunner - #4126

Merged
apurtell merged 2 commits into
apache:masterfrom
ndimiduk:26759-orphaned-span-RegionScanner.close
Mar 4, 2022
Merged

HBASE-26759 Fix trace continuity through CallRunner#4126
apurtell merged 2 commits into
apache:masterfrom
ndimiduk:26759-orphaned-span-RegionScanner.close

Conversation

@ndimiduk

Copy link
Copy Markdown
Member

We appear to be generating spans with without a parent context with the name
RegionScanner.close.

@Apache-HBase

This comment was marked as outdated.

@Apache-HBase

This comment was marked as outdated.

@Apache9

Copy link
Copy Markdown
Contributor

I think the problem here is that we forget to end the span created in ServerRpcConnection? Anyway, I think we should have a big span to trace the whole rpc processing...

@ndimiduk

Copy link
Copy Markdown
MemberAuthor

I did not attempt to perform an audit of the span lifecycle, only reconnected the orphaned span to what appears to be its proper parent. If you think there are bugs in properly closing spans, I hope that we can find them by way of the pom change i have over on https://github.com/apache/hbase/pull/4106/files#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8

@ndimiduk

Copy link
Copy Markdown
MemberAuthor

I believe this patch fixes the issue because I no longer see a litany of these spans attached to a test-root span, and instead see spans of this name attached to a region scanner lifecycle,

2022-02-23T15:00:48,627 DEBUG [Time-limited test] trace.StringTraceRenderer(98): ├─ [spanId=b0b3842300fa4bee,name=hbase.pb.ClientService/Scan,hasEnded=true]
2022-02-23T15:00:48,627 DEBUG [Time-limited test] trace.StringTraceRenderer(98): └─ [spanId=408de8bffa73710d,name=RpcServer.process,hasEnded=true]
2022-02-23T15:00:48,627 DEBUG [Time-limited test] trace.StringTraceRenderer(98): └─ [spanId=4a5742873c238ba9,name=hbase.pb.ClientService/Scan,hasEnded=true]
2022-02-23T15:00:48,627 DEBUG [Time-limited test] trace.StringTraceRenderer(98): └─ [spanId=55fe2264c8a3039d,name=Region.getScanner,hasEnded=true]
2022-02-23T15:00:48,627 DEBUG [Time-limited test] trace.StringTraceRenderer(98): ├─ [spanId=e2274d44a068b9b3,name=RegionScanner.close,hasEnded=true]

@ndimiduk

Copy link
Copy Markdown
MemberAuthor

I do find it strange that we have a span explicitly for a close method, but not other lifecycle methods on the same object (such as open, for example).

@Apache-HBase

This comment was marked as outdated.

@Apache9

Copy link
Copy Markdown
Contributor

I mean we have a span here

I think it will be the parent span for the spans at server side, and seems it has not been ended properly?

@ndimiduk

Copy link
Copy Markdown
MemberAuthor

@Apache9

I think the problem here is that we forget to end the span created in ServerRpcConnection?

I see that the trace scope is closed properly, but I think you're correct that the trace is not ended, neither with success nor failure.

Anyway, I think we should have a big span to trace the whole rpc processing...

My impression was that this span in processRequest is the big span to trace the whole rpc processing. Is there additional scope you would see included?

We appear to be generating spans with without a parent context with the name
`RegionScanner.close`. This was a symptom of span scope disconnect through the `CallRunner`
execution path.
@ndimiduk
ndimidukforce-pushed the 26759-orphaned-span-RegionScanner.close branch from 4780035 to 01ab773CompareMarch 4, 2022 09:10
@ndimidukndimiduk changed the title HBASE-26759 Fix orphaned RegionScanner.close spansHBASE-26759 Fix trace continuity through CallRunnerMar 4, 2022
@ndimiduk

Copy link
Copy Markdown
MemberAuthor

@Apache9 please take another look.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec3m 38sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗mvndep0m 48sMaven dependency ordering for branch
+1 💚mvninstall3m 35smaster passed
+1 💚compile2m 52smaster passed
+1 💚checkstyle0m 48smaster passed
+1 💚spotbugs1m 50smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 10sMaven dependency ordering for patch
+1 💚mvninstall2m 23sthe patch passed
+1 💚compile2m 47sthe patch passed
+1 💚javac2m 47sthe patch passed
+1 💚checkstyle0m 13sThe patch passed checkstyle in hbase-client
+1 💚checkstyle0m 33shbase-server: The patch generated 0 new + 20 unchanged - 2 fixed = 20 total (was 22)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck11m 50sPatch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1.
+1 💚spotbugs2m 1sthe patch passed
_ Other Tests _
+1 💚asflicense0m 16sThe patch does not generate ASF License warnings.
39m 6s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4126/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#4126
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti checkstyle compile
unameLinux 9b8727bc845d 5.4.0-1043-aws #45~18.04.1-Ubuntu SMP Fri Apr 9 23:32:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 9c037b1
Default JavaAdoptOpenJDK-1.8.0_282-b08
Max. process+thread count60 (vs. ulimit of 30000)
modulesC: hbase-client hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4126/2/console
versionsgit=2.17.1 maven=3.6.3 spotbugs=4.2.2
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache9

Copy link
Copy Markdown
Contributor

@Apache9

I think the problem here is that we forget to end the span created in ServerRpcConnection?

I see that the trace scope is closed properly, but I think you're correct that the trace is not ended, neither with success nor failure.

Anyway, I think we should have a big span to trace the whole rpc processing...

My impression was that this span in processRequest is the big span to trace the whole rpc processing. Is there additional scope you would see included?

Ah, sorry, forgot to reply here. No additional scope. Let me check the newest PR.

@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.

+1

if (!this.rpcServer.scheduler.dispatch(new CallRunner(this.rpcServer, call))) {
if (this.rpcServer.scheduler.dispatch(new CallRunner(this.rpcServer, call, span))) {
// unset span do that it's not closed in the finally block
span = null;

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.

Yes, the code structure here is not friendly for tracing...

Thanks for the detailed comments!

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 36sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗mvndep0m 9sMaven dependency ordering for branch
+1 💚mvninstall2m 21smaster passed
+1 💚compile2m 48smaster passed
+1 💚checkstyle0m 47smaster passed
+1 💚spotbugs1m 47smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 9sMaven dependency ordering for patch
+1 💚mvninstall2m 19sthe patch passed
+1 💚compile2m 53sthe patch passed
+1 💚javac2m 53sthe patch passed
+1 💚checkstyle0m 14sThe patch passed checkstyle in hbase-client
+1 💚checkstyle0m 34shbase-server: The patch generated 0 new + 20 unchanged - 2 fixed = 20 total (was 22)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck11m 29sPatch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1.
+1 💚spotbugs2m 2sthe patch passed
_ Other Tests _
+1 💚asflicense0m 14sThe patch does not generate ASF License warnings.
33m 42s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4126/3/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#4126
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti checkstyle compile
unameLinux 708f764fbc78 5.4.0-1043-aws #45~18.04.1-Ubuntu SMP Fri Apr 9 23:32:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / f4b05a8
Default JavaAdoptOpenJDK-1.8.0_282-b08
Max. process+thread count60 (vs. ulimit of 30000)
modulesC: hbase-client hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4126/3/console
versionsgit=2.17.1 maven=3.6.3 spotbugs=4.2.2
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@apurtell
apurtell merged commit 2b9ab90 into apache:masterMar 4, 2022
asfgit pushed a commit that referenced this pull request Mar 5, 2022
Signed-off-by: Andrew Purtell <apurtell@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
asfgit pushed a commit that referenced this pull request Mar 5, 2022
Signed-off-by: Andrew Purtell <apurtell@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 41sDocker mode activated.
-0 ⚠️yetus0m 2sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 13sMaven dependency ordering for branch
+1 💚mvninstall2m 41smaster passed
+1 💚compile0m 49smaster passed
+1 💚shadedjars4m 0sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 35smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for patch
+1 💚mvninstall2m 18sthe patch passed
+1 💚compile0m 50sthe patch passed
+1 💚javac0m 50sthe patch passed
+1 💚shadedjars4m 1spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 34sthe patch passed
_ Other Tests _
+1 💚unit1m 36shbase-client in the patch passed.
-1 ❌unit324m 8shbase-server in the patch failed.
344m 33s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4126/3/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#4126
Optional Testsjavac javadoc unit shadedjars compile
unameLinux e46f4ae75c60 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / f4b05a8
Default JavaAdoptOpenJDK-1.8.0_282-b08
unithttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4126/3/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4126/3/testReport/
Max. process+thread count1796 (vs. ulimit of 30000)
modulesC: hbase-client hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4126/3/console
versionsgit=2.17.1 maven=3.6.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 38sDocker mode activated.
-0 ⚠️yetus0m 2sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 36sMaven dependency ordering for branch
+1 💚mvninstall3m 29smaster passed
+1 💚compile1m 3smaster passed
+1 💚shadedjars4m 17sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 41smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for patch
+1 💚mvninstall3m 2sthe patch passed
+1 💚compile1m 4sthe patch passed
+1 💚javac1m 4sthe patch passed
+1 💚shadedjars4m 11spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 40sthe patch passed
_ Other Tests _
+1 💚unit1m 52shbase-client in the patch passed.
+1 💚unit333m 19shbase-server in the patch passed.
357m 37s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4126/3/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#4126
Optional Testsjavac javadoc unit shadedjars compile
unameLinux ba4d8893f58b 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / f4b05a8
Default JavaAdoptOpenJDK-11.0.10+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4126/3/testReport/
Max. process+thread count1577 (vs. ulimit of 30000)
modulesC: hbase-client hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4126/3/console
versionsgit=2.17.1 maven=3.6.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@ndimiduk
ndimiduk deleted the 26759-orphaned-span-RegionScanner.close branch March 7, 2022 12:26
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.

4 participants

@ndimiduk@Apache-HBase@Apache9@apurtell