Skip to content

fix(mysql): make semisync accountProvision statements idempotent#3098

Draft
weicao wants to merge 1 commit into
mainfrom
helios/mysql-account-provision-idempotent
Draft

fix(mysql): make semisync accountProvision statements idempotent#3098
weicao wants to merge 1 commit into
mainfrom
helios/mysql-account-provision-idempotent

Conversation

@weicao

@weicao weicao commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Fixes #3097.

Four-statement change in _helpers.tpl: CREATE USERCREATE USER IF NOT EXISTS for kbdataprotection / kbprobe / kbmonitoring / proxysql, matching what _orc.tpl already does. GRANTs are already idempotent. kbadmin / kbreplicator (the select 1; placeholder provisioning) are deliberately NOT touched here — that is a separate design question tracked in the review report (their real creation currently happens via the syncer sidecar).

Render-verified with helm template. Runtime validation before undraft: re-run accountProvision against an existing account — action must succeed instead of ERROR 1396.

🤖 Generated with Claude Code

accountProvision can be retried by the controller/kbagent; CREATE USER
without IF NOT EXISTS fails with ERROR 1396 on re-execution and the
provision never converges. Align kbdataprotection/kbprobe/kbmonitoring/
proxysql with the orc variant's CREATE USER IF NOT EXISTS.

Fixes #3097

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (35e0ded) to head (63cba4c).

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #3098   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files        144     144           
  Lines      23013   23013           
=====================================
  Misses     23013   23013           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

mysql: semisync accountProvision statements are not idempotent (CREATE USER without IF NOT EXISTS)

2 participants