Skip to content

feat: add index to some metadb tables#11533

Merged
SongZhen0704 merged 1 commit intov6.6from
v66-metadb-add-index
Mar 27, 2026
Merged

feat: add index to some metadb tables#11533
SongZhen0704 merged 1 commit intov6.6from
v66-metadb-add-index

Conversation

@ZhengYa-0110
Copy link
Copy Markdown
Contributor

This PR is for:

  • Server

Affected branches

  • main
  • v7.1
  • v6.6

@ZhengYa-0110
Copy link
Copy Markdown
Contributor Author

@claude review

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Mar 27, 2026

Claude finished @ZhengYa-0110's task in 20m 19s —— View job


GENERAL_COMMENT on PR #11533. The trigger request is code review only (`@claude review`). I reviewed the changed schema/version files and relevant recorder/migrator code paths that depend on `lcuuid` lookups.

Progress

  • Review repository instructions and PR context
  • Inspect changed files and diff against origin/v6.6
  • Assess correctness, safety, and migration behavior
  • Post review feedback

Review

No blocking issues found.

  • server/controller/db/metadb/migrator/schema/rawsql/mysql/ddl_create_table.sql:1127, server/controller/db/metadb/migrator/schema/rawsql/mysql/ddl_create_table.sql:1143, server/controller/db/metadb/migrator/schema/rawsql/mysql/ddl_create_table.sql:1204, and server/controller/db/metadb/migrator/schema/rawsql/mysql/ddl_create_table.sql:1271 add lcuuid indexes for fresh installs on the same four tables that the upgrade script updates in server/controller/db/metadb/migrator/schema/rawsql/mysql/issu/6.6.1.68.sql:28-31, so new and upgraded deployments stay aligned.
  • The migration logic in server/controller/db/metadb/migrator/schema/rawsql/mysql/issu/6.6.1.68.sql:11-21 checks information_schema.statistics before issuing ALTER TABLE, which keeps the change idempotent and avoids creating a duplicate index under a different name on partially patched environments.
  • The version bump is consistent between server/controller/db/metadb/migrator/schema/const.go:23 and server/controller/db/metadb/migrator/schema/rawsql/mysql/issu/6.6.1.68.sql:35.
  • The added indexes match existing lcuuid lookup patterns in recorder code, for example server/controller/recorder/db/operator.go:101, server/controller/recorder/db/operator.go:113, and server/controller/recorder/db/operator.go:125.

Notes

  • Review only; I did not make code changes.
  • I did not run the migration against a live MySQL instance as part of this review.

@ZhengYa-0110 ZhengYa-0110 requested review from SongZhen0704 and xiaochaoren1 and removed request for xiaochaoren1 March 27, 2026 09:44
@SongZhen0704 SongZhen0704 force-pushed the v66-metadb-add-index branch from 0fc4bd7 to 7e6f74c Compare March 27, 2026 10:50
@SongZhen0704 SongZhen0704 enabled auto-merge (rebase) March 27, 2026 10:50
@SongZhen0704 SongZhen0704 merged commit e16e13c into v6.6 Mar 27, 2026
6 of 7 checks passed
@SongZhen0704 SongZhen0704 deleted the v66-metadb-add-index branch March 27, 2026 10:53
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.

2 participants