Skip to content

Conversation

@ximinez
Copy link
Collaborator

@ximinez ximinez commented Feb 28, 2025

High Level Overview of Change

Does a few different things:

  1. Adds a new RAII class CanProcess to use where needed for job deduplication.
  2. Adds and improves logging across a variety of classes. Uses the new to_short_string(base_uint) function to help disambiguate some messages about peers and ledgers.
  3. Exits InboundLedger::onTimer without sending new requests if the complete ledger is available. (Duh.)
  4. Changes the interface and usage of InboundLedgers::acquireAsync so that it dispatches a job, and is not called from a dispatched job. This will reduce the number of jobs spun up only to immediately exit.

Context of Change

This is the safe subset of changes from #5301, which has problems, plus the item to dispatch from acquireAsync.

Type of Change

  • 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)

API Impact

None

@ximinez ximinez force-pushed the ximinez/fix-getledger branch from 8a1331c to 021c10d Compare February 28, 2025 18:55
@ximinez ximinez force-pushed the ximinez/acquireAsyncDispatch branch from fd9bff2 to a241e2f Compare February 28, 2025 18:56
@codecov
Copy link

codecov bot commented Feb 28, 2025

Codecov Report

❌ Patch coverage is 58.58586% with 41 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.5%. Comparing base (92281a4) to head (c77a048).

Files with missing lines Patch % Lines
src/xrpld/app/misc/NetworkOPs.cpp 21.4% 22 Missing ⚠️
src/xrpld/app/ledger/detail/InboundLedgers.cpp 54.2% 11 Missing ⚠️
src/xrpld/app/ledger/detail/InboundLedger.cpp 25.0% 3 Missing ⚠️
src/xrpld/app/ledger/detail/LedgerMaster.cpp 0.0% 3 Missing ⚠️
src/xrpld/app/consensus/RCLConsensus.cpp 0.0% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #5327   +/-   ##
=======================================
  Coverage     79.5%   79.5%           
=======================================
  Files          816     817    +1     
  Lines        72180   72209   +29     
  Branches      8295    8273   -22     
=======================================
+ Hits         57364   57394   +30     
+ Misses       14816   14815    -1     
Files with missing lines Coverage Δ
include/xrpl/basics/CanProcess.h 100.0% <100.0%> (ø)
include/xrpl/protocol/LedgerHeader.h 100.0% <ø> (ø)
src/xrpld/app/consensus/RCLValidations.cpp 72.9% <100.0%> (-1.6%) ⬇️
src/xrpld/app/ledger/InboundLedgers.h 100.0% <ø> (ø)
src/xrpld/app/ledger/detail/TimeoutCounter.cpp 88.4% <100.0%> (-0.3%) ⬇️
src/xrpld/app/ledger/detail/TimeoutCounter.h 100.0% <ø> (ø)
src/xrpld/app/misc/HashRouter.h 100.0% <ø> (ø)
src/xrpld/app/misc/NetworkOPs.h 100.0% <ø> (ø)
src/xrpld/app/consensus/RCLConsensus.cpp 62.1% <0.0%> (+0.7%) ⬆️
src/xrpld/app/ledger/detail/InboundLedger.cpp 36.7% <25.0%> (-0.2%) ⬇️
... and 3 more

... and 2 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.

@ximinez ximinez force-pushed the ximinez/fix-getledger branch from 021c10d to 7dc9efd Compare March 11, 2025 15:41
@ximinez ximinez force-pushed the ximinez/acquireAsyncDispatch branch from 011e2c8 to 53f1f02 Compare March 11, 2025 15:48
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from 7dc9efd to 068b71f Compare March 12, 2025 16:35
@ximinez ximinez force-pushed the ximinez/acquireAsyncDispatch branch from 53f1f02 to 16a3282 Compare March 12, 2025 20:42
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from 068b71f to d7790ce Compare March 13, 2025 00:16
@ximinez ximinez force-pushed the ximinez/acquireAsyncDispatch branch from 16a3282 to ccb0099 Compare March 13, 2025 16:37
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from d7790ce to 46f8af5 Compare March 13, 2025 16:45
@ximinez ximinez force-pushed the ximinez/acquireAsyncDispatch branch from ccb0099 to a53f0c0 Compare March 13, 2025 16:50
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from 46f8af5 to 0e4f4d2 Compare March 17, 2025 23:01
@ximinez ximinez force-pushed the ximinez/acquireAsyncDispatch branch from a53f0c0 to 78f4bae Compare March 17, 2025 23:55
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from 0e4f4d2 to 06e0540 Compare March 19, 2025 00:46
@ximinez ximinez force-pushed the ximinez/acquireAsyncDispatch branch from 78f4bae to c1382ab Compare March 19, 2025 00:46
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from 06e0540 to 4b464d1 Compare March 20, 2025 01:05
@ximinez ximinez force-pushed the ximinez/acquireAsyncDispatch branch from c1382ab to 363cd17 Compare March 20, 2025 01:05
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from 4b464d1 to a6799ec Compare March 20, 2025 18:07
@ximinez ximinez force-pushed the ximinez/acquireAsyncDispatch branch from 363cd17 to 0954203 Compare March 20, 2025 18:08
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from a6799ec to 0b8c2b3 Compare March 24, 2025 23:40
@ximinez ximinez force-pushed the ximinez/acquireAsyncDispatch branch from 0954203 to adb9df3 Compare March 24, 2025 23:41
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from 0b8c2b3 to f2b1a67 Compare March 25, 2025 16:12
@ximinez ximinez force-pushed the ximinez/acquireAsyncDispatch branch from adb9df3 to 262940a Compare March 25, 2025 16:12
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from f2b1a67 to c1215d0 Compare March 27, 2025 18:37
@ximinez ximinez force-pushed the ximinez/acquireAsyncDispatch branch from 262940a to 9ecb783 Compare March 27, 2025 18:38
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from c1215d0 to 966204c Compare March 31, 2025 21:55
@ximinez ximinez force-pushed the ximinez/acquireAsyncDispatch branch from 9ecb783 to e60c51a Compare March 31, 2025 21:55
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from 966204c to c49d81c Compare April 2, 2025 14:43
@ximinez ximinez force-pushed the ximinez/acquireAsyncDispatch branch from e60c51a to da31e1c Compare April 2, 2025 14:43
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from c49d81c to 07fa3a6 Compare April 4, 2025 17:23
@ximinez ximinez force-pushed the ximinez/acquireAsyncDispatch branch 5 times, most recently from 7929697 to 32d8f54 Compare October 31, 2025 17:51
@ximinez ximinez force-pushed the ximinez/acquireAsyncDispatch branch 6 times, most recently from ae55569 to 76fdc2b Compare November 9, 2025 03:49
@ximinez ximinez force-pushed the ximinez/acquireAsyncDispatch branch from 76fdc2b to d084704 Compare November 10, 2025 20:35
- Improve logging related to ledger acquisition and operating mode
  changes
- Class "CanProcess" to keep track of processing of distinct items
- Delete the copy ctor & operator
@ximinez ximinez force-pushed the ximinez/acquireAsyncDispatch branch from d084704 to 84c9fc1 Compare November 11, 2025 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

SkipRunCI Skips running the CI pipelines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants