ZEO client cache does not accept current records on `loadBefore`
Bug #881493 reported by
Malthe Borch
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ZODB |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
The implementation for `loadBefore` only looks at non-current records even though many (still) current records have a transaction date prior to the requested "before" transaction timestamp.
To post a comment you must log in.
The patches changes the behavior of the `loadBefore` method such that it first looks at a current revision; if that revision was saved prior to the required before date, it's returned. Otherwise, we look at the non-current revisions and pick the most recent before the required date.
This does mean that there will be two reads for a non-current hit – if we have a current revision for that oid in the cache.