• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zopefoundation / ZODB / 14421359493 / 1
84%
master: 84%

Build:
DEFAULT BRANCH: master
Ran 12 Apr 2025 04:25PM UTC
Files 116
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Apr 2025 04:22PM UTC coverage: 83.824% (+0.05%) from 83.778%
14421359493.1

push

github

web-flow
FileStorage: Fix restore to correctly check restored data content (#409)

In commit 8160568b (FileStorage: fix rare data corruption when using
restore after multiple undos (#395)) we fixed FileStorage.restore to
work correctly in the presence of multiple undos for the same oid in the
same transaction by reworking oid data records of one transaction to be
all scanned in the loop. But unfortunately that commit introduced a
regression:

When restore is instructed to do an undo, in other words, to make a copy
of oid data by referring to that data by backpointer, it checks content
of the pointed-to record, and if data content there does not match data
content passed to restore call, the copy-via-backpointer optimization is
silently disabled. However 8160568b contained a thinko when doing the
check: after discovering pointed-to oid data record, the intent there it
was to load actual data from there, but the loading was performed not
from the offset where the data lives, but from then beginning of some
next data-record header instead. As the result the
"copy-via-backpointer" was always disabled.

-> Fix that by seeking to correct position before loading the data.

I originally discovered this issue by running Zodbtools tests wrt ZODB6
and getting failures for `zodb restore` related tests with difference in
between restored and expected states as e.g.

    @@ -296,15 +296,21 @@
     txn 0285cbad77777800 " "
     user "root1.0\nYour\nMagesty "
     description "undo 1.0\nmore detailed description\n\nzzz ...\t"
     extension ""
    -obj 0000000000000005 from 0285cbad6962fd19
    +obj 0000000000000005 30 sha1:5fe26f631
    +c__main__
    +Object
    +q^A.U^Ea1.22q^B.

/cc @d-maurer
/reviewed-by @perrinjerome
/reviewed-on https://github.com/zopefoundation/ZODB/pull/409

2439 of 3540 branches covered (68.9%)

13338 of 15912 relevant lines covered (83.82%)

0.84 hits per line

Source Files on job 14421359493.1
  • Tree
  • List 116
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 14421359493
  • f02701bf on github
  • Prev Job for on master (#14309380719.1)
  • Next Job for on master (#14428087933.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc