-
Notifications
You must be signed in to change notification settings - Fork 155
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
[leo_backend_db] The number mq-stats displays can be different from the number leo_backend_db actually stores #731
Comments
This fix works for me; after starting node which had wrong number in queue normally the numbers were still wrong, so I killed |
@vstax thanks for confirming.
Probably yes though I'm a little bit worried about because the number of records was 0 right? (as you mentioned Just in case, we will do various benchmarks that cover not only massive active records but less records with fragmented (not compacted) in leo_mq. |
@mocchira I think it's 0 because when restarting node again and again on older version (1.3.4), I got more and more messages from queue processed following each restart (experiment that was described at #725 (comment)). For storage_2, eventually restarts stopped doing anything - the number of messages was 14880 at that point, and it didn't try to do anything upon restart. So I assume this number is fake and it's actually 0. And after doing SIGTERM and another restart on latest dev version, as soon as node finished starting up and shown up as "running" on manager, the number of messages was 0. There is one thing that bothers me, though:
I have changed |
Got it.
It's expected. |
Found through the investigation on #725.
This inconsistency can happen in case leo_storage restarted by heart because https://github.com/leo-project/leo_backend_db/blob/1.2.12/src/leo_backend_db_server.erl#L484-L489 may not be called in an abnormal shutdown.
Solution
To make its number precise, we need to count items stored in leo_backend_db at the init callback.
The text was updated successfully, but these errors were encountered: