Skip to content
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

Make copyTransactionsFrom much faster in history-free storages when possible #431

Merged
merged 9 commits into from Oct 13, 2020

Conversation

jamadden
Copy link
Member

By using record_iternext and only copying current objects. The big win comes from batching up the transaction commits. The speed increase seems to be at least 5x or more.

Disabled with the --incremental option of zodbconvert; see updated documenattion.

There are additional tests to make sure blobs are copied, and for the handling of storage wrappers like zc.zlibstorage.

Fixes #425

…rage.

Increases the copy rate from 1.01MB/s to 5.58MB/s on a sample of transactions, or 180000 objects to 417000 objects.

Outstanding issues:

zodbconvert's incremental mode doesnt work.
zc.zlibstorage doesn't work on the destination during the copy. Maybe that's ok.
Because you could just not use a decompressing wrapper on the source to get identical copies.
Logging is messed up.
…ations when using incremental zodbconvert.

This is still not fully safe, though: If you start copying, stop, start again in incremental mode, because one copies by OID and the other by TID you could wind up missing data.

Needs more thought.
Add tests with blobs, more incremental testing, and tests with history-free destinations.

This found, and added a workaround for, zopefoundation/ZODB#330
We'll manually transform the data there, allowing us to replace the wrappers copyTransactionsFrom method with our own optimized implementation in registerDB.
…unate) interaction betwenn incremental copies and fast copies.
@jamadden jamadden merged commit df5aa16 into master Oct 13, 2020
@jamadden jamadden deleted the issue425 branch October 13, 2020 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

zodbconvert: Optionally lose transaction history for performance speedup
1 participant