fix: (DRAFT) Combine #5531 and #7763#7793
Conversation
- Uses a loop in case the size grows while the lock is free. Guarantees the result vector will not need to allocate under lock.
Co-authored-by: xrplf-ai-reviewer[bot] <266832837+xrplf-ai-reviewer[bot]@users.noreply.github.com>
- Make it very unlikely that the allocation loop will ever need to run
more than once. Recover gracefully if it does.
- Prevent livelock by limiting the total possible number of iterations.
- If this ever happens, throw our metaphorical hands in the air, and
allocate under lock.
- Pad the size before allocating to give the cache a little room to grow
while not holding the lock.
- Pad by less on each iteration.
- Assert that no more than two iterations occur. Even two is probably
overkill, but this allows for rare edge case scenarios. e.g. The
cache is very small, the allocation takes a long time (which is
contradictory) and a handful of items get added, overcoming the
padding.
Co-authored-by: xrplf-ai-reviewer[bot] <266832837+xrplf-ai-reviewer[bot]@users.noreply.github.com>
- Hopefully the AI bots will stop telling me to change it now.
…minez/online-delete-gaps * mathbunnyru/set_min_osx_target: Document minimum macOS supported version build: Set CMAKE_OSX_DEPLOYMENT_TARGET to 26.0
|
If only the most recent commit is unsigned, you can run:
If multiple commits are unsigned, you can run:
If you're new to commit signing, there are different ways to set it up: Sign commits with
|
- Hopefully, it'll make it more understandable.
|
This PR has conflicts, please resolve them in order for the PR to be reviewed. |
fcfba84 to
67e4cd2
Compare
|
All conflicts have been resolved. Assigned reviewers can now start or resume their review. |
- Logs whether any recovered nodes are in the TreeNodeCache. - Adds a special case to healthWait() to not pause when the server is DISCONNECTED.
… ximinez/online-delete-gaps2 * mywork/ximinez/online-delete-gaps: fix: Improve Number addition/subtraction rounding (7369) feat: XLS-68: Sponsor, 5887 continuation (7350)
…ximinez/online-delete-gaps2 * XRPLF/ximinez/online-delete-gaps: test: Add tests for check doxygen style (7795) style: Add pre-commit hook to check doxygen style (7794) style: Unify style for all Doxygen comments (7776)
…ximinez/online-delete-gaps2 * XRPLF/ximinez/online-delete-gaps: ci: Run full matrix only on `Ready to merge` or `Full CI build` labeled PRs (7689) fix: Strengthen Clawback invariant checks for MPT balances (7285) test: Add unit tests for IP address related functions (7744) ci: Add Rust to Nix docker image (7571) docs: Add more information about pre-commit hooks and how to set them up (7802) test: Add JSON array size tests (7592) chore: Enable most readability checks (7772) ci: Do not run conflict checker when label is applied (7774) chore: Run clang_tidy_check with `pass_filenames: false` from pre-commit (7800) feat: Add delegate filter param for account_tx RPC (6126) refactor: Move `jss.h` `include` out of `Indexes.h` (7799)
* ximinez/fix-getkeys: Experiment. Do not push Clean up the loop to make it more understandable, add logging fix: Add amendment sponsor for AccountRootsDeletedClean (7801) fix: Update base_uint and test changes released in 3.1.3 (7570) fix: Handle rounding just above kMaxRep more accurately (7389) fix: Document and assert "after" is never null in invariants (7354) Document the reasons for the post-allocation assert Add missed header Use the right type in include/xrpl/basics/TaggedCache.ipp Make the getKeys() allocation more robust Apply suggestion from @xrplf-ai-reviewer[bot] fix: Allocate TaggedCache::getKeys() memory outside of lock
…ximinez/online-delete-gaps2 * XRPLF/ximinez/online-delete-gaps: fix: Re-store nodes missing from both backends during online_delete rotation (7763)
f865fc2 to
c0cd461
Compare
|
This PR has conflicts, please resolve them in order for the PR to be reviewed. |
…ximinez/online-delete-gaps2 * XRPLF/ximinez/online-delete-gaps: fix: Allocate TaggedCache::getKeys() memory outside of lock (7567)
|
All conflicts have been resolved. Assigned reviewers can now start or resume their review. |
…ximinez/online-delete-gaps2 * XRPLF/ximinez/online-delete-gaps: fix: Reject zero CheckID in CheckCancel and CheckCash (7685) ci: Fix workflow launch on matrix-unrelated labels (7812)
High Level Overview of Change
fix: (DRAFT) Combine #5531 and #7763
Context of Change
API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)