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
ndb: add verify method and cleanup code #1004
Conversation
Please split to individual commits. |
I kind of fail to see the point, but I'll do it anyways just to please you. |
These are essentially unrelated changes, hence they belong to separate commits. It might not seem that valuable to the author, but it makes reviewing much easier, and the biggest value of strict commit-per-logical-change comes over time from bisecting, cherry-picking etc. Lumping such changes into one pull-request is absolutely fine of course. |
I get that, but I was under the impression that ndb is still marked as experimental. (That's about to change in the near future, though.) Anyway, force pushed to multiple commits. |
We never needed to order by pkgid or slot number, so simplify the code.
This is not used as we re-read all slots everytime a package is added or deleted.
Reuse the hash if the size matches. This was actually the original intention, but for some reason the code was disabled by always freeing the hash.
This adds a verify method for ndb's Packages.db database. The Index.db database is currently not verified.
This seems to saner as the somewhat unreliable current time. This element is not used in normal database operation, it is for repair tools that need to decide which blob to take if two blobs have the same pkgid.
Oh, I don't see experimental status affecting change-per-commit requirement at all, as the commits will remain forever regardless of the status. Various other aspects can be somewhat relaxed on experimental code of course. Anyway, splitting up much appreciated, thanks. |
This commit adds a verify method for ndb's Packages.db database.
It also cleans up the pkgdb code a bit:
if no packages were in the database