-
Notifications
You must be signed in to change notification settings - Fork 74
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
RPC: fix numNonVoteTransactions in getPerformanceSamples #1189
Conversation
dc15383
to
542b784
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1189 +/- ##
=======================================
Coverage 82.1% 82.1%
=======================================
Files 886 886
Lines 236397 236397
=======================================
+ Hits 194227 194250 +23
+ Misses 42170 42147 -23 |
I'm actually not completely familiar with how the snapshots are generated, but we do store these values in RocksDB. agave/ledger/src/blockstore_meta.rs Lines 503 to 513 in 9374944
|
Yeah good point, there will be a period of time where the perf samples returned by rpc have a mix of old incorrect values and new correct values. The I think the alternative is to purge old incorrect values from blockstore but that feels like a worse end user experience that the proposed change. @CriesofCarrots do you have any preference here? |
Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis. |
I think serving the old, incorrect values for ~12 hours after restart is acceptable (and agreed, better ux than the purge alternative). |
I think the other discrepancy would be that different node might be returning different counts, depending on if there were upgraded or not. It seems that a feature flag might be a cleaner approach to fix this? |
|
(cherry picked from commit 3f6c567)
Problem
The value
numNonVoteTransactions
returned in the RPCgetPerformanceSamples
endpoint was actually reporting the number of successful non vote transactions that were executed. That field is documented in the RPC docs with the following statement:But before this fix,
numTransactions - numNonVoteTransaction
is actually computing the number of vote transactions + errored non-vote transactions.Summary of Changes
executed_non_vote_transactions_count
whether the non-vote tx failed or succeeded. This value will get fixed on restart since we don't persist the value in snapshotsFixes #