zodb / relstorage

A backend for ZODB that stores pickles in a relational database.
Other
54 stars 46 forks source link

Should use `extension_bytes` #424

Closed jamadden closed 3 years ago

jamadden commented 3 years ago

Instead of unpickling and re-pickling. This produces a higher-fidelity database copy, and a cheaper one too.

Part of this is having the relstorage.storage.transaction_iterater:RelStorageTransactionRecord not unpickle the ext value when it creates the transaction record.

Another part of it (relevant for zodbconvert) is to make copyTransactionsFrom not re-pickle the extension data if there are already extension_bytes. The change there is to make tpc.begin.AbstractBegin (the implementation of IStorage.tpc_begin()) read the extension_bytes property.

In our test classes that extend IteratorStorage, we'll want to set the class attribute use_extension_bytes to True as part of testing this.

This attribute was added in ZODB 5.6. RelStorage already has a dependency on ZODB 5.5. I think it should be OK to bump that to 5.6.