Repository navigation
fix(fulltext2): implement ALTER-column plan hooks for INCLUDE columns (#27964) - #28009
Conversation
…matrixorigin#27964) Renaming or dropping a column referenced in a fulltext2 INCLUDE clause left stale metadata and broke incremental (ISCP CDC) indexing: SHOW CREATE TABLE kept showing the old/dropped column, and post-rename inserts were never indexed (MATCH returned only the pre-rename rows). Root cause: the SQL ALTER path (pkg/sql/plan/vector_index_alter.go) delegates include-column maintenance to optional per-plugin hooks (AlterColumnHooks / RenameColumnRebuildHook). Every vector index (ivfflat/ivfpq/cagra) implements them, but fulltext2 did not, so its INCLUDE metadata was never rewritten and no rebuild was triggered. Fix: add pkg/fulltext2/plugin/plan/alter.go, mirroring ivfflat's alter hooks, so fulltext2's plan.Hooks satisfies the interfaces the SQL layer type-asserts: - HandleAlterRenameColumn -> RenameIncludedColumnsForAlgo (rewrites the INCLUDE name in both IndexDef.IncludedColumns and the IndexAlgoParams JSON via the emitted mo_indexes UPDATE), with catalog.MoIndexFullText2Algo. - RenameColumnRequiresIndexRebuild -> IncludedColumnAffected: renaming an INCLUDE column triggers a COPY rebuild so incremental indexing resumes. - HandleAlterDropColumn / UpdateColumnRequiresIndexRewrite -> IncludedColumnAffected: dropping an INCLUDE column drops the index (ivfflat parity); MODIFY rewrites. No SQL-layer or per-algo switch changes — pure plugin-hook wiring (G-IDXPLUGIN clean). Classic fulltext has no INCLUDE support, so it is unaffected. Tests: - Unit: pkg/fulltext2/plugin/plan/alter_test.go (mirrors ivfflat) covers all four hooks + a compile-time interface assertion. - BVT: test/distributed/cases/pessimistic_transaction/fulltext2/ fulltext2_include_rename.{sql,result} — full matrixorigin#27964 repro using the cdc_tail @wait_expect poll (deterministic): rename INCLUDE col -> SHOW CREATE shows the new name and MATCH returns the post-rename incremental row; covering query serves the INCLUDE column under its new name; drop INCLUDE col drops the index; renaming a non-INCLUDE column leaves the index intact. Validated -m run -g -n: 31/31, 100%. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep review completed on exact head 504aee8.
The plugin-hook fix closes the actual failure chain: Fulltext2 INCLUDE metadata is rewritten in both in-memory IndexDefs and persisted algo_params, the rename is routed through COPY, the affected logical index is rebuilt instead of shallow-cloned, and the async CDC writer is re-registered against the renamed source schema.
Counterexamples checked: both physical Fulltext2 definitions, multiple logical indexes, legacy algo_params fallback, quoted/special identifiers, non-INCLUDE rename, INCLUDE drop, malformed metadata error propagation, ordinary UPDATE/ODKU interaction, and failure/rollback boundaries. Always-async Fulltext2 remains excluded from synchronous DML maintenance, so the new update hook does not add foreground index work.
The COPY/rebuild cost can be substantial for a large table, but it is bounded to this rare schema mutation and the affected indexes; under the current lifecycle it is the correctness boundary that prevents a stale or unregistered CDC writer. The end-to-end BVT proves metadata, rebuild readiness, post-rename incremental search, and covering output. Exact-head Linux UT, SCA, coverage, and BVT are green; diff check is clean. Local package UT was unavailable only because this isolated macOS worktree lacks a matching cgo/libmo.dylib.
Merge Queue Status
This pull request spent 52 minutes 36 seconds in the queue, including 48 minutes 21 seconds running CI. Required conditions to merge
|
### Root cause `TestIssue26640ClusterRestoreRebindsSubscriptionPrivileges` runs a full-cluster restore against the base cluster returned by `embed.RunBaseClusterTests`. A full-cluster restore replaces cluster-wide catalog tables, including `mo_catalog.mo_role_privs`. `SharedTestCluster.Run` keeps that cluster alive for subsequent issue tests and does not rebuild it after the callback changes catalog state or times out. In CI run 33618283377, the restore path replaced `mo_catalog.mo_role_privs`; subsequent unrelated tests using the shared `sys:dump` / `moadmin` session failed with Error 20101 (`do not have privilege to execute the statement`) during normal DDL and account setup or cleanup. The failure therefore came from sharing a cluster across a destructive full-cluster restore, not from the unrelated Data Branch changes. ### Changes - Move only `TestIssue26640ClusterRestoreRebindsSubscriptionPrivileges` into the existing `pkg/tests/issues/isolated` package. - Start a dedicated two-CN test cluster with the authentication, lock-service, and Iceberg settings required by the original test, wait for system bootstrap, and close the cluster with test cleanup. - Preserve the original full SQL scenario and assertions for account ID remapping, publication metadata rebinding, subscription privilege object rebinding, and reader access. - Keep the account-scoped #26640 restore and PITR tests on the shared base-cluster helper because they do not perform a full-cluster catalog replacement. No production code or SQL behavior is changed. ### Issue-to-test proof The moved regression test creates publisher and subscriber accounts, a publication and subscription, roles and grants, takes a cluster snapshot, drops both accounts, restores the full cluster, and verifies: - restored account IDs differ from the source IDs; - publication account and database IDs point to the restored objects; - the subscription role privilege object ID points to the restored subscription database; - the restored subscription reader can query the expected row. The test now owns its cluster lifecycle in the isolated package, which has no shared base cluster. This prevents a failed or catalog-mutating full-cluster restore from affecting unrelated issue tests while retaining direct executable coverage of the original reproduction. BVT is not appropriate for this change: no production SQL contract changed, and the behavior under test is test-cluster ownership and lifecycle isolation. ### Tests run - `.agents/skills/mo-dev/scripts/mo-cgo-test ./pkg/tests/issues/isolated -short -run '^TestIssue26640ClusterRestoreRebindsSubscriptionPrivileges$' -count=1 -timeout=15m` — passed on the final head, 26.185s. - `.agents/skills/mo-dev/scripts/mo-cgo-test ./pkg/tests/issues/isolated -race -short -run '^TestIssue26640ClusterRestoreRebindsSubscriptionPrivileges$' -count=1 -timeout=15m` — passed, 112.612s. - Full normal runs for `pkg/tests/issues` and `pkg/tests/issues/isolated` — passed, 85.837s and 261.079s respectively. - Full race runs for `pkg/tests/issues` and `pkg/tests/issues/isolated` — passed, 512.671s and 317.342s respectively. - `go vet ./pkg/tests/issues ./pkg/tests/issues/isolated` with the repository CGo include and linker flags — passed. - `git diff --check origin/main...HEAD` — passed. The full package runs were completed before the final rebase onto the latest `origin/main`; the rebase added only upstream commit #28009, and the focused normal and race tests were rerun on the final head. ### Residual risks - The isolated test starts one additional two-CN cluster. Its final focused normal run took 26.185s; this is the necessary cost of preventing shared-cluster catalog contamination. - Full-cluster restore remains a long-running integration path with the original bounded 300-second test context and can still expose genuine restore failures. - Because this is a test-fixture isolation change, any remaining CI privilege cascade would indicate another test mutating the shared base cluster. Approved by: @XuPeng-SH
…matrixorigin#27964) (matrixorigin#28009) Renaming or dropping a column referenced in a fulltext2 INCLUDE clause left stale metadata and broke incremental (ISCP CDC) indexing: SHOW CREATE TABLE kept showing the old/dropped column, and post-rename inserts were never indexed (MATCH returned only the pre-rename rows). Root cause: the SQL ALTER path (pkg/sql/plan/vector_index_alter.go) delegates include-column maintenance to optional per-plugin hooks (AlterColumnHooks / RenameColumnRebuildHook). Every vector index (ivfflat/ivfpq/cagra) implements them, but fulltext2 did not, so its INCLUDE metadata was never rewritten and no rebuild was triggered. Fix: add pkg/fulltext2/plugin/plan/alter.go, mirroring ivfflat's alter hooks, so fulltext2's plan.Hooks satisfies the interfaces the SQL layer type-asserts: - HandleAlterRenameColumn -> RenameIncludedColumnsForAlgo (rewrites the INCLUDE name in both IndexDef.IncludedColumns and the IndexAlgoParams JSON via the emitted mo_indexes UPDATE), with catalog.MoIndexFullText2Algo. - RenameColumnRequiresIndexRebuild -> IncludedColumnAffected: renaming an INCLUDE column triggers a COPY rebuild so incremental indexing resumes. - HandleAlterDropColumn / UpdateColumnRequiresIndexRewrite -> IncludedColumnAffected: dropping an INCLUDE column drops the index (ivfflat parity); MODIFY rewrites. No SQL-layer or per-algo switch changes — pure plugin-hook wiring (G-IDXPLUGIN clean). Classic fulltext has no INCLUDE support, so it is unaffected. Tests: - Unit: pkg/fulltext2/plugin/plan/alter_test.go (mirrors ivfflat) covers all four hooks + a compile-time interface assertion. - BVT: test/distributed/cases/pessimistic_transaction/fulltext2/ fulltext2_include_rename.{sql,result} — full matrixorigin#27964 repro using the cdc_tail @wait_expect poll (deterministic): rename INCLUDE col -> SHOW CREATE shows the new name and MATCH returns the post-rename incremental row; covering query serves the INCLUDE column under its new name; drop INCLUDE col drops the index; renaming a non-INCLUDE column leaves the index intact. Validated -m run -g -n: 31/31, 100%. Approved by: @XuPeng-SH
…8019) ### Root cause `TestIssue26640ClusterRestoreRebindsSubscriptionPrivileges` runs a full-cluster restore against the base cluster returned by `embed.RunBaseClusterTests`. A full-cluster restore replaces cluster-wide catalog tables, including `mo_catalog.mo_role_privs`. `SharedTestCluster.Run` keeps that cluster alive for subsequent issue tests and does not rebuild it after the callback changes catalog state or times out. In CI run 33618283377, the restore path replaced `mo_catalog.mo_role_privs`; subsequent unrelated tests using the shared `sys:dump` / `moadmin` session failed with Error 20101 (`do not have privilege to execute the statement`) during normal DDL and account setup or cleanup. The failure therefore came from sharing a cluster across a destructive full-cluster restore, not from the unrelated Data Branch changes. ### Changes - Move only `TestIssue26640ClusterRestoreRebindsSubscriptionPrivileges` into the existing `pkg/tests/issues/isolated` package. - Start a dedicated two-CN test cluster with the authentication, lock-service, and Iceberg settings required by the original test, wait for system bootstrap, and close the cluster with test cleanup. - Preserve the original full SQL scenario and assertions for account ID remapping, publication metadata rebinding, subscription privilege object rebinding, and reader access. - Keep the account-scoped matrixorigin#26640 restore and PITR tests on the shared base-cluster helper because they do not perform a full-cluster catalog replacement. No production code or SQL behavior is changed. ### Issue-to-test proof The moved regression test creates publisher and subscriber accounts, a publication and subscription, roles and grants, takes a cluster snapshot, drops both accounts, restores the full cluster, and verifies: - restored account IDs differ from the source IDs; - publication account and database IDs point to the restored objects; - the subscription role privilege object ID points to the restored subscription database; - the restored subscription reader can query the expected row. The test now owns its cluster lifecycle in the isolated package, which has no shared base cluster. This prevents a failed or catalog-mutating full-cluster restore from affecting unrelated issue tests while retaining direct executable coverage of the original reproduction. BVT is not appropriate for this change: no production SQL contract changed, and the behavior under test is test-cluster ownership and lifecycle isolation. ### Tests run - `.agents/skills/mo-dev/scripts/mo-cgo-test ./pkg/tests/issues/isolated -short -run '^TestIssue26640ClusterRestoreRebindsSubscriptionPrivileges$' -count=1 -timeout=15m` — passed on the final head, 26.185s. - `.agents/skills/mo-dev/scripts/mo-cgo-test ./pkg/tests/issues/isolated -race -short -run '^TestIssue26640ClusterRestoreRebindsSubscriptionPrivileges$' -count=1 -timeout=15m` — passed, 112.612s. - Full normal runs for `pkg/tests/issues` and `pkg/tests/issues/isolated` — passed, 85.837s and 261.079s respectively. - Full race runs for `pkg/tests/issues` and `pkg/tests/issues/isolated` — passed, 512.671s and 317.342s respectively. - `go vet ./pkg/tests/issues ./pkg/tests/issues/isolated` with the repository CGo include and linker flags — passed. - `git diff --check origin/main...HEAD` — passed. The full package runs were completed before the final rebase onto the latest `origin/main`; the rebase added only upstream commit matrixorigin#28009, and the focused normal and race tests were rerun on the final head. ### Residual risks - The isolated test starts one additional two-CN cluster. Its final focused normal run took 26.185s; this is the necessary cost of preventing shared-cluster catalog contamination. - Full-cluster restore remains a long-running integration path with the original bounded 300-second test context and can still expose genuine restore failures. - Because this is a test-fixture isolation change, any remaining CI privilege cascade would indicate another test mutating the shared base cluster. Approved by: @XuPeng-SH
…matrixorigin#27964) (matrixorigin#28009) Renaming or dropping a column referenced in a fulltext2 INCLUDE clause left stale metadata and broke incremental (ISCP CDC) indexing: SHOW CREATE TABLE kept showing the old/dropped column, and post-rename inserts were never indexed (MATCH returned only the pre-rename rows). Root cause: the SQL ALTER path (pkg/sql/plan/vector_index_alter.go) delegates include-column maintenance to optional per-plugin hooks (AlterColumnHooks / RenameColumnRebuildHook). Every vector index (ivfflat/ivfpq/cagra) implements them, but fulltext2 did not, so its INCLUDE metadata was never rewritten and no rebuild was triggered. Fix: add pkg/fulltext2/plugin/plan/alter.go, mirroring ivfflat's alter hooks, so fulltext2's plan.Hooks satisfies the interfaces the SQL layer type-asserts: - HandleAlterRenameColumn -> RenameIncludedColumnsForAlgo (rewrites the INCLUDE name in both IndexDef.IncludedColumns and the IndexAlgoParams JSON via the emitted mo_indexes UPDATE), with catalog.MoIndexFullText2Algo. - RenameColumnRequiresIndexRebuild -> IncludedColumnAffected: renaming an INCLUDE column triggers a COPY rebuild so incremental indexing resumes. - HandleAlterDropColumn / UpdateColumnRequiresIndexRewrite -> IncludedColumnAffected: dropping an INCLUDE column drops the index (ivfflat parity); MODIFY rewrites. No SQL-layer or per-algo switch changes — pure plugin-hook wiring (G-IDXPLUGIN clean). Classic fulltext has no INCLUDE support, so it is unaffected. Tests: - Unit: pkg/fulltext2/plugin/plan/alter_test.go (mirrors ivfflat) covers all four hooks + a compile-time interface assertion. - BVT: test/distributed/cases/pessimistic_transaction/fulltext2/ fulltext2_include_rename.{sql,result} — full matrixorigin#27964 repro using the cdc_tail @wait_expect poll (deterministic): rename INCLUDE col -> SHOW CREATE shows the new name and MATCH returns the post-rename incremental row; covering query serves the INCLUDE column under its new name; drop INCLUDE col drops the index; renaming a non-INCLUDE column leaves the index intact. Validated -m run -g -n: 31/31, 100%. Approved by: @XuPeng-SH
…8019) ### Root cause `TestIssue26640ClusterRestoreRebindsSubscriptionPrivileges` runs a full-cluster restore against the base cluster returned by `embed.RunBaseClusterTests`. A full-cluster restore replaces cluster-wide catalog tables, including `mo_catalog.mo_role_privs`. `SharedTestCluster.Run` keeps that cluster alive for subsequent issue tests and does not rebuild it after the callback changes catalog state or times out. In CI run 33618283377, the restore path replaced `mo_catalog.mo_role_privs`; subsequent unrelated tests using the shared `sys:dump` / `moadmin` session failed with Error 20101 (`do not have privilege to execute the statement`) during normal DDL and account setup or cleanup. The failure therefore came from sharing a cluster across a destructive full-cluster restore, not from the unrelated Data Branch changes. ### Changes - Move only `TestIssue26640ClusterRestoreRebindsSubscriptionPrivileges` into the existing `pkg/tests/issues/isolated` package. - Start a dedicated two-CN test cluster with the authentication, lock-service, and Iceberg settings required by the original test, wait for system bootstrap, and close the cluster with test cleanup. - Preserve the original full SQL scenario and assertions for account ID remapping, publication metadata rebinding, subscription privilege object rebinding, and reader access. - Keep the account-scoped matrixorigin#26640 restore and PITR tests on the shared base-cluster helper because they do not perform a full-cluster catalog replacement. No production code or SQL behavior is changed. ### Issue-to-test proof The moved regression test creates publisher and subscriber accounts, a publication and subscription, roles and grants, takes a cluster snapshot, drops both accounts, restores the full cluster, and verifies: - restored account IDs differ from the source IDs; - publication account and database IDs point to the restored objects; - the subscription role privilege object ID points to the restored subscription database; - the restored subscription reader can query the expected row. The test now owns its cluster lifecycle in the isolated package, which has no shared base cluster. This prevents a failed or catalog-mutating full-cluster restore from affecting unrelated issue tests while retaining direct executable coverage of the original reproduction. BVT is not appropriate for this change: no production SQL contract changed, and the behavior under test is test-cluster ownership and lifecycle isolation. ### Tests run - `.agents/skills/mo-dev/scripts/mo-cgo-test ./pkg/tests/issues/isolated -short -run '^TestIssue26640ClusterRestoreRebindsSubscriptionPrivileges$' -count=1 -timeout=15m` — passed on the final head, 26.185s. - `.agents/skills/mo-dev/scripts/mo-cgo-test ./pkg/tests/issues/isolated -race -short -run '^TestIssue26640ClusterRestoreRebindsSubscriptionPrivileges$' -count=1 -timeout=15m` — passed, 112.612s. - Full normal runs for `pkg/tests/issues` and `pkg/tests/issues/isolated` — passed, 85.837s and 261.079s respectively. - Full race runs for `pkg/tests/issues` and `pkg/tests/issues/isolated` — passed, 512.671s and 317.342s respectively. - `go vet ./pkg/tests/issues ./pkg/tests/issues/isolated` with the repository CGo include and linker flags — passed. - `git diff --check origin/main...HEAD` — passed. The full package runs were completed before the final rebase onto the latest `origin/main`; the rebase added only upstream commit matrixorigin#28009, and the focused normal and race tests were rerun on the final head. ### Residual risks - The isolated test starts one additional two-CN cluster. Its final focused normal run took 26.185s; this is the necessary cost of preventing shared-cluster catalog contamination. - Full-cluster restore remains a long-running integration path with the original bounded 300-second test context and can still expose genuine restore failures. - Because this is a test-fixture isolation change, any remaining CI privilege cascade would indicate another test mutating the shared base cluster. Approved by: @XuPeng-SH
…matrixorigin#27964) (matrixorigin#28009) Renaming or dropping a column referenced in a fulltext2 INCLUDE clause left stale metadata and broke incremental (ISCP CDC) indexing: SHOW CREATE TABLE kept showing the old/dropped column, and post-rename inserts were never indexed (MATCH returned only the pre-rename rows). Root cause: the SQL ALTER path (pkg/sql/plan/vector_index_alter.go) delegates include-column maintenance to optional per-plugin hooks (AlterColumnHooks / RenameColumnRebuildHook). Every vector index (ivfflat/ivfpq/cagra) implements them, but fulltext2 did not, so its INCLUDE metadata was never rewritten and no rebuild was triggered. Fix: add pkg/fulltext2/plugin/plan/alter.go, mirroring ivfflat's alter hooks, so fulltext2's plan.Hooks satisfies the interfaces the SQL layer type-asserts: - HandleAlterRenameColumn -> RenameIncludedColumnsForAlgo (rewrites the INCLUDE name in both IndexDef.IncludedColumns and the IndexAlgoParams JSON via the emitted mo_indexes UPDATE), with catalog.MoIndexFullText2Algo. - RenameColumnRequiresIndexRebuild -> IncludedColumnAffected: renaming an INCLUDE column triggers a COPY rebuild so incremental indexing resumes. - HandleAlterDropColumn / UpdateColumnRequiresIndexRewrite -> IncludedColumnAffected: dropping an INCLUDE column drops the index (ivfflat parity); MODIFY rewrites. No SQL-layer or per-algo switch changes — pure plugin-hook wiring (G-IDXPLUGIN clean). Classic fulltext has no INCLUDE support, so it is unaffected. Tests: - Unit: pkg/fulltext2/plugin/plan/alter_test.go (mirrors ivfflat) covers all four hooks + a compile-time interface assertion. - BVT: test/distributed/cases/pessimistic_transaction/fulltext2/ fulltext2_include_rename.{sql,result} — full matrixorigin#27964 repro using the cdc_tail @wait_expect poll (deterministic): rename INCLUDE col -> SHOW CREATE shows the new name and MATCH returns the post-rename incremental row; covering query serves the INCLUDE column under its new name; drop INCLUDE col drops the index; renaming a non-INCLUDE column leaves the index intact. Validated -m run -g -n: 31/31, 100%. Approved by: @XuPeng-SH
…8019) ### Root cause `TestIssue26640ClusterRestoreRebindsSubscriptionPrivileges` runs a full-cluster restore against the base cluster returned by `embed.RunBaseClusterTests`. A full-cluster restore replaces cluster-wide catalog tables, including `mo_catalog.mo_role_privs`. `SharedTestCluster.Run` keeps that cluster alive for subsequent issue tests and does not rebuild it after the callback changes catalog state or times out. In CI run 33618283377, the restore path replaced `mo_catalog.mo_role_privs`; subsequent unrelated tests using the shared `sys:dump` / `moadmin` session failed with Error 20101 (`do not have privilege to execute the statement`) during normal DDL and account setup or cleanup. The failure therefore came from sharing a cluster across a destructive full-cluster restore, not from the unrelated Data Branch changes. ### Changes - Move only `TestIssue26640ClusterRestoreRebindsSubscriptionPrivileges` into the existing `pkg/tests/issues/isolated` package. - Start a dedicated two-CN test cluster with the authentication, lock-service, and Iceberg settings required by the original test, wait for system bootstrap, and close the cluster with test cleanup. - Preserve the original full SQL scenario and assertions for account ID remapping, publication metadata rebinding, subscription privilege object rebinding, and reader access. - Keep the account-scoped matrixorigin#26640 restore and PITR tests on the shared base-cluster helper because they do not perform a full-cluster catalog replacement. No production code or SQL behavior is changed. ### Issue-to-test proof The moved regression test creates publisher and subscriber accounts, a publication and subscription, roles and grants, takes a cluster snapshot, drops both accounts, restores the full cluster, and verifies: - restored account IDs differ from the source IDs; - publication account and database IDs point to the restored objects; - the subscription role privilege object ID points to the restored subscription database; - the restored subscription reader can query the expected row. The test now owns its cluster lifecycle in the isolated package, which has no shared base cluster. This prevents a failed or catalog-mutating full-cluster restore from affecting unrelated issue tests while retaining direct executable coverage of the original reproduction. BVT is not appropriate for this change: no production SQL contract changed, and the behavior under test is test-cluster ownership and lifecycle isolation. ### Tests run - `.agents/skills/mo-dev/scripts/mo-cgo-test ./pkg/tests/issues/isolated -short -run '^TestIssue26640ClusterRestoreRebindsSubscriptionPrivileges$' -count=1 -timeout=15m` — passed on the final head, 26.185s. - `.agents/skills/mo-dev/scripts/mo-cgo-test ./pkg/tests/issues/isolated -race -short -run '^TestIssue26640ClusterRestoreRebindsSubscriptionPrivileges$' -count=1 -timeout=15m` — passed, 112.612s. - Full normal runs for `pkg/tests/issues` and `pkg/tests/issues/isolated` — passed, 85.837s and 261.079s respectively. - Full race runs for `pkg/tests/issues` and `pkg/tests/issues/isolated` — passed, 512.671s and 317.342s respectively. - `go vet ./pkg/tests/issues ./pkg/tests/issues/isolated` with the repository CGo include and linker flags — passed. - `git diff --check origin/main...HEAD` — passed. The full package runs were completed before the final rebase onto the latest `origin/main`; the rebase added only upstream commit matrixorigin#28009, and the focused normal and race tests were rerun on the final head. ### Residual risks - The isolated test starts one additional two-CN cluster. Its final focused normal run took 26.185s; this is the necessary cost of preventing shared-cluster catalog contamination. - Full-cluster restore remains a long-running integration path with the original bounded 300-second test context and can still expose genuine restore failures. - Because this is a test-fixture isolation change, any remaining CI privilege cascade would indicate another test mutating the shared base cluster. Approved by: @XuPeng-SH
What type of PR is this?
Which issue(s) this PR fixes:
issue #27964
What this PR does / why we need it:
Renaming or dropping a column referenced in a fulltext2 INCLUDE clause left stale metadata and broke incremental (ISCP CDC) indexing: SHOW CREATE TABLE kept showing the old/dropped column, and post-rename inserts were never indexed (MATCH returned only the pre-rename rows).
Root cause: the SQL ALTER path (pkg/sql/plan/vector_index_alter.go) delegates include-column maintenance to optional per-plugin hooks (AlterColumnHooks / RenameColumnRebuildHook). Every vector index (ivfflat/ivfpq/cagra) implements them, but fulltext2 did not, so its INCLUDE metadata was never rewritten and no rebuild was triggered.
Fix: add pkg/fulltext2/plugin/plan/alter.go, mirroring ivfflat's alter hooks, so fulltext2's plan.Hooks satisfies the interfaces the SQL layer type-asserts:
No SQL-layer or per-algo switch changes — pure plugin-hook wiring (G-IDXPLUGIN clean). Classic fulltext has no INCLUDE support, so it is unaffected.
Tests: