rippled icon indicating copy to clipboard operation
rippled copied to clipboard

fix: order book update variable swap:

Open seelabs opened this issue 1 year ago • 4 comments

This is likely the result of a typo when the code was simplified.

Context of Change

This was reported by @sublimator in https://github.com/XRPLF/rippled/issues/4790

Type of Change

  • [x ] Bug fix (non-breaking change which fixes an issue)

seelabs avatar Jan 18 '24 16:01 seelabs

It just occurred to me that, since Apr 2022 when the buggy code was deployed, we were more-or-less performing full book update every time (instead of the intended every 25600 ledgers). When this PR is released we will bump it to every 25600 ledgers. This will probably have performance implications.

Bronek avatar Jan 19 '24 15:01 Bronek

we were more-or-less performing full book update every time

This is just from (foggy) memory at this point, but I think the take away I got was that it was simply NOT showing new order book pairs (which doesn't really happen all that often) until a restart, and was doing LESS work if anything. But I could have been wrong and/or misremembering. But yeah, if it does start doing the work it was supposed to, I guess there will be perf implications.

sublimator avatar Jan 21 '24 05:01 sublimator

notes

  • This change should only affect path finding. No amendment needed.
  • Possible perf impact, but only back to old/previous behavior.

Internal tracker: RPFC-105

intelliot avatar Jan 26 '24 01:01 intelliot

Testable:

  • Notice that the bug snuck in and unit tests pass either way - that's not good.
  • It would be good to add a test case. Let's try to write the test.

intelliot avatar Jan 26 '24 01:01 intelliot

Rebased onto the tip of develop. Will merge after CI passes

seelabs avatar Mar 12 '24 20:03 seelabs

Codecov Report

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

Project coverage is 61.65%. Comparing base (22b7518) to head (06c46e4). Report is 2 commits behind head on develop.

Files Patch % Lines
src/ripple/app/ledger/OrderBookDB.cpp 0.00% 0 Missing and 1 partial :warning:
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4890   +/-   ##
========================================
  Coverage    61.65%   61.65%           
========================================
  Files          806      806           
  Lines        70967    70967           
  Branches     36690    36690           
========================================
+ Hits         43752    43755    +3     
+ Misses       19856    19855    -1     
+ Partials      7359     7357    -2     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Mar 12 '24 21:03 codecov-commenter