Altinity / Altinity/clickhouse-operator

Operator should add graceful shutdown to the pods

Open
#1,979 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
2.6k
Forks
574
Avg merge
8d 6h
Merged PRs (30d)
6

Description

The ideal graceful flow would be:

  1. SYSTEM STOP MERGES -- no NEW merges start
  2. SYSTEM STOP FETCHES -- no NEW fetches (replication) start
  3. Wait for in-flight merges/fetches to finish
    (query system.merges / system.replicated_fetches to check)
  4. SYSTEM SHUTDOWN -- now safe to kill, nothing in progress

What the operator does today:

  1. SYSTEM SHUTDOWN -- everything in progress gets killed

Upgrades can cause some race condition with various setups.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the operator currently shuts down ClickHouse pods. Compare that flow with the issue's SYSTEM STOP MERGES, SYSTEM STOP FETCHES, in-flight checks through system.merges and system.replicated_fetches, and final SYSTEM SHUTDOWN sequence. Done means upgrades no longer kill active merges or replication fetches during shutdown.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
databases, devops, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.