Sponsored Content
Skip to content

Thread naming: enforce 15-char limit + simplify labels - #6212

Merged
bthomee merged 18 commits into
developfrom
vlntb/resolve-long-thread-names
Jan 22, 2026
Merged

Thread naming: enforce 15-char limit + simplify labels#6212
bthomee merged 18 commits into
developfrom
vlntb/resolve-long-thread-names

Conversation

@vlntb

@vlntb vlntb commented Jan 13, 2026

Copy link
Copy Markdown
Contributor

High Level Overview of Change

This PR continues the thread naming work from #5691 and #5758.

Changes:

  • Shorten all thread/job names used with beast::setCurrentThreadName so the effective Linux thread name stays within the 15-character limit.
  • Remove per-ledger sequence numbers from job/thread names to avoid long labels. This improves aggregation in lock contention profiling for short-lived job executions.

Context of Change

Enable more useful lock contention profiling by ensuring threads/jobs have short, stable, human-readable names (rather than being truncated/failing due to OS limits).

Note: This changes diagnostic naming only (thread names and job/load-event labels), not behavior.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Performance (increase or change in throughput and/or latency)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)
  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

API Impact

  • Public API: New feature (new methods and/or new fields)
  • Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • Peer protocol change (must be backward compatible or bump the peer protocol version)

@vlntb
vlntb marked this pull request as ready for review January 20, 2026 11:04
@vlntb
vlntb requested a review from a team January 20, 2026 11:04
@vlntb vlntb changed the title Shorten thread names Thread naming: enforce 15-char limit + simplify labels Jan 20, 2026
@codecov

codecov Bot commented Jan 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 23.75000% with 61 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.4%. Comparing base (211054b) to head (c98e2ff).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
src/xrpld/overlay/detail/PeerImp.cpp 0.0% 38 Missing ⚠️
src/xrpld/app/misc/NetworkOPs.cpp 60.0% 4 Missing ⚠️
src/xrpld/app/ledger/OrderBookDB.cpp 0.0% 3 Missing ⚠️
src/xrpld/app/consensus/RCLConsensus.cpp 0.0% 2 Missing ⚠️
src/xrpld/app/ledger/detail/InboundLedgers.cpp 0.0% 2 Missing ⚠️
src/xrpld/app/ledger/detail/LedgerMaster.cpp 66.7% 2 Missing ⚠️
src/xrpld/app/ledger/detail/TransactionAcquire.cpp 0.0% 2 Missing ⚠️
src/xrpld/app/main/NodeStoreScheduler.cpp 0.0% 2 Missing ⚠️
src/libxrpl/beast/core/CurrentThreadName.cpp 0.0% 1 Missing ⚠️
src/xrpld/app/ledger/ConsensusTransSetSF.cpp 0.0% 1 Missing ⚠️
... and 4 more
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #6212   +/-   ##
=======================================
  Coverage     79.4%   79.4%           
=======================================
  Files          839     839           
  Lines        71634   71619   -15     
  Branches      8261    8229   -32     
=======================================
+ Hits         56858   56860    +2     
+ Misses       14776   14759   -17     
Files with missing lines Coverage Δ
src/libxrpl/core/detail/Job.cpp 56.8% <100.0%> (ø)
src/xrpld/app/consensus/RCLValidations.cpp 72.9% <100.0%> (-0.6%) ⬇️
src/xrpld/app/ledger/detail/InboundLedger.cpp 35.6% <100.0%> (ø)
src/xrpld/app/main/Main.cpp 78.3% <100.0%> (-0.1%) ⬇️
src/libxrpl/beast/core/CurrentThreadName.cpp 69.2% <0.0%> (-30.8%) ⬇️
src/xrpld/app/ledger/ConsensusTransSetSF.cpp 0.0% <0.0%> (ø)
src/xrpld/app/ledger/detail/LedgerDeltaAcquire.cpp 95.3% <50.0%> (ø)
src/xrpld/app/ledger/detail/LedgerReplayTask.cpp 92.9% <0.0%> (ø)
src/xrpld/app/ledger/detail/SkipListAcquire.cpp 95.2% <0.0%> (ø)
src/xrpld/rpc/detail/RPCSub.cpp 43.4% <0.0%> (ø)
... and 8 more

... and 4 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vlntb
vlntb marked this pull request as draft January 20, 2026 14:07
@vlntb vlntb self-assigned this Jan 20, 2026
@vlntb
vlntb marked this pull request as ready for review January 20, 2026 14:07

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

These are all very minor, except one with the version number. Feel free to ignore the others.

