Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
bb863fa
make number of workers configurable
shortthefomo Mar 19, 2026
4cf8618
minimum needs to be 2 as per currenct implementation
shortthefomo Mar 19, 2026
9d04b24
allow 3/4 of threads to be used
shortthefomo Mar 19, 2026
7022025
fix default
shortthefomo Mar 20, 2026
5a689a3
fix iussues identied on xahaud
shortthefomo Mar 20, 2026
c1ef769
remove unwanted contamination of branches
shortthefomo Mar 20, 2026
653d9f3
fix range issue in config
shortthefomo Mar 20, 2026
b4a7a87
fix check ordering not to cause further issue
shortthefomo Mar 20, 2026
cf849e4
Fix compilation error by removing static from JobQueue::getJobLimit
shortthefomo Mar 26, 2026
bce9a22
refactoring job-queue thread heuristic into a single shared helper
shortthefomo Mar 27, 2026
26a610a
add tests for ranges in config param
shortthefomo Mar 27, 2026
59a64d0
move function to end and adjust error message as copiolet wants
shortthefomo Mar 27, 2026
79cfb50
Merge branch 'develop' into path-workers-2
shortthefomo Mar 27, 2026
85db681
Merge branch 'develop' into path-workers-2
shortthefomo Apr 3, 2026
65a32d7
fix: remove static from JobQueue::getJobLimit to match instance membe…
shortthefomo Apr 3, 2026
0d74761
Merge branch 'develop' into path-workers-2
shortthefomo Apr 14, 2026
b72bd36
Parallelize path request processing in updateAll using batched async …
shortthefomo Apr 14, 2026
d983906
style: apply clang-format to changed files
shortthefomo Apr 15, 2026
b0860bf
Merge branch 'develop' into path-workers-2
shortthefomo Apr 15, 2026
d9a3af8
ci: [DEPENDABOT] bump actions/upload-artifact from 7.0.0 to 7.0.1 (#7…
dependabot[bot] May 19, 2026
93ac1aa
fix: Disable unnecessary sanity-check in VaultDeposit (#7288)
Tapanito May 19, 2026
a2d901f
Merge branch 'develop' into path-workers-2
shortthefomo May 19, 2026
4825a5d
revert: remove parallel batch path request execution, use sequential …
shortthefomo May 20, 2026
9cb0492
feat: Propagate underlying MPT flags to vault shares (#7077)
Tapanito May 20, 2026
a5d238e
docs: Fix some comments to improve readability (#7122)
box4wangjing May 20, 2026
242ce3e
refactor: Fix `sfGeneric` and `sfInvalid` field names (#7300)
mvadari May 20, 2026
9cb0740
fix: Fix multisign and signfor to check for delegate (#7064)
yinyiqian1 May 20, 2026
8c00800
fix: Update pDEX invariant firing under a valid offer deletion (#7118)
shawnxie999 May 20, 2026
a830ab1
style: More clang-tidy identifier renaming (#7290)
godexsoft May 20, 2026
28cc20c
fix: Fix wrong hybrid offer orderbook placement and update `LedgerSta…
shawnxie999 May 21, 2026
afcf6fb
docs: Add --parallel flag to cmake build commands in BUILD.md (#7302)
ricky122-5 May 21, 2026
f6fd5dd
fix: Add null check (#7305)
pratikmankawde May 21, 2026
795dc5e
fix: Avoid principal-zeroing in non-final loan payments at coarse sca…
Tapanito May 21, 2026
7fdaa0a
fix: Fix IOU precision issues in LoanBrokerCover transactions (#7274)
Tapanito May 21, 2026
e24de65
chore: Revert graceful peer disconnection and follow-up fix (#7296)
Tapanito May 21, 2026
7930870
release: Bump version to 3.2.0-b6 (#7311)
bthomee May 21, 2026
1a98182
refactor: Remove dead `fetchBatch` code (#7309)
bthomee May 21, 2026
3547a93
fix: Add assorted MPT/DEX fixes (#7040)
gregtatcam May 21, 2026
5d72587
merge: resolve conflicts from shortthefomo/path-workers-2
shortthefomo May 22, 2026
3c1d5a4
fix merge issue
shortthefomo May 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,11 @@ CheckOptions:
readability-identifier-naming.ParameterCase: camelBack
readability-identifier-naming.FunctionCase: camelBack
readability-identifier-naming.MemberCase: camelBack
readability-identifier-naming.PrivateMemberCase: camelBack
readability-identifier-naming.PrivateMemberSuffix: _
readability-identifier-naming.ProtectedMemberCase: camelBack
readability-identifier-naming.ProtectedMemberSuffix: _
readability-identifier-naming.PublicMemberCase: camelBack
readability-identifier-naming.PublicMemberSuffix: ""
readability-identifier-naming.GlobalFunctionIgnoredRegexp: "^(to_string|hash_append|tuple_hash)$"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
run: ./package/build_pkg.sh

- name: Upload package artifact
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ matrix.artifact_name }}-pkg-${{ needs.generate-version.outputs.version }}
path: |
Expand Down
9 changes: 6 additions & 3 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,16 +427,19 @@ install ccache --version 4.11.3 --allow-downgrade`.
Single-config generators:

```
cmake --build .
cmake --build . --parallel N
```

Multi-config generators:

```
cmake --build . --config Release
cmake --build . --config Debug
cmake --build . --config Release --parallel N
cmake --build . --config Debug --parallel N
```

Replace the `--parallel` parameter N with the desired number of parallel jobs. A common starting point is half of the number of available CPU
cores.

5. Test xrpld.

Single-config generators:
Expand Down
7 changes: 7 additions & 0 deletions cfg/xrpld-example.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,13 @@
#
# Configures the number of threads for performing nodestore prefetching.
#
# [path_workers]
#
# Configures the maximum number of concurrently running jobs of type
# jtUPDATE_PF in the JobQueue. This impacts path update and full order book
# update throughput. Default: 2.
#
# Maximum value is 3/4 of [workers] (with a minimum of 2).
#
#
Comment on lines +834 to 836

Copilot AI Mar 27, 2026

Copy link

Choose a reason for hiding this comment

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

The example config says the maximum is “3/4 of [workers]”, but the code enforces the limit against the effective job-queue worker count (which is auto-derived when [workers] isn’t explicitly set). To avoid misleading operators, consider documenting that the cap is based on the effective worker count (explicit [workers] or the auto-selected default).

Suggested change
# Maximum value is 3/4 of [workers] (with a minimum of 2).
#
#
# Maximum value is 3/4 of the effective JobQueue worker count (explicit
# [workers] or the auto-selected default), with a minimum of 2.
#

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

think this is more confusing.

# [network_id]
Expand Down
22 changes: 11 additions & 11 deletions include/xrpl/basics/TaggedCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,14 @@ class TaggedCache
beast::insight::Collector::ptr const& collector)
: hook(collector->makeHook(handler))
, size(collector->makeGauge(prefix, "size"))
, hit_rate(collector->makeGauge(prefix, "hit_rate"))
, hitRate(collector->makeGauge(prefix, "hit_rate"))

{
}

beast::insight::Hook hook;
beast::insight::Gauge size;
beast::insight::Gauge hit_rate;
beast::insight::Gauge hitRate;

std::size_t hits{0};
std::size_t misses{0};
Expand All @@ -197,27 +197,27 @@ class TaggedCache
class KeyOnlyEntry
{
public:
clock_type::time_point last_access;
clock_type::time_point lastAccess;

explicit KeyOnlyEntry(clock_type::time_point const& lastAccess) : last_access(lastAccess)
explicit KeyOnlyEntry(clock_type::time_point const& lastAccess) : lastAccess(lastAccess)
{
}

void
touch(clock_type::time_point const& now)
{
last_access = now;
lastAccess = now;
}
};

class ValueEntry
{
public:
shared_weak_combo_pointer_type ptr;
clock_type::time_point last_access;
clock_type::time_point lastAccess;

ValueEntry(clock_type::time_point const& lastAccess, shared_pointer_type const& ptr)
: ptr(ptr), last_access(lastAccess)
: ptr(ptr), lastAccess(lastAccess)
{
}

Expand Down Expand Up @@ -246,7 +246,7 @@ class TaggedCache
void
touch(clock_type::time_point const& now)
{
last_access = now;
lastAccess = now;
}
};

Expand Down Expand Up @@ -286,13 +286,13 @@ class TaggedCache
std::string name_;

// Desired number of cache entries (0 = ignore)
int const target_size_;
int const targetSize_;

// Desired maximum cache age
clock_type::duration const target_age_;
clock_type::duration const targetAge_;

// Number of items cached
int cache_count_{0};
int cacheCount_{0};
cache_type cache_; // Hold strong reference to recent objects
std::uint64_t hits_{0};
std::uint64_t misses_{0};
Expand Down
44 changes: 22 additions & 22 deletions include/xrpl/basics/TaggedCache.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
, clock_(clock)
, stats_(name, std::bind(&TaggedCache::collectMetrics, this), collector)
, name_(name)
, target_size_(size)
, target_age_(expiration)
, targetSize_(size)
, targetAge_(expiration)
{
}

Expand Down Expand Up @@ -86,7 +86,7 @@
getCacheSize() const
{
std::scoped_lock const lock(mutex_);
return cache_count_;
return cacheCount_;
}

template <
Expand Down Expand Up @@ -139,7 +139,7 @@
{
std::scoped_lock const lock(mutex_);
cache_.clear();
cache_count_ = 0;
cacheCount_ = 0;
}

template <
Expand All @@ -157,7 +157,7 @@
{
std::scoped_lock const lock(mutex_);
cache_.clear();
cache_count_ = 0;
cacheCount_ = 0;

Check warning on line 160 in include/xrpl/basics/TaggedCache.ipp

View check run for this annotation

Codecov / codecov/patch

include/xrpl/basics/TaggedCache.ipp#L160

Added line #L160 was not covered by tests
hits_ = 0;
misses_ = 0;
}
Expand Down Expand Up @@ -213,21 +213,21 @@
{
std::scoped_lock const lock(mutex_);

if (target_size_ == 0 || (static_cast<int>(cache_.size()) <= target_size_))
if (targetSize_ == 0 || (static_cast<int>(cache_.size()) <= targetSize_))
{
whenExpire = now - target_age_;
whenExpire = now - targetAge_;
}
else
{
whenExpire = now - (target_age_ * target_size_ / cache_.size());
whenExpire = now - (targetAge_ * targetSize_ / cache_.size());

clock_type::duration const minimumAge(std::chrono::seconds(1));
if (whenExpire > (now - minimumAge))
whenExpire = now - minimumAge;

JLOG(journal_.trace())
<< name_ << " is growing fast " << cache_.size() << " of " << target_size_
<< " aging at " << (now - whenExpire).count() << " of " << target_age_.count();
<< name_ << " is growing fast " << cache_.size() << " of " << targetSize_
<< " aging at " << (now - whenExpire).count() << " of " << targetAge_.count();
}

std::vector<std::thread> workers;
Expand All @@ -242,7 +242,7 @@
for (std::thread& worker : workers)
worker.join();

cache_count_ -= allRemovals;
cacheCount_ -= allRemovals;
}
// At this point allStuffToSweep will go out of scope outside the lock
// and decrement the reference count on each strong pointer.
Expand Down Expand Up @@ -280,7 +280,7 @@

if (entry.isCached())
{
--cache_count_;
--cacheCount_;
entry.ptr.convertToWeak();
ret = true;
}
Expand Down Expand Up @@ -317,7 +317,7 @@
std::piecewise_construct,
std::forward_as_tuple(key),
std::forward_as_tuple(clock_.now(), data));
++cache_count_;
++cacheCount_;
return false;
}

Expand Down Expand Up @@ -366,12 +366,12 @@
data = cachedData;
}

++cache_count_;
++cacheCount_;
return true;
}

entry.ptr = data;
++cache_count_;
++cacheCount_;

Check warning on line 374 in include/xrpl/basics/TaggedCache.ipp

View check run for this annotation

Codecov / codecov/patch

include/xrpl/basics/TaggedCache.ipp#L374

Added line #L374 was not covered by tests

return false;
}
Expand Down Expand Up @@ -477,7 +477,7 @@
auto [it, inserted] = cache_.emplace(
std::piecewise_construct, std::forward_as_tuple(key), std::forward_as_tuple(now));
if (!inserted)
it->second.last_access = now;
it->second.lastAccess = now;
return inserted;
}

Expand Down Expand Up @@ -626,7 +626,7 @@
if (entry.isCached())
{
// independent of cache size, so not counted as a hit
++cache_count_;
++cacheCount_;

Check warning on line 629 in include/xrpl/basics/TaggedCache.ipp

View check run for this annotation

Codecov / codecov/patch

include/xrpl/basics/TaggedCache.ipp#L629

Added line #L629 was not covered by tests
entry.touch(clock_.now());
return entry.ptr.getStrong();
}
Expand Down Expand Up @@ -658,7 +658,7 @@
if (total != 0)
hitRate = (hits_ * 100) / total;
}
stats_.hit_rate.set(hitRate);
stats_.hitRate.set(hitRate);

Check warning on line 661 in include/xrpl/basics/TaggedCache.ipp

View check run for this annotation

Codecov / codecov/patch

include/xrpl/basics/TaggedCache.ipp#L661

Added line #L661 was not covered by tests
}
}

Expand Down Expand Up @@ -706,7 +706,7 @@
++cit;
}
}
else if (cit->second.last_access <= whenExpire)
else if (cit->second.lastAccess <= whenExpire)
{
// strong, expired
++cacheRemovals;
Expand Down Expand Up @@ -773,12 +773,12 @@
auto cit = partition.begin();
while (cit != partition.end())
{
if (cit->second.last_access > now)
if (cit->second.lastAccess > now)
{
cit->second.last_access = now;
cit->second.lastAccess = now;

Check warning on line 778 in include/xrpl/basics/TaggedCache.ipp

View check run for this annotation

Codecov / codecov/patch

include/xrpl/basics/TaggedCache.ipp#L778

Added line #L778 was not covered by tests
++cit;
}
else if (cit->second.last_access <= whenExpire)
else if (cit->second.lastAccess <= whenExpire)
{
cit = partition.erase(cit);
}
Expand Down
Loading