dashboard icon indicating copy to clipboard operation
dashboard copied to clipboard

Add a mutex to backend ledger transaction_count and operation_count sums

Open acharb opened this issue 2 years ago • 1 comments

when looking at the ledgers endpoints for dashboard-v2 and dashboard v1 (in prod now) I noticed the tx and op count data are slightly different. I'm guessing it's due to using data in memory as part of the sum equation in the updateCache method, in which case a mutex may help (maybe async-mutex). But some further investigation is probably needed.

Not high priority, they're all fairly close (~95% or higher), and this data is mostly used for visually comparing days in the UI, so data doesn't need to be exact.

acharb avatar Jun 13 '22 21:06 acharb

the keys are different for v1 and v2, that could be also affecting which ledgers are included in each day

acharb avatar Jun 13 '22 21:06 acharb