Skip to content

Make local ClickHouse installs atomic and concurrency-safe - #502

Open
sdairs wants to merge 1 commit into
issue-459-version-network-bounds-v2from
issue-456-atomic-installs
Open

Make local ClickHouse installs atomic and concurrency-safe#502
sdairs wants to merge 1 commit into
issue-459-version-network-bounds-v2from
issue-456-atomic-installs

Conversation

@sdairs

@sdairs sdairs commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Give every install a UUID-named staging directory that only its owning process cleans up.
  • Serialize target-version and master-sidecar commits with cross-process file locks, then atomically rename complete binaries and sidecar files into place.
  • Invalidate matching master metadata before the binary swap so interruption preserves a complete binary without a stale ETag.
  • Add deterministic subprocess coverage for same-version and different-version races, interruption, and stale staging, asserting final binary contents and sidecar state.

Tests

  • cargo test -p clickhousectl version_manager::install::tests -- --nocapture (10 passed)
  • cargo test -p clickhousectl (all passed)
  • cargo test -p clickhousectl --no-default-features (all passed)
  • cargo build -p clickhousectl
  • cargo fmt --all --check
  • cargo clippy -p clickhousectl --all-targets -- -D warnings

Stack

Closes #456

Stack created with GitHub Stacks CLIGive Feedback

@sdairs sdairs changed the title issue 456 atomic installs Make local ClickHouse installs atomic and concurrency-safe Aug 24, 2026
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.

Make local ClickHouse installs atomic and concurrency-safe

1 participant