Skip to content

ddl, tici: support add/drop partition for TiCI indexes | tidb-test=13ccf8de48e8db2290ff884598444d0508606bbf tiflash=feature-fts#66816

Merged
ti-chi-bot[bot] merged 27 commits into
pingcap:feature/ftsfrom
wjhuang2016:tici-partition-ddl
May 7, 2026
Merged

Conversation

@wjhuang2016
Copy link
Copy Markdown
Member

@wjhuang2016 wjhuang2016 commented Mar 9, 2026

What problem does this PR solve?

Issue Number: ref #1793

Problem Summary:
When a partitioned table has TiCI global indexes, ADD PARTITION/DROP PARTITION should also create/drop the corresponding TiCI index metadata for the physical partition tables. Previously TiDB only managed TiCI indexes at the logical-table level.

What changed and how does it work?

  • Add AddPartition/DropPartition RPCs and request/response messages to pkg/tici/tici.proto (index IDs as repeated int64).
  • Implement TiCI client helpers in pkg/tici/tici_manager_client.go and wire them to DDL:
    • Call tici.AddPartition during ADD PARTITION in StateReplicaOnly before updatePartitionInfo, so AddingDefinitions are included in the request table_info.
    • Call tici.DropPartition during DROP PARTITION in StateDeleteReorganization for each dropped physical partition ID (best-effort; log warnings on failure).
  • Add unit tests to validate the request payloads via failpoints.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Test results:

  • make failpoint-enable && (rc=0; go test ./pkg/tici -run TestCreateFulltextIndex -tags=intest,deadlock || rc=$?; if [ $rc -eq 0 ]; then go test ./pkg/ddl -run TestAddDropPartitionWithTiCIIndex -tags=intest,deadlock || rc=$?; fi; make failpoint-disable; exit $rc)
  • make bazel_lint_changed

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

Support notifying TiCI to add/drop partitions for TiCI global indexes when running ADD/DROP PARTITION.

Summary by CodeRabbit

  • New Features

    • Partition add/drop now invoke TiCI AddPartition/DropPartition APIs and propagate keyspace info; partition provisioning flag added to track TiCI state.
    • New RPCs/messages added to TiCI API to support partition management.
  • Bug Fixes

    • Improved retry/backoff and error handling for shard-local cache queries; guarded a nil check to avoid panics in a local writer path.
  • Tests

    • New end-to-end and unit tests, mocks, and test helpers covering TiCI add/drop flows, retries, and error scenarios.

@ti-chi-bot ti-chi-bot Bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Mar 9, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 9, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds TiCI partition management: new proto RPCs, TiCI manager client AddPartition/DropPartition APIs and test hooks, DDL hooks to call TiCI when TiCI-backed global indexes gain/lose partitions, a persisted reorg flag, and unit tests with failpoints and in-process mocks.

Changes

Cohort / File(s) Summary
DDL Partition Integration
pkg/ddl/partition.go, pkg/ddl/partition_test.go
Adds getTiCIIndexIDs(tblInfo *model.TableInfo) []int64; calls tici.AddPartition in add-partition flow and tici.DropPartition in drop/rollback flows; persists TiCIPartitionAdded in reorg meta; adds TestAddDropPartitionWithTiCIIndex and a skipped rollback test.
TiCI Protocol
pkg/tici/tici.proto
Adds AddPartition / DropPartition RPCs and associated request/response messages (index IDs, table_info, keyspace_id, parser_info, status/error).
TiCI Manager Client & Helpers
pkg/tici/tici_manager_client.go, pkg/tici/tici_write.go, pkg/tici/tici_test_export_intest.go
Implements AddPartition/DropPartition request builders and ManagerCtx methods, top-level helpers, keyspace propagation, retry logic for shard cache, test failpoint hooks, and test-time mock data-writer/provider wiring.
TiCI Manager Tests & Mocks
pkg/tici/tici_manager_client_test.go, pkg/tici/tici_test_export_intest.go
Adds mock RPCs (AddPartition/DropPartition) to MockMetaServiceClient; expands tests to cover success, business-error, RPC-error paths, and ScanRanges retry behavior; provides in-process mock installer for tests.
Meta Model
pkg/meta/model/reorg.go
Adds TiCIPartitionAdded bool \json:"tici_partition_added"`toDDLReorgMeta` and reorders some fields.
Test Helpers & Test Adjustments
pkg/ddl/tici_test_helper_test.go, pkg/ddl/index_modify_test.go, pkg/ddl/cancel_test.go, pkg/ddl/partition_test.go
Adds enableMockTiCIBackfill helper and enables TiCI mocks across tests; updates tests to enable new mock failpoints and JSON inspection of captured TiCI requests.
Lightning local writer guard
pkg/lightning/backend/local/local.go
Guard against nil tikvCodec in InitTiCIWriterGroup when deriving keyspace ID.

