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

bedrock-kv / bedrock / 3544b7dafb485212e82e5f58a951d01453655913
82%

Build:
DEFAULT BRANCH: develop
Ran 15 Aug 2026 01:08PM UTC
Jobs 1
Files 215
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

15 Aug 2026 01:07PM UTC coverage: 73.101% (+0.1%) from 72.989%
3544b7dafb485212e82e5f58a951d01453655913

push

github

web-flow
Abort transactions whose read version predates pruned conflict history (bedrock-qzr.1) (#116)

## Summary

Fixes a silent serializability violation in the resolver
(bedrock-qzr.1).

The resolver sweeps conflict entries older than `version_retention_ms`
(default 6s), but `Conflicts.check_conflicts/3` had no floor: a
transaction arriving with a read version below the pruned horizon found
no overlapping entries and **committed**, even when a conflicting write
in the pruned range existed. `State.oldest_version` was set at init and
never advanced or consulted.

## Fix

- `Conflicts` now carries an `oldest_version` floor (`nil` = unbounded,
preserving existing unit-test/bench behavior of `new/0`).
- `remove_old_conflicts/2` advances the floor to the prune horizon
(monotonic), so sweeping and floor-advancement are inseparable by
construction.
- `check_conflicts/3` aborts any read version below the floor before
walking entries — FDB `transaction_too_old` parity. The client sees a
normal abort and retries with a fresh read version.
- The resolver seeds the floor with its recovery `last_version` (it has
no history before that either). The dead `State.oldest_version` field is
removed; the floor lives in `Conflicts`, where it is enforced.

## Tests

- New `conflicts_test.exs` covers floor semantics: seeded floor,
advancement on prune, monotonicity, unknowable-history aborts, and that
at-or-above-floor conflicts still detect.
- New server-level regression drives the exact ticket repro through the
GenServer: commit a write, let the sweep prune it, then submit a
conflicting old-read-version transaction — previously `{:ok, [], _}`
(committed), now aborted.

Full suite: 2530 tests, 0 failures; credo --strict, dialyzer, and
--warnings-as-errors clean.

Follow-up filed as bedrock-b28: the existing conflict_resolution
property test encodes read conflicts in a flat map shape that
`Transaction.encode` silently drops, making its read-abort assertions
vacuous.

4 of 4 new or added lines in 1 file covered. (100.0%)

5745 of 7859 relevant lines covered (73.1%)

985.03 hits per line

Jobs
ID Job ID Ran Files Coverage
1 3544b7dafb485212e82e5f58a951d01453655913.1 15 Aug 2026 01:08PM UTC 215
73.1
GitHub Action Run
Source Files on build 3544b7dafb485212e82e5f58a951d01453655913
  • Tree
  • List 215
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 3544b7da on github
  • Prev Build on develop (#D4EE6725...)
  • Next Build on develop (#D2892550...)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc