8000 Change getNodeFat Missing Node State Tree error into warning by vlntb · Pull Request #5455 · XRPLF/rippled · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Change getNodeFat Missing Node State Tree error into warning #5455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 20, 2025

Conversation

vlntb
Copy link
Collaborator
@vlntb vlntb commented May 28, 2025

High Level Overview of Change

  • In-memory cache is split between multiple instances of TaggedCache (i.e. LedgerHistory, TreeNodeCache, AcceptedLedgerCache and a few more).
  • There is no synchronisation between the parts of the in-memory cache during the sweep.
  • The cached item expiry time depends on the cache size and its relation to the cache target size. As a result, instances of TaggedCache can have different expiry thresholds.
  • The Missing Node: State Tree error manifests itself in the following sequence of events:
  1. processLedgerRequest triggers getLedger, which checks LedgerHistory
  2. The logic that follows then assumes that if the ledger is present in the LedgerHistory, then ledger contents is also preserved in the other cache - TreeNodeCache.
  3. However, since the expiry for the TreeNodeCache can be calculated differently, it could have been already removed from memory by the sweep function.

p.s. Ordering in the Application::doSweep is done correctly in this case (first TreeNodeCache, second - LedgerHistory), but this does not help because of the difference in the sweep expiry time.

Context of Change

Change the Log level to warning and monitor its frequency. If we start seeing frequent occurrences of this event, this might indicate that the target age should be increased.

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 May 28, 2025 15:15
Copy link
codecov bot commented May 28, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 79.1%. Comparing base (8f2f531) to head (ab8fc2d).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
src/xrpld/overlay/detail/PeerImp.cpp 0.0% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #5455     +/-   ##
=========================================
- Coverage     79.1%   79.1%   -0.0%     
=========================================
  Files          817     817             
  Lines        71702   71703      +1     
  Branches      8257    8259      +2     
=========================================
- Hits         56694   56690      -4     
- Misses       15008   15013      +5     
Files with missing lines Coverage Δ
src/xrpld/overlay/detail/PeerImp.cpp 3.7% <0.0%> (ø)

... and 3 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:

@bthomee bthomee added the Trivial Simple change with minimal effect, or already tested. Only needs one approval. label Jun 20, 2025
@bthomee bthomee changed the title getNodeFat Missing Node State Tree error Change getNodeFat Missing Node State Tree error into warning Jun 20, 2025
@bthomee bthomee enabled auto-merge (squash) June 20, 2025 15:05
@bthomee bthomee merged commit 8b3dcd4 into develop Jun 20, 2025
27 of 28 checks passed
@bthomee bthomee deleted the vlntb/RIPD-2446-getNodeFat-error-2 branch June 20, 2025 15:44
@legleux legleux mentioned this pull request Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4BB2
Labels
Trivial Simple change with minimal effect, or already tested. Only needs one approval.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0