Skip to content

docs(mem_wal): warn about stalled-writer race when WAL GC is added#6699

Merged
Xuanwo merged 1 commit into
lance-format:mainfrom
hamersaw:docs/wal-stalled-writer-gc
May 7, 2026
Merged

docs(mem_wal): warn about stalled-writer race when WAL GC is added#6699
Xuanwo merged 1 commit into
lance-format:mainfrom
hamersaw:docs/wal-stalled-writer-gc

Conversation

@hamersaw
Copy link
Copy Markdown
Contributor

@hamersaw hamersaw commented May 6, 2026

There is a corner case where GC can cleanup WAL log entries allowing a stalled writer (that has been fenced) to successfully acknowledge writes that are invalid. Since we do not have a GC process in OSS, because maintaining a long-running process isn't possible on the ShardWriter handle, this needs to be handled by whatever GC implementation is devised.

Fencing relies on a stalled writer's put-if-not-exists colliding with the
new writer's entry at the same WAL position. Once a future GC implementation
deletes those entries, the stalled writer's PUT can land on empty space and
silently acknowledge a write that will never be replayed. Document the
hazard alongside the GC rules so implementations compensate (re-check fence
on success, encode epoch in the filename, etc.).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 6, 2026
@Xuanwo Xuanwo merged commit 68ab440 into lance-format:main May 7, 2026
4 checks passed
@hamersaw hamersaw deleted the docs/wal-stalled-writer-gc branch May 7, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants