Retry-aware commits with full backoff control
Summary
Lode v0.9.0 adds opt-in automatic CAS retry on snapshot conflict for both Dataset and Volume, eliminating the need for callers to implement retry loops. The Volume option surface is unified with Dataset's shared Option interface, removing the separate VolumeOption type.
Highlights
- Opt-in CAS retry:
WithRetryCount(n)enables bounded automatic retry within the commit path. Data files are written once — only the manifest re-parent and pointer CAS are retried. - Full backoff customization:
WithRetryBaseDelay(d),WithRetryMaxDelay(d),WithRetryJitter(j)for jittered exponential backoff tuning. Defaults: 10ms base, 2s max, full jitter. - Unified Option interface:
NewVolumenow accepts the sameOptiontype asNewDatasetandNewDatasetReader. Options that don't apply return an error at construction time. WithChecksumworks everywhere: Replaces the Volume-specificWithVolumeChecksum— one option for Dataset file checksums and Volume block checksums.
Breaking Changes
VolumeOptiontype removed — replace withOptionWithVolumeChecksum(c)removed — replace withWithChecksum(c)
Upgrade Notes
Search-and-replace migration:
lode.VolumeOption→lode.Optionlode.WithVolumeChecksum(→lode.WithChecksum(
Retry is opt-in: default behavior (0 retries) is unchanged. No data migration required.
References
CONTRACT_WRITE_API.md— Automatic retry semanticsCONTRACT_VOLUME.md— Unified Option interface, Volume retry- #163 — Originating issue
Full Changelog: v0.8.0...v0.9.0