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

zopefoundation / ZODB / 1061
84%

Build:
DEFAULT BRANCH: master
Ran 31 Jul 2020 12:31PM UTC
Jobs 6
Files 51
Run time 4min
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

pending completion
1061

push

travis-ci

navytux
Kill leftovers of pre-MVCC read conflicts

In the early days, before MVCC was introduced, ZODB used to raise
ReadConflictError on access to object that was simultaneously changed by
another client in concurrent transaction. However, as
doc/articles/ZODB-overview.rst says

	Since Zope 2.8 ZODB has implemented **Multi Version Concurrency Control**.
	This means no more ReadConflictErrors, each transaction is guaranteed to be
	able to load any object as it was when the transaction begun.

So today the only way to get a ReadConflictError should be

  1) at commit time for an object that was requested to stay unchanged
     via checkCurrentSerialInTransaction, and

  2) at plain access time, if a pack running simultaneously to current
     transaction, removes object revision that we try to load.

The second point is a bit unfortunate, since when load discovers that
object was deleted or not yet created, it is logically more clean to
raise POSKeyError. However due to backward compatibility we still want
to raise ReadConflictError in this case - please see comments added to
MVCCAdapter for details.

Anyway, let's remove leftovers of handling regular read-conflicts from
pre-MVCC era:

Adjust docstring of ReadConflictError to explicitly describe that this
error can only happen at commit time for objects requested to be
current, or at plain access if pack is running simultaneously under
connection foot.

There were also leftover code, comment and test bits in Connection,
interfaces, testmvcc and testZODB, that are corrected/removed
correspondingly. testZODB actually had ReadConflictTests that was
completely deactivated: commit b0f992fd ("Removed the mvcc option..."; 2007)
moved read-conflict-on-access related tests out of ZODBTests, but did not
activated moved parts at all, because as that commit says when MVCC is
always on unconditionally, there is no on-access conflicts:

    Removed the mvcc option.  Everybody wants mvcc and removing us lets us
    simplify ... (continued)

6481 of 8543 relevant lines covered (75.86%)

4.52 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1061.1 (ZOPE_INTERFACE_STRICT_IRO=1) 31 Jul 2020 12:31PM UTC 0
74.46
Travis Job 1061.1
2 1061.2 (ZOPE_INTERFACE_STRICT_IRO=1) 31 Jul 2020 12:31PM UTC 0
75.55
Travis Job 1061.2
3 1061.3 (ZOPE_INTERFACE_STRICT_IRO=1) 31 Jul 2020 12:31PM UTC 0
75.51
Travis Job 1061.3
4 1061.4 (ZOPE_INTERFACE_STRICT_IRO=1) 31 Jul 2020 12:33PM UTC 0
75.51
Travis Job 1061.4
5 1061.5 (ZOPE_INTERFACE_STRICT_IRO=1) 31 Jul 2020 12:31PM UTC 0
75.59
Travis Job 1061.5
8 1061.8 (ZOPE_INTERFACE_STRICT_IRO=1 PURE_PYTHON=1) 31 Jul 2020 12:35PM UTC 0
75.57
Travis Job 1061.8
Source Files on build 1061
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1061
  • 3a493b01 on github
  • Prev Build on master (#1048)
  • Next Build on master (#1069)
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