Commit a9853038 authored by Jérome Perrin's avatar Jérome Perrin Committed by Kirill Smelkov

zodbcommit: include the status of transaction

even though the interface of IStorageRestorable.tpc_begin does not
have a "status" argument, it is described in the notes below that the
actual implementation uses it:

https://github.com/zopefoundation/ZODB/blob/0632974d/src/ZODB/interfaces.py#L950-L956

This is used by FileStorage:

https://github.com/zopefoundation/ZODB/blob/0632974d/src/ZODB/FileStorage/format.py#L30-L39

and the storage methods seem to accept this argument:

https://github.com/zopefoundation/ZODB/blob/0632974d/src/ZODB/BaseStorage.py#L182
https://github.com/zopefoundation/ZEO/blob/e5637818/src/ZEO/ClientStorage.py#L888
https://lab.nexedi.com/nexedi/neoppod/blob/fd87e153/neo/client/app.py#L473

Propagating the status fixes some cases where restoring commits did not
recreate a storage that is byte-to-byte equivalent. This happened with
a FileStorage that was packed and contained transactions with "p"
status.
Co-authored-by: Kirill Smelkov's avatarKirill Smelkov <kirr@nexedi.com>
Reviewed-on: nexedi/zodbtools!24
parent 1b480c93
Pipeline #29706 failed with stage
in 0 seconds