Skip to content

DRAFT: rabbit hole: refactor dirAdd to find gaps in "full" directories. #5362

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

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

ximinez
Copy link
Collaborator

@ximinez ximinez commented Mar 21, 2025

I was looking at how dirAdd works. There have been complaints that when an account's directory gets "full", it is very difficult to free it back up, even though there may be many many partial pages, and many gaps in the linked list of directories.

  • This would potentially be very expensive to implement, so don't.
  • However, it might be a good start for a ledger fix option.

High Level Overview of Change

Context of Change

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)

@ximinez ximinez force-pushed the ximinez/directory branch from 79be74d to e8e2895 Compare March 24, 2025 22:43
Copy link

codecov bot commented Mar 24, 2025

Codecov Report

Attention: Patch coverage is 70.42254% with 21 lines in your changes missing coverage. Please review.

Project coverage is 78.1%. Comparing base (1c99ea2) to head (50363f2).

Files with missing lines Patch % Lines
src/xrpld/ledger/detail/ApplyView.cpp 70.4% 21 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #5362     +/-   ##
=========================================
- Coverage     78.1%   78.1%   -0.0%     
=========================================
  Files          795     795             
  Lines        68598   68634     +36     
  Branches      8281    8289      +8     
=========================================
+ Hits         53584   53602     +18     
- Misses       15014   15032     +18     
Files with missing lines Coverage Δ
src/xrpld/ledger/detail/ApplyView.cpp 66.8% <70.4%> (-4.3%) ⬇️

... 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ximinez ximinez force-pushed the ximinez/directory branch 4 times, most recently from 7e95906 to 2f24725 Compare March 31, 2025 21:57
@ximinez ximinez force-pushed the ximinez/directory branch 4 times, most recently from e68c94b to 937abc6 Compare April 8, 2025 01:16
@ximinez ximinez force-pushed the ximinez/directory branch 5 times, most recently from 50363f2 to 6cfd981 Compare April 11, 2025 22:30
ximinez added a commit that referenced this pull request Apr 17, 2025
- Takes a page from #5362, which may turn out to be useful!
ximinez added a commit that referenced this pull request Apr 23, 2025
- Takes a page from #5362, which may turn out to be useful!
ximinez added a commit that referenced this pull request Apr 24, 2025
- Takes a page from #5362, which may turn out to be useful!
@ximinez ximinez force-pushed the ximinez/directory branch from 42bc010 to bfcba1b Compare April 24, 2025 14:50
ximinez added a commit that referenced this pull request Apr 24, 2025
- Takes a page from #5362, which may turn out to be useful!
ximinez added a commit that referenced this pull request Apr 28, 2025
- Takes a page from #5362, which may turn out to be useful!
ximinez added 2 commits April 28, 2025 14:43
- This would potentially be very expensive to implement, so don't.
- However, it might be a good start for a ledger fix option.
@ximinez ximinez force-pushed the ximinez/directory branch from bfcba1b to 5811dfc Compare April 28, 2025 18:43
ximinez added a commit that referenced this pull request Apr 29, 2025
- Takes a page from #5362, which may turn out to be useful!
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.

1 participant