Skip to content

HBASE-27762 Include EventType and ProcedureV2 pid in logging via MDC - #5145

Merged
ndimiduk merged 4 commits into
apache:masterfrom
ndimiduk:27762-eventtype-pid-mdc
Apr 17, 2023
Merged

HBASE-27762 Include EventType and ProcedureV2 pid in logging via MDC#5145
ndimiduk merged 4 commits into
apache:masterfrom
ndimiduk:27762-eventtype-pid-mdc

Conversation

@ndimiduk

Copy link
Copy Markdown
Member

No description provided.

@ndimiduk

ndimiduk commented Mar 27, 2023

Copy link
Copy Markdown
MemberAuthor

With this change, on the region server, we get log messages like,

2023-03-27T15:46:01,930 INFO [RS_CLAIM_REPLICATION_QUEUE-regionserver/scipio:0-0 ({event_type=RS_CLAIM_REPLICATION_QUEUE, pid=33})] replication.ZKReplicationQueueStorage(391): Atomically moving scipio,51464,1679924724756/region_replica_replication's WALs to scipio,51466,1679924724781

@Apache-HBase

This comment was marked as outdated.

@Apache-HBase

This comment was marked as outdated.

@Apache-HBase

This comment was marked as outdated.

@ndimiduk
ndimidukforce-pushed the 27762-eventtype-pid-mdc branch from 8534d42 to e065f93CompareMarch 29, 2023 12:01
@Apache-HBase

This comment was marked as outdated.

.setParent(Context.current().with(parent)).startSpan();
// assume that this is the top of an execution on a new or reused thread, that we're safe to
// blast any existing MDC state.
MDC.clear();

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.

We only call clear at the beginning? Is it possible to clear MDC at the end of a execution?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Sure, seems no harm in that. You'd like to see it clear on both beginning and end?

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 prefer we do something like

MDC.put("blabla", "blabla");
try {
...
} finally {
MDC.clear();
}

@Apache-HBase

This comment was marked as outdated.

@Apache-HBase

This comment was marked as outdated.

@ndimiduk
ndimidukforce-pushed the 27762-eventtype-pid-mdc branch from e065f93 to ce60ae8CompareMarch 30, 2023 11:24
@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 3sDocker 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 16sMaven dependency ordering for branch
+1 💚mvninstall3m 25smaster passed
+1 💚compile4m 39smaster passed
+1 💚checkstyle1m 8smaster passed
+1 💚spotless0m 42sbranch has no errors when running spotless:check.
-1 ❌spotbugs7m 6sroot in master has 4 extant spotbugs warnings.
_ Patch Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for patch
+1 💚mvninstall3m 17sthe patch passed
+1 💚compile4m 45sthe patch passed
+1 💚javac4m 45sthe patch passed
+1 💚checkstyle1m 6sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck12m 34sPatch does not cause any errors with Hadoop 3.2.4 3.3.4.
+1 💚spotless0m 41spatch has no errors when running spotless:check.
+1 💚spotbugs9m 8sthe patch passed
_ Other Tests _
+1 💚asflicense0m 31sThe patch does not generate ASF License warnings.
60m 5s
SubsystemReport/Notes
DockerClientAPI=1.42 ServerAPI=1.42 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5145/3/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#5145
Optional Testsdupname asflicense spotless javac spotbugs hadoopcheck hbaseanti checkstyle compile
unameLinux f9ea9b4f86ba 5.4.0-144-generic #161-Ubuntu SMP Fri Feb 3 14:49:04 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / e5620e2
Default JavaEclipse Adoptium-11.0.17+8
spotbugshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5145/3/artifact/yetus-general-check/output/branch-spotbugs-root-warnings.html
Max. process+thread count177 (vs. ulimit of 30000)
modulesC: hbase-logging hbase-server . U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5145/3/console
versionsgit=2.34.1 maven=3.8.6 spotbugs=4.7.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 19sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 12sMaven dependency ordering for branch
+1 💚mvninstall3m 15smaster passed
+1 💚compile1m 53smaster passed
+1 💚shadedjars4m 22sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc2m 26smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 10sMaven dependency ordering for patch
+1 💚mvninstall3m 21sthe patch passed
+1 💚compile1m 51sthe patch passed
+1 💚javac1m 51sthe patch passed
+1 💚shadedjars4m 21spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc2m 25sthe patch passed
_ Other Tests _
+1 💚unit270m 38sroot in the patch passed.
301m 21s
SubsystemReport/Notes
DockerClientAPI=1.42 ServerAPI=1.42 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5145/3/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#5145
Optional Testsunit javac javadoc shadedjars compile
unameLinux a90d70587342 5.4.0-144-generic #161-Ubuntu SMP Fri Feb 3 14:49:04 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / e5620e2
Default JavaEclipse Adoptium-11.0.17+8
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5145/3/testReport/
Max. process+thread count4618 (vs. ulimit of 30000)
modulesC: hbase-logging hbase-server . U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5145/3/console
versionsgit=2.34.1 maven=3.8.6
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 24sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for branch
+1 💚mvninstall3m 1smaster passed
+1 💚compile1m 31smaster passed
+1 💚shadedjars4m 34sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 45smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 10sMaven dependency ordering for patch
+1 💚mvninstall2m 41sthe patch passed
+1 💚compile1m 27sthe patch passed
+1 💚javac1m 27sthe patch passed
+1 💚shadedjars4m 29spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 43sthe patch passed
_ Other Tests _
-1 ❌unit323m 0sroot in the patch failed.
349m 57s
SubsystemReport/Notes
DockerClientAPI=1.42 ServerAPI=1.42 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5145/3/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#5145
Optional Testsunit javac javadoc shadedjars compile
unameLinux ef16b9b96e30 5.4.0-1094-aws #102~18.04.1-Ubuntu SMP Tue Jan 10 21:07:03 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / e5620e2
Default JavaTemurin-1.8.0_352-b08
unithttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5145/3/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-root.txt
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5145/3/testReport/
Max. process+thread count2244 (vs. ulimit of 30000)
modulesC: hbase-logging hbase-server . U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5145/3/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@ndimiduk

Copy link
Copy Markdown
MemberAuthor

@ndimiduk
ndimiduk merged commit 63471ef into apache:masterApr 17, 2023
ndimiduk added a commit to ndimiduk/hbase that referenced this pull request Apr 17, 2023
ndimiduk added a commit to ndimiduk/hbase that referenced this pull request Apr 17, 2023
ndimiduk added a commit to ndimiduk/hbase that referenced this pull request Apr 17, 2023
ndimiduk added a commit to ndimiduk/hbase that referenced this pull request Apr 28, 2023
ndimiduk added a commit to ndimiduk/hbase that referenced this pull request Apr 28, 2023
ndimiduk added a commit to ndimiduk/hbase that referenced this pull request Apr 28, 2023
ndimiduk added a commit to ndimiduk/hbase that referenced this pull request Apr 28, 2023
ndimiduk added a commit that referenced this pull request May 1, 2023
ndimiduk added a commit that referenced this pull request May 1, 2023
ndimiduk added a commit that referenced this pull request May 1, 2023
vinayakphegde pushed a commit to vinayakphegde/hbase that referenced this pull request Apr 4, 2024
…pache#5145)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 1d3d900)
Change-Id: Id2271f761dc7e858068d42f46e55a40eda4c5e36
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

@ndimiduk@Apache-HBase@Apache9