8000 fix(controller): propagate error when HostCreateTables fails during table migration by Tyagiquamar · Pull Request #2077 · Altinity/clickhouse-operator · GitHub
[go: up one dir, main page]

Skip to content

fix(controller): propagate error when HostCreateTables fails during table migration - #2077

Merged
sunsingerus merged 1 commit into
Altinity:0.27.4from
Tyagiquamar:fix/2021-propagate-table-migration-error
Sep 15, 2026
Merged

sunsingerus merged 1 commit into
Altinity:0.27.4from
Tyagiquamar:fix/2021-propagate-table-migration-error

Conversation

@Tyagiquamar
Copy link
Copy Markdown

Fixes #2021

Problem

In pkg/controller/chi/worker-migrator.go, when HostCreateTables(ctx, host) failed with an error, migrateTables logged the error but did not return it. As a result:

  1. It proceeded to log "Tables added successfully..." despite table creation failing.
  2. It pushed PushHostTablesCreated to status, incorrectly marking the host as having tables populated.
  3. It returned nil, causing reconciler caller routines (reconcileHostTables / reconcileHostMainDomain) to proceed as if schema migration succeeded.

Solution

  • Return err immediately when w.ensureClusterSchemer(host).HostCreateTables(ctx, host) fails in migrateTables.
  • Prevent false EventReasonCreateCompleted logging and PushHostTablesCreated status updates upon failure.

Signed-off-by: Tyagiquamar tyagiquamar@gmail.com

…able migration (fixes Altinity#2021)

Signed-off-by: Tyagiquamar <mohdquamartyagi@gmail.com>
@alex-zaitsev
alex-zaitsev changed the base branch from 0.28.0 to 0.27.4 September 8, 2026 10:06
@therealpandey
Copy link
Copy Markdown

+1, ran into the same issue.

@sunsingerus
sunsingerus merged commit d15f357 into Altinity:0.27.4 Sep 15, 2026
@Slach Slach mentioned this pull request Nov 2, 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.

3 participants

0