Sequence Diagram(s)

sequenceDiagram
    participant Admin
    participant DDL as DDL Handler
    participant Store as Storage (KV/Store)
    participant TiCI as TiCI Manager
    participant Meta as TiCI Meta Service

    Admin->>DDL: Request Add Partition (table w/ TiCI-backed indexes)
    activate DDL
    DDL->>DDL: getTiCIIndexIDs(tblInfo)
    alt TiCI index IDs present
        DDL->>Store: derive KeyspaceID
        DDL->>TiCI: AddPartition(ctx, store, tblInfo, schema, indexIDs, parserInfo)
        activate TiCI
        TiCI->>TiCI: buildAddPartitionRequest(...)
        TiCI->>Meta: RPC AddPartition(request)
        activate Meta
        Meta-->>TiCI: AddPartitionResponse
        deactivate Meta
        TiCI-->>DDL: result / error
        deactivate TiCI
        DDL->>DDL: set TiCIPartitionAdded and persist reorg meta
    end
    DDL-->>Admin: partition created
    deactivate DDL

    Admin->>DDL: Request Drop Partition (table w/ TiCI-backed indexes)
    activate DDL
    DDL->>DDL: getTiCIIndexIDs(tblInfo)
    alt TiCI index IDs present
        loop physical partition IDs
            DDL->>TiCI: DropPartition(ctx, store, physicalTableID, indexIDs)
            activate TiCI
            TiCI->>Meta: RPC DropPartition(request)
            activate Meta
            Meta-->>TiCI: DropPartitionResponse
            deactivate Meta
            TiCI-->>DDL: result / error
            deactivate TiCI
        end
        DDL->>DDL: clear TiCIPartitionAdded and persist reorg meta
    end
    DDL-->>Admin: partition dropped
    deactivate DDL
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested labels

ok-to-test, sig/planner, approved, lgtm

Suggested reviewers

  • YangKeao
  • cfzjywxk

Poem

🐰 I hopped through protos, bindings, and tests,

I nudged index IDs and checked all the rests,
Add and Drop I whispered, flags set true,
Partitions danced, mocks chimed — hop, review! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The PR description includes all required template sections: Issue Number, Problem Summary, What Changed and How It Works, Check List with Unit Test marked, Test Results provided, Side Effects assessed, Release Note included, and follows the template structure comprehensively.
Title check ✅ Passed The PR title clearly summarizes the main changes: adding support for add/drop partition operations for TiCI indexes in the DDL subsystem. It is concise, specific, and accurately represents the primary objective.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 9, 2026

Codecov Report

❌ Patch coverage is 50.39872% with 311 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.9918%. Comparing base (bd3b320) to head (3922d35).
⚠️ Report is 37 commits behind head on feature/fts.

Additional details and impacted files
@@                 Coverage Diff                 @@
##           feature/fts     #66816        +/-   ##
===================================================
+ Coverage      76.8610%   76.9918%   +0.1308%     
===================================================
  Files             1960       1964         +4     
  Lines           555677     558332      +2655     
===================================================
+ Hits            427099     429870      +2771     
+ Misses          127116     126982       -134     
- Partials          1462       1480        +18     
Flag Coverage Δ
integration 45.3936% <2.7777%> (-0.2158%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 56.7974% <ø> (+0.0929%) ⬆️
parser ∅ <ø> (∅)
br 66.2498% <ø> (+0.0052%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pkg/tici/tici_manager_client_test.go`:
- Around line 107-197: The test subtests CreateFulltextIndex, AddPartition, and
DropPartition set expectations on MockMetaServiceClient with Once() but never
assert them; after each subtest's last assertion (after calls to
ctx.CreateFulltextIndex, ctx.AddPartition, ctx.DropPartition and their
require/assert checks), add mockClient.AssertExpectations(t) to verify the
mocked RPC calls actually occurred; apply the same addition to the other
subtests that use mockClient with Once() (the analogous blocks around the later
tests referenced) so all mocked expectations are asserted.

In `@pkg/tici/tici_manager_client.go`:
- Around line 354-359: ManagerCtx methods AddPartition and DropPartition
currently proceed to build and send RPCs even when indexIDs is empty, causing
inconsistency with package-level helpers that no-op; update
ManagerCtx.AddPartition and ManagerCtx.DropPartition to check if len(indexIDs)
== 0 and immediately return nil (no-op) before calling
buildAddPartitionRequest/buildDropPartitionRequest or
t.addPartition/t.dropPartition so direct manager API callers behave the same as
package helpers.
- Around line 879-887: The retry terminal error in GetShardLocalCacheInfo drops
TiCI's error_message and identifying context; update the final fmt.Errorf return
so it includes resp.ErrorMessage plus the numeric/status code and any available
IDs (e.g., req.TableID, req.IndexID, shardID or fields on resp) along with
code.String(); for example build a message combining code.String(), resp.Status,
resp.ErrorMessage and the request/response table/index/shard identifiers so
callers get actionable context when attempts give up.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 2a586f5b-4aea-4738-bae6-bfa66ca8b4f1

📥 Commits

Reviewing files that changed from the base of the PR and between c493898 and 6ae16e4.

📒 Files selected for processing (2)
  • pkg/tici/tici_manager_client.go
  • pkg/tici/tici_manager_client_test.go

Comment thread pkg/tici/tici_manager_client_test.go
Comment thread pkg/tici/tici_manager_client.go
Comment thread pkg/tici/tici_manager_client.go
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pkg/ddl/partition.go`:
- Around line 224-232: Guard the tici.AddPartition call so it is not retried
when the job is in StateReplicaOnly: detect the job state (jobCtx or job
object/state check in the current function) and skip calling tici.AddPartition
if the job is already in StateReplicaOnly (or otherwise ensure idempotency by
checking for an existing partition-add marker) and return success; add a short
comment immediately above the tici.AddPartition invocation stating this call
must remain before updatePartitionInfo because it relies on AddingDefinitions
being present and must not be reissued during StateReplicaOnly retries. Ensure
the guard uses the same job/state identifiers present in this function and
preserves the early-return/error behavior when appropriate.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 76c3f7dd-4f08-4f09-a187-e10abf5a04da

📥 Commits

Reviewing files that changed from the base of the PR and between 6ae16e4 and 3ea3d1f.

📒 Files selected for processing (2)
  • pkg/ddl/partition.go
  • pkg/ddl/partition_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/ddl/partition_test.go

Comment thread pkg/ddl/partition.go Outdated
@wjhuang2016
Copy link
Copy Markdown
Member Author

Addressed CodeRabbit threads + CI flake:

  • Added AssertExpectations via t.Cleanup in pkg/tici subtests.
  • ManagerCtx.AddPartition/DropPartition now no-op on empty indexIDs.
  • onAddTablePartition guards TiCI AddPartition with job.ReorgMeta.TiCIPartitionAdded and persists via updateDDLJob to avoid duplicate RPC on retry (kept before updatePartitionInfo).
  • ScanRanges retry is now time-based (<=30s or ctx deadline) and final error includes key context (table/index/keyspace/attempts).

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pkg/ddl/partition.go`:
- Around line 224-235: The TiCI AddPartition call is dropping per-index parser
configuration by passing nil for ParserInfo; update the add-partition path in
the block around getTiCIIndexIDs and the tici.AddPartition call so it does not
pass nil: collect each index's ParserInfo from tblInfo (from the index
definitions), then either (a) if the RPC supports only a single ParserInfo,
validate that all involved indexes share the same parser config and pass that
ParserInfo to tici.AddPartition, or (b) if configs differ, group indexes by
ParserInfo and invoke tici.AddPartition once per group with the corresponding
ParserInfo; ensure this logic lives before the TiCIPartitionAdded guard
(job.ReorgMeta.TiCIPartitionAdded) and uses jobCtx.stepCtx/jobCtx.ctx as before.
- Around line 230-240: The rollback path must undo the TiCI side-effect created
when job.ReorgMeta.TiCIPartitionAdded is set after tici.AddPartition succeeds;
modify rollbackLikeDropPartition to check job.ReorgMeta.TiCIPartitionAdded (and
use the same physicalTableIDs/schema/indexIDs context) and call
tici.DropPartition(ctx, store, tblInfo, job.SchemaName, physicalTableIDs)
(handle and log errors, and clear TiCIPartitionAdded via w.updateDDLJob) before
returning so TiCI metadata isn’t leaked; also add a regression test that forces
a job into rollback after tici.AddPartition has succeeded to verify
DropPartition is invoked and the flag is cleared.

In `@pkg/tici/tici_manager_client.go`:
- Around line 333-338: The AddPartition and DropPartition handling currently
returns dbterror.ErrInvalidDDLJob.FastGenByArgs(resp.ErrorMessage) without
including resp.Status or identifying context; update the error returned from the
RPC failure branches (the block referencing resp.Status, resp.ErrorMessage, and
req.IndexIds) to include the status code and relevant table/index identifiers
(e.g., req.IndexIds and any table ID/Name available in the request) alongside
resp.ErrorMessage so callers can see which partition RPC failed; construct a
descriptive error string combining resp.Status, resp.ErrorMessage, and the
request identifiers and pass that into FastGenByArgs (or wrap/create a
contextual error) for both AddPartition and DropPartition failure paths.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: fb18f6d7-435c-4469-8bcf-cdf3121d8c49

📥 Commits

Reviewing files that changed from the base of the PR and between 3ea3d1f and 139f9be.

📒 Files selected for processing (4)
  • pkg/ddl/partition.go
  • pkg/meta/model/reorg.go
  • pkg/tici/tici_manager_client.go
  • pkg/tici/tici_manager_client_test.go

Comment thread pkg/ddl/partition.go Outdated
Comment thread pkg/ddl/partition.go Outdated
Comment thread pkg/tici/tici_manager_client.go Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

♻️ Duplicate comments (1)
pkg/tici/tici_manager_client.go (1)

916-927: ⚠️ Potential issue | 🟡 Minor

Include TiCI error_message in terminal ScanRanges failure.

The final returned error still excludes resp.ErrorMessage, which makes root-cause diagnosis harder after retries are exhausted.

Suggested fix
 		if !isRetryableGetShardLocalCacheStatus(resp.Status) || time.Since(start) >= maxWait {
 			return nil, fmt.Errorf(
-				"GetShardLocalCacheInfo failed after %s (attempts=%d, keyspaceID=%d, tableID=%d, indexID=%d, ranges=%d, limit=%d): %s(%d)",
+				"GetShardLocalCacheInfo failed after %s (attempts=%d, keyspaceID=%d, tableID=%d, indexID=%d, ranges=%d, limit=%d): %s(%d): %s",
 				time.Since(start).Round(time.Millisecond),
 				attempt+1,
 				request.KeyspaceId,
 				tableID,
 				indexID,
 				len(keyRanges),
 				limit,
 				code.String(),
 				resp.Status,
+				resp.ErrorMessage,
 			)
 		}

As per coding guidelines, "Keep error handling actionable and contextual; avoid silently swallowing errors".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/tici/tici_manager_client.go` around lines 916 - 927, The returned error
from GetShardLocalCacheInfo (in the ScanRanges retry/failure path) omits
resp.ErrorMessage; update the fmt.Errorf call that builds the final error (the
block shown) to include resp.ErrorMessage alongside resp.Status and
code.String() so the error message surfaces the TiCI error_message for
diagnosing root causes—modify the format string and arguments in the failing
return expression inside GetShardLocalCacheInfo to append or interpolate
resp.ErrorMessage (e.g., include "error_message=%q" or similar) so the
response's ErrorMessage is logged in the final error.
🧹 Nitpick comments (1)
pkg/ddl/partition_test.go (1)

332-334: Rollback cleanup path is still untested due t.Skip.

This PR changes rollback behavior for TiCI partition cleanup, but the dedicated rollback test is disabled. Please make this deterministic (failpoint + state hook) and enable it in CI.

Based on learnings, "Applies to pkg/ddl/** : For DDL schema changes, perform DDL-focused unit/integration tests and compatibility impact checks."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/ddl/partition_test.go` around lines 332 - 334, The test
TestRollbackAddPartitionDropsTiCIPartition is skipped via t.Skip, leaving the
rollback cleanup path untested; remove t.Skip and make the test deterministic by
injecting a failpoint (e.g., enable a rollback scheduling failpoint) and using a
state hook or callback to force/observe the exact timing of the add-partition
rollback path, then assert that the TiCI partition is dropped; locate the test
function TestRollbackAddPartitionDropsTiCIPartition and replace the skip with
setup code that activates the failpoint, registers the state hook to drive the
scheduler to the rollback branch, runs the operation, verifies the TiCI cleanup,
and then disables the failpoint so the test can run reliably in CI.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pkg/ddl/partition.go`:
- Around line 2246-2251: The code currently unconditionally clears
job.ReorgMeta.TiCIPartitionAdded and persists it via w.updateDDLJob even if
DropPartition RPCs failed; change the logic so that TiCIPartitionAdded is only
set to false and updateDDLJob called after all DropPartition RPCs complete
successfully. Locate the rollback path handling TiCI partition drops (look for
the block that runs DropPartition RPCs and the lines setting
job.ReorgMeta.TiCIPartitionAdded = false and calling w.updateDDLJob) and modify
it to: 1) check the results/errors from each DropPartition, 2) if any fail,
return the error without mutating TiCIPartitionAdded, and 3) only when all drops
succeed set TiCIPartitionAdded = false and call w.updateDDLJob(jobCtx, job,
true).

In `@pkg/tici/tici_test_export_intest.go`:
- Around line 127-129: Replace the mock etcd client return in getEtcdClientFunc
so it returns (nil, nil) instead of &clientv3.Client{}; update the mock
installer to return nil for the etcd client because newManagerCtxFunc ignores
the client parameter and DataWriterGroup.Close() checks for nil before calling
Close, preventing a panic from a zero-value client. Ensure the signature of
getEtcdClientFunc remains func() (*clientv3.Client, error) and that callers
relying on newManagerCtxFunc continue to operate unchanged.

---

Duplicate comments:
In `@pkg/tici/tici_manager_client.go`:
- Around line 916-927: The returned error from GetShardLocalCacheInfo (in the
ScanRanges retry/failure path) omits resp.ErrorMessage; update the fmt.Errorf
call that builds the final error (the block shown) to include resp.ErrorMessage
alongside resp.Status and code.String() so the error message surfaces the TiCI
error_message for diagnosing root causes—modify the format string and arguments
in the failing return expression inside GetShardLocalCacheInfo to append or
interpolate resp.ErrorMessage (e.g., include "error_message=%q" or similar) so
the response's ErrorMessage is logged in the final error.

---

Nitpick comments:
In `@pkg/ddl/partition_test.go`:
- Around line 332-334: The test TestRollbackAddPartitionDropsTiCIPartition is
skipped via t.Skip, leaving the rollback cleanup path untested; remove t.Skip
and make the test deterministic by injecting a failpoint (e.g., enable a
rollback scheduling failpoint) and using a state hook or callback to
force/observe the exact timing of the add-partition rollback path, then assert
that the TiCI partition is dropped; locate the test function
TestRollbackAddPartitionDropsTiCIPartition and replace the skip with setup code
that activates the failpoint, registers the state hook to drive the scheduler to
the rollback branch, runs the operation, verifies the TiCI cleanup, and then
disables the failpoint so the test can run reliably in CI.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a615a7e9-e353-45dc-bd4b-85c19d58a067

📥 Commits

Reviewing files that changed from the base of the PR and between 139f9be and 8fcec4d.

📒 Files selected for processing (9)
  • pkg/ddl/cancel_test.go
  • pkg/ddl/index_modify_test.go
  • pkg/ddl/partition.go
  • pkg/ddl/partition_test.go
  • pkg/ddl/tici_test_helper_test.go
  • pkg/lightning/backend/local/local.go
  • pkg/tici/tici_manager_client.go
  • pkg/tici/tici_test_export_intest.go
  • pkg/tici/tici_write.go

Comment thread pkg/ddl/partition.go Outdated
Comment thread pkg/ddl/partition.go Outdated
Comment thread pkg/tici/tici_test_export_intest.go
@wjhuang2016
Copy link
Copy Markdown
Member Author

/retest

@wjhuang2016 wjhuang2016 changed the title ddl, tici: support add/drop partition for TiCI indexes ddl, tici: support add/drop partition for TiCI indexes | tidb-test=13ccf8de48e8db2290ff884598444d0508606bbf tiflash=feature-fts Mar 23, 2026
@wjhuang2016
Copy link
Copy Markdown
Member Author

/retest

1 similar comment
@wjhuang2016
Copy link
Copy Markdown
Member Author

/retest

# Conflicts:
#	pkg/ddl/cancel_test.go
#	pkg/ddl/index_modify_test.go
@wjhuang2016
Copy link
Copy Markdown
Member Author

/retest

@wjhuang2016
Copy link
Copy Markdown
Member Author

/test unit-test

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Apr 2, 2026

@wjhuang2016: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test fast_test_tiprow_for_release

Use /test all to run all jobs.

Details

In response to this:

/test unit-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@wjhuang2016
Copy link
Copy Markdown
Member Author

/test pull-br-integration-test

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Apr 15, 2026

@wjhuang2016: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test fast_test_tiprow_for_release

Use /test all to run all jobs.

Details

In response to this:

/test pull-br-integration-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@wjhuang2016
Copy link
Copy Markdown
Member Author

/test pull-br-integration-test

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Apr 15, 2026

@wjhuang2016: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test fast_test_tiprow_for_release

Use /test all to run all jobs.

Details

In response to this:

/test pull-br-integration-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ti-chi-bot ti-chi-bot Bot removed the approved label Apr 15, 2026
@wjhuang2016
Copy link
Copy Markdown
Member Author

/test pull-br-integration-test

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Apr 15, 2026

@wjhuang2016: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test fast_test_tiprow_for_release

Use /test all to run all jobs.

Details

In response to this:

/test pull-br-integration-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@wjhuang2016
Copy link
Copy Markdown
Member Author

/test pull-br-integration-test

@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Apr 15, 2026

@wjhuang2016: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test build
/test check-dev
/test check-dev2
/test mysql-test
/test pull-br-integration-test
/test pull-integration-e2e-test
/test pull-lightning-integration-test
/test pull-mysql-client-test
/test pull-unit-test-ddlv1
/test unit-test

The following commands are available to trigger optional jobs:

/test pingcap/tidb/canary_ghpr_unit_test
/test pull-common-test
/test pull-e2e-test
/test pull-integration-common-test
/test pull-integration-copr-test
/test pull-integration-ddl-test
/test pull-integration-jdbc-test
/test pull-integration-mysql-test
/test pull-integration-nodejs-test
/test pull-integration-python-orm-test
/test pull-integration-tici-test
/test pull-sqllogic-test
/test pull-tiflash-integration-test

Use /test all to run the following jobs that were automatically triggered:

pingcap/tidb/ghpr_build
pingcap/tidb/ghpr_check
pingcap/tidb/ghpr_check2
pingcap/tidb/ghpr_mysql_test
pingcap/tidb/ghpr_unit_test
pingcap/tidb/pull_br_integration_test
pingcap/tidb/pull_integration_e2e_test
pingcap/tidb/pull_integration_tici_test
pingcap/tidb/pull_lightning_integration_test
pingcap/tidb/pull_mysql_client_test
pingcap/tidb/pull_unit_test_ddlv1
Details

In response to this:

/test pull-br-integration-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Apr 15, 2026

@wjhuang2016: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test fast_test_tiprow_for_release

Use /test all to run all jobs.

Details

In response to this:

/test pull-br-integration-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@yinshuangfei
Copy link
Copy Markdown

/test pull-br-integration-test

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Apr 16, 2026

@yinshuangfei: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test fast_test_tiprow_for_release

Use /test all to run all jobs.

Details

In response to this:

/test pull-br-integration-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@wjhuang2016
Copy link
Copy Markdown
Member Author

/retest

@wjhuang2016
Copy link
Copy Markdown
Member Author

/retest

@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Apr 28, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: fzzf678, OliverS929, yinshuangfei
Once this PR has been reviewed and has the lgtm label, please assign d3hunter, terry1purcell for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@wjhuang2016
Copy link
Copy Markdown
Member Author

/retest

1 similar comment
@wjhuang2016
Copy link
Copy Markdown
Member Author

/retest

@ti-chi-bot ti-chi-bot Bot merged commit 38042f9 into pingcap:feature/fts May 7, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/statistics lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/planner SIG: Planner size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants