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

zopefoundation / ZODB / 8315248646
84%

Build:
DEFAULT BRANCH: master
Ran 17 Mar 2024 01:20PM UTC
Jobs 1
Files 116
Run time 1min
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

04 Mar 2024 12:38PM UTC coverage: 83.744% (+0.02%) from 83.726%
8315248646

push

github

web-flow
FileStorage: fix rare data corruption when using restore after multiple undos (#395)

* FileStorage: fix data corruption when using restore after multiple undos

The case of a history like this:
 - T0 initialize an object in state 0
 - T1 modifies object to state 1
 - T2 modifies object to state 2
 - T3 undo T2 and T1, bringing back to state 0
 - T4 modified object to state 3
 - T5 undo T4, bringing back object to state 0

was not correct after `restore`: the state is 1 instead of the expected 0.

This is because T3 contains two data records:
 - an undo of T2, with a backpointer to the data of state 1
 - an undo of T1, with a backpointer to the data of state 0
When restoring T5 (the undo of T4), the transaction is made of one data
record, with a backpointer that is copied from the backpointer from T3,
but this uses backpointer from the first record for this object, which
is incorrect, in such a case where there is more than one backpointer
for the same oid, we need to iterate in all data record to find the
oldest version.

Co-authored-by: Kirill Smelkov <kirr@nexedi.com>

2879 of 4051 branches covered (71.07%)

38 of 41 new or added lines in 3 files covered. (92.68%)

2 existing lines in 1 file now uncovered.

13348 of 15939 relevant lines covered (83.74%)

0.84 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
81.08
-0.08% src/ZODB/FileStorage/FileStorage.py

Uncovered Existing Lines

Lines Coverage ∆ File
2
81.08
-0.08% src/ZODB/FileStorage/FileStorage.py
Jobs
ID Job ID Ran Files Coverage
1 8315248646.1 17 Mar 2024 01:20PM UTC 116
83.74
Source Files on build 8315248646
  • Tree
  • List 116
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 8160568b on github
  • Prev Build on master (#7861799732)
  • Next Build on master (#8409138390)
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

© 2025 Coveralls, Inc