Skip to content

loaded db and live db stats do not match #351

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

Open
dpetran opened this issue Jan 24, 2023 · 6 comments
Open

loaded db and live db stats do not match #351

dpetran opened this issue Jan 24, 2023 · 6 comments
Assignees
Labels
bug Something isn't working as expected

Comments

@dpetran
Copy link
Contributor

dpetran commented Jan 24, 2023

fluree.db.json-ld.reify/merge-flakes calculates the size of all the flakes, whereas fluree.db.json-ld.transact/final-db calculates the size of the asserts and subtracts the size of the retracts.

The (-> db :stats :size) should be the same on a live db and on that same db after load.

@cap10morgan
Copy link
Contributor

cap10morgan commented Jan 24, 2023

branch with failing tests for this (they're in f.d.json-ld.api-test in the :stats equality checks in the single and multi-cardinality load tests): https://github.com/fluree/db/tree/fix/inconsistent-db-stats

@dpetran
Copy link
Contributor Author

dpetran commented Jan 24, 2023

asserts - retracts measurement tells us the size of the flakes an [?s ?p ?o] query would return.

asserts + retracts tells us the rough size the whole db would take on disk - not exactly, since there's the index node overhead, but gives you a rough idea of how much space you would need.

I'm not sure which measure is more useful.

@cap10morgan
Copy link
Contributor

Or maybe they're both useful and we just need to come up with good names for the two different keys in :stats?

@dpetran dpetran added the bug Something isn't working as expected label Jan 25, 2023
@dpetran
Copy link
Contributor Author

dpetran commented Jan 25, 2023

@bplatz do you have a preference here? I think all we need is a decision of one or the other or both, and I think you have more customer context to be able to make that call.

@bplatz
Copy link
Contributor

bplatz commented Jan 26, 2023

@dpetran I've always considered the total size of the DB to be important - both 't' values and size, as that would give someone a sense of how many commits and how large they are. Also if the size was a proxy for someone using it for billing, total size would be more important here as well.

@dpetran
Copy link
Contributor Author

dpetran commented Jan 26, 2023

Alright, then we will just do the asserts + retracts implementation to fix this bug.

@JaceRockman JaceRockman self-assigned this Mar 25, 2024
JaceRockman added a commit that referenced this issue Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

4 participants