Skip to content

fix(cold): drain in-flight reads before executing writes#39

Merged
prestwich merged 1 commit intomainfrom
prestwich/eng-1980-drain-reads-before-writes
Mar 11, 2026
Merged

fix(cold): drain in-flight reads before executing writes#39
prestwich merged 1 commit intomainfrom
prestwich/eng-1980-drain-reads-before-writes

Conversation

@prestwich
Copy link
Member

@prestwich prestwich commented Mar 9, 2026

Summary

  • The task runner's select! loop executed writes immediately without draining spawned read tasks, allowing concurrent read/write access to the backend. this can cause inconsistent results for certain multi-tx read operations
  • Added TaskTracker::close() + wait() + reopen() before each write to ensure exclusive backend access, giving RwLock-like semantics

Closes ENG-1980

Test plan

  • cargo clippy -p signet-cold --all-features --all-targets
  • cargo clippy -p signet-cold --no-default-features --all-targets
  • cargo +nightly fmt
  • cargo t -p signet-cold

🤖 Generated with Claude Code

The task runner's select loop executed writes immediately without
waiting for spawned read tasks to complete, allowing reads and writes
to race on the backend. Close and drain the TaskTracker before each
write to ensure exclusive access, then reopen for subsequent reads.

Closes ENG-1980

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@prestwich prestwich merged commit 16d965e into main Mar 11, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants