Skip to content

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

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

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
@sdairs
sdairs force-pushed the issue-459-version-network-bounds-v2 branch from 1fa8593 to edeac8d Compare August 25, 2026 12:11
@sdairs
sdairs force-pushed the issue-456-atomic-installs branch from 89575ef to 0f36190 Compare August 25, 2026 12:11

@iskakaushik iskakaushik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@sdairs
sdairs force-pushed the issue-459-version-network-bounds-v2 branch from edeac8d to 5842ef1 Compare August 25, 2026 22:10
@sdairs
sdairs force-pushed the issue-456-atomic-installs branch from 0f36190 to 86f17b0 Compare August 25, 2026 22:11
@sdairs

sdairs commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #545 in stack #563.

@sdairs sdairs closed this Aug 27, 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

2 participants