Comment thread src/test/core/Coroutine_test.cpp Outdated
Comment thread src/xrpld/app/ledger/OrderBookDB.cpp
Comment thread src/xrpld/app/main/Main.cpp
Comment thread src/xrpld/app/main/NodeStoreScheduler.cpp Outdated
@vlntb
vlntb requested a review from ximinez January 21, 2026 14:24

@bthomee bthomee left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good. Regarding consistency in naming, I see several variants in the original code that you mostly maintained here, while now is a good time to move towards better naming.

  • abcXyz
  • Abc Xyz
  • Abc.xyz

so essentially inconsistent casing and inconsistent separation. I would suggest to just drop the space and the period, and use pascal case.

@vlntb

vlntb commented Jan 22, 2026

Copy link
Copy Markdown
Contributor Author

Looks good. Regarding consistency in naming, I see several variants in the original code that you mostly maintained here, while now is a good time to move towards better naming.

  • abcXyz
  • Abc Xyz
  • Abc.xyz

so essentially inconsistent casing and inconsistent separation. I would suggest to just drop the space and the period, and use pascal case.

Done

@vlntb
vlntb requested a review from bthomee January 22, 2026 11:30
@bthomee
bthomee merged commit 68c9d5c into develop Jan 22, 2026
2 of 3 checks passed
@bthomee
bthomee deleted the vlntb/resolve-long-thread-names branch January 22, 2026 13:19
@vlntb vlntb mentioned this pull request Feb 6, 2026
13 tasks
bthomee pushed a commit that referenced this pull request Feb 6, 2026
This change builds on the thread-renaming PR (#6212), by renaming the main thread name to reduce ambiguity in performance monitoring tools.
bthomee pushed a commit that referenced this pull request Apr 7, 2026
…#6212)

This change continues the thread naming work from #5691 and #5758, which enables more useful lock contention profiling by ensuring threads/jobs have short, stable, human-readable names (rather than being truncated/failing due to OS limits). This changes diagnostic naming only (thread names and job/load-event labels), not behavior.

Specific modifications are:
* Shortens all thread/job names used with `beast::setCurrentThreadName`, so the effective Linux thread name stays within the 15-character limit.
* Removes per-ledger sequence numbers from job/thread names to avoid long labels. This improves aggregation in lock contention profiling for short-lived job executions.
ximinez pushed a commit that referenced this pull request Apr 10, 2026
…#6212)

This change continues the thread naming work from #5691 and #5758, which enables more useful lock contention profiling by ensuring threads/jobs have short, stable, human-readable names (rather than being truncated/failing due to OS limits). This changes diagnostic naming only (thread names and job/load-event labels), not behavior.

Specific modifications are:
* Shortens all thread/job names used with `beast::setCurrentThreadName`, so the effective Linux thread name stays within the 15-character limit.
* Removes per-ledger sequence numbers from job/thread names to avoid long labels. This improves aggregation in lock contention profiling for short-lived job executions.
@ximinez ximinez modified the milestones: 3.1.3, 3.1.3 (develop) Apr 15, 2026
ximinez pushed a commit that referenced this pull request Apr 22, 2026
…#6212)

This change continues the thread naming work from #5691 and #5758, which enables more useful lock contention profiling by ensuring threads/jobs have short, stable, human-readable names (rather than being truncated/failing due to OS limits). This changes diagnostic naming only (thread names and job/load-event labels), not behavior.

Specific modifications are:
* Shortens all thread/job names used with `beast::setCurrentThreadName`, so the effective Linux thread name stays within the 15-character limit.
* Removes per-ledger sequence numbers from job/thread names to avoid long labels. This improves aggregation in lock contention profiling for short-lived job executions.
beartec-jpg pushed a commit to beartec-jpg/FalconLedger that referenced this pull request Jun 1, 2026
…XRPLF#6212)

This change continues the thread naming work from XRPLF#5691 and XRPLF#5758, which enables more useful lock contention profiling by ensuring threads/jobs have short, stable, human-readable names (rather than being truncated/failing due to OS limits). This changes diagnostic naming only (thread names and job/load-event labels), not behavior.

Specific modifications are:
* Shortens all thread/job names used with `beast::setCurrentThreadName`, so the effective Linux thread name stays within the 15-character limit.
* Removes per-ledger sequence numbers from job/thread names to avoid long labels. This improves aggregation in lock contention profiling for short-lived job executions.
beartec-jpg pushed a commit to beartec-jpg/FalconLedger that referenced this pull request Jun 1, 2026
This change builds on the thread-renaming PR (XRPLF#6212), by renaming the main thread name to reduce ambiguity in performance monitoring tools.
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