Skip to content

dxf: resolve task store before task execution#68824

Merged
ti-chi-bot[bot] merged 7 commits into
pingcap:masterfrom
D3Hunter:unify-task-store-creation
Jun 4, 2026
Merged

dxf: resolve task store before task execution#68824
ti-chi-bot[bot] merged 7 commits into
pingcap:masterfrom
D3Hunter:unify-task-store-creation

Conversation

@D3Hunter
Copy link
Copy Markdown
Contributor

@D3Hunter D3Hunter commented Jun 1, 2026

What problem does this PR solve?

Issue Number: ref #61702

Problem Summary:

For NextGen DXF tasks, a task can belong to a different keyspace from the TiDB instance that is running the task executor manager. The downstream DDL backfill and import-into executors need to use the task keyspace store consistently, but the store lookup was duplicated in multiple executor paths.

What changed and how does it work?

This PR resolves the task keyspace store in the DXF task executor manager before creating the task executor, then passes the resolved store through task executor parameters.

The DDL backfill scheduler/executor and import-into executor now use the manager-provided TaskStore for table metadata, read-index planning, ingest, merge-temp-index, and import step execution instead of resolving the task keyspace store again.

It also adds targeted unit coverage for successful cross-keyspace task store resolution, lookup failure handling, and import-into consuming the provided task store directly.

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.

Commands run:

make bazel_prepare
./tools/check/failpoint-go-test.sh pkg/dxf/framework/taskexecutor -run 'TestStartTaskExecutorResolveTaskStoreFromTaskKeyspace|TestStartTaskExecutorResolveTaskStoreError' -count=1
./tools/check/failpoint-go-test.sh pkg/dxf/importinto -run 'TestImportTaskExecutorUsesTaskStoreWithoutExtraLookup' -count=1
./tools/check/failpoint-go-test.sh pkg/ddl -run 'TestBackfillingSchedulerLocalMode|TestBackfillingSchedulerGlobalSortMode' -count=1
make lint
git diff --check upstream/master...HEAD

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.

None

Summary by CodeRabbit

  • Bug Fixes

    • Executors for tasks, imports, and backfills consistently use the per-task data store resolved from the task keyspace and fail cleanly when that keyspace store is missing.
  • Refactor

    • Unified store-resolution across schedulers and executors; exported parameter renamed for clarity and flows through planning/execution.
  • Tests

    • Added and extended keyspace-aware tests for success and error paths.
  • Chores

    • Adjusted test runner shard counts and test dependencies.

@ti-chi-bot ti-chi-bot Bot added the release-note-none Denotes a PR that doesn't merit a release note. label Jun 1, 2026
@pantheon-ai
Copy link
Copy Markdown

pantheon-ai Bot commented Jun 1, 2026

@D3Hunter I've received your pull request and will start the review. I'll conduct a thorough review covering code quality, potential issues, and implementation details.

⏳ This process typically takes 10-30 minutes depending on the complexity of the changes.

ℹ️ Learn more details on Pantheon AI.

@ti-chi-bot ti-chi-bot Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 1, 2026
@tiprow
Copy link
Copy Markdown

tiprow Bot commented Jun 1, 2026

Hi @D3Hunter. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Details

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.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 1, 2026

Review Change Stack

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

Centralize task-store resolution in Manager: rename Param.Store→Param.TaskStore, have Manager resolve per-task TaskStore by keyspace (WithNewSession/GetKSStore), and simplify schedulers/executors to use the provided TaskStore without per-executor keyspace switching.

Changes

Task Store Resolution Refactoring

Layer / File(s) Summary
Param.Store → Param.TaskStore
pkg/dxf/framework/taskexecutor/task_executor.go
Exported Param field renamed from Store to TaskStore; NewParamForTest updated; BaseTaskExecutor.Init checks TaskStore keyspace at runtime and returns error on mismatch.
Manager task store resolution by keyspace
pkg/dxf/framework/taskexecutor/manager.go, pkg/dxf/framework/taskexecutor/manager_test.go
startTaskExecutor resolves task-specific TaskStore when the task keyspace differs via WithNewSession and GetKSStore; failure path aborts startup. Test scaffolding and tests for success/error added.
DDL backfilling scheduler and executor updates
pkg/ddl/backfilling_dist_scheduler.go, pkg/ddl/backfilling_dist_scheduler_test.go, pkg/ddl/backfilling_dist_executor.go
Scheduler uses sch.TaskStore for plan generation; getUserStoreAndTable replaced by getUserTableFromTaskStore returning only table.Table; backfilling executor uses s.TaskStore and only refreshes sessPool on keyspace mismatch; tests initialize scheduler BaseScheduler with TaskStore.
Import executor simplification
pkg/dxf/importinto/task_executor.go, pkg/dxf/importinto/task_executor_test.go
Remove importExecutor.store and per-executor keyspace-switching; GetStepExecutor uses e.TaskStore directly; added test asserting pointer identity.
Bazel build configuration updates
pkg/dxf/framework/taskexecutor/BUILD.bazel, pkg/dxf/importinto/BUILD.bazel
Increase test shard counts and adjust BUILD deps to support added test scaffolding and dependencies.
Scheduler Param comment
pkg/dxf/framework/scheduler/interface.go
Clarify Param.TaskStore comment describing when it equals instance store vs. when resolved from task keyspace.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested labels

size/L, ok-to-test

Suggested reviewers

  • joechenrh
  • GMHDBJD

Poem

🐰 I hopped through stores and keyspace lanes,
One TaskStore held what once had chains.
Manager finds the proper key,
Executors share it, worry-free.
A carrot nibble for tidy gains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.53% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: resolving the task store before task execution in the DXF framework, which is the core refactoring across all modified files.
Description check ✅ Passed The description includes the required issue reference (ref #61702), problem summary explaining the keyspace store duplication issue, detailed explanation of changes, completed test checklist with specific commands, and release-note section. All template sections are properly addressed.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

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

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 Jun 1, 2026

Codecov Report

❌ Patch coverage is 0% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.5485%. Comparing base (1c3f9eb) to head (72b746b).
⚠️ Report is 30 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #68824        +/-   ##
================================================
+ Coverage   76.3105%   76.5485%   +0.2380%     
================================================
  Files          2041       2054        +13     
  Lines        563465     582668     +19203     
================================================
+ Hits         429983     446024     +16041     
- Misses       132566     133914      +1348     
- Partials        916       2730      +1814     
Flag Coverage Δ
integration 47.1248% <0.0000%> (+7.3463%) ⬆️

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

Components Coverage Δ
dumpling 60.4610% <ø> (ø)
parser ∅ <ø> (∅)
br 66.1244% <ø> (+3.2934%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@D3Hunter D3Hunter changed the title dxf, ddl: resolve task store before task execution dxf: resolve task store before task execution Jun 1, 2026
@ti-chi-bot ti-chi-bot Bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 1, 2026
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.

🧹 Nitpick comments (1)
pkg/ddl/backfilling_dist_executor.go (1)

137-143: ⚡ Quick win

Wrap the keyspace session-pool failure with task context.

return nil, err drops which task/keyspace failed during cross-keyspace executor setup, which will make production triage harder.

Proposed fix
 	if ddlObj.store.GetKeyspace() != taskKS {
 		if err := s.GetTaskTable().WithNewSession(func(se sessionctx.Context) error {
 			svr := se.GetSQLServer()
 			sp, err := svr.GetKSSessPool(taskKS)
 			sessPool = sess.NewSessionPool(sp)
 			return err
 		}); err != nil {
-			return nil, err
+			return nil, errors.Annotatef(err, "init backfill session pool for task %d in keyspace %v", s.task.ID, taskKS)
 		}
 	}

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

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/ddl/backfilling_dist_executor.go` around lines 137 - 143, The error
returned from s.GetTaskTable().WithNewSession(...) is not contextualized with
which task/keyspace failed (variables: GetTaskTable, WithNewSession,
sessionctx.Context, GetSQLServer, GetKSSessPool, sess.NewSessionPool, sessPool),
so change the error return to wrap the underlying err with the task/keyspace
info (e.g., include taskKS or task identifier) using fmt.Errorf or errors.Wrapf
before returning; ensure either the closure or the outer return returns a
wrapped error like "failed to get session pool for keyspace %s: %w" so
production logs show which keyspace/task caused the failure.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@pkg/ddl/backfilling_dist_executor.go`:
- Around line 137-143: The error returned from
s.GetTaskTable().WithNewSession(...) is not contextualized with which
task/keyspace failed (variables: GetTaskTable, WithNewSession,
sessionctx.Context, GetSQLServer, GetKSSessPool, sess.NewSessionPool, sessPool),
so change the error return to wrap the underlying err with the task/keyspace
info (e.g., include taskKS or task identifier) using fmt.Errorf or errors.Wrapf
before returning; ensure either the closure or the outer return returns a
wrapped error like "failed to get session pool for keyspace %s: %w" so
production logs show which keyspace/task caused the failure.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5009e9b5-16c9-4ab2-b3e9-779336fb5f57

📥 Commits

Reviewing files that changed from the base of the PR and between 234554c and 8992614.

📒 Files selected for processing (1)
  • pkg/ddl/backfilling_dist_executor.go

@ingress-bot
Copy link
Copy Markdown

🔍 Starting code review for this PR...

@ti-chi-bot ti-chi-bot Bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jun 1, 2026
Copy link
Copy Markdown
Contributor Author

@D3Hunter D3Hunter left a comment

Choose a reason for hiding this comment

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

Summary

  • Total findings: 4
  • Inline comments: 4
  • Summary-only findings (no inline anchor): 0
Findings (highest risk first)

🟡 [Minor] (3)

  1. Helper name still promises a store return value (pkg/ddl/backfilling_dist_scheduler.go:139 and pkg/ddl/backfilling_dist_scheduler.go:186)
  2. Task-store resolution is duplicated between DXF managers (pkg/dxf/framework/taskexecutor/manager.go:319 and pkg/dxf/framework/scheduler/scheduler_manager.go:354)
  3. Executor goroutine is only unblocked after assertions (pkg/dxf/framework/taskexecutor/manager_test.go:548)

🧹 [Nit] (1)

  1. TaskStore comment has unclear keyspace wording (pkg/dxf/framework/taskexecutor/task_executor.go:77)

Comment thread pkg/ddl/backfilling_dist_scheduler.go Outdated
Comment thread pkg/dxf/framework/taskexecutor/manager.go
Comment thread pkg/dxf/framework/taskexecutor/manager_test.go
Comment thread pkg/dxf/framework/taskexecutor/task_executor.go Outdated
Copy link
Copy Markdown

@ingress-bot ingress-bot left a comment

Choose a reason for hiding this comment

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

This review was generated by AI and should be verified by a human reviewer.
Manual follow-up is recommended before merge.

Summary

  • Total findings: 10
  • Inline comments: 7
  • Summary-only findings (no inline anchor): 0
Findings (highest risk first)

⚠️ [Major] (3)

  1. Cross-keyspace store resolution now blocks the serial task-manager loop (pkg/dxf/framework/taskexecutor/manager.go:320, pkg/dxf/framework/taskexecutor/manager.go:179, pkg/domain/crossks/cross_ks.go:91)
  2. Transient task-keyspace store lookup now fails the whole task instead of being retried (pkg/dxf/framework/taskexecutor/manager.go:327, pkg/dxf/framework/taskexecutor/manager.go:406, pkg/dxf/framework/scheduler/scheduler_manager.go:360)
  3. Param.TaskStore doc comment is grammatically broken and obscures the keyspace contract (pkg/dxf/framework/taskexecutor/task_executor.go:80)

🟡 [Minor] (4)

  1. Cross-keyspace gate is now split between the task-executor manager (store) and the backfill step executor (session pool) (pkg/ddl/backfilling_dist_executor.go:136, pkg/dxf/framework/taskexecutor/manager.go:320, pkg/dxf/framework/taskexecutor/task_executor.go:77)
  2. getUserStoreAndTable no longer returns a store; name is now misleading (pkg/ddl/backfilling_dist_scheduler.go:186)
  3. Cross-keyspace task store resolution has no rationale comment at the enforcement point (pkg/dxf/framework/taskexecutor/manager.go:320)
  4. Keyspace task-store resolution is duplicated across the scheduler and task-executor managers (pkg/dxf/framework/taskexecutor/manager.go:320, pkg/dxf/framework/scheduler/scheduler_manager.go:355)

ℹ️ [Info] (1)

  1. Executor-side task-store resolution lacks the keyspace-consistency guard the scheduler path enforces, so the two halves diverge on mismatch (pkg/dxf/framework/taskexecutor/manager.go:320, pkg/dxf/framework/scheduler/scheduler.go:124, pkg/dxf/importinto/task_executor_test.go:514)

🧹 [Nit] (2)

  1. err2 naming and idiom diverge from the WithNewSession pattern used elsewhere in this PR (pkg/dxf/framework/taskexecutor/manager.go:321)
  2. New manager tests register global task-executor types without cleanup, leaking shared mutable state across the suite (pkg/dxf/framework/taskexecutor/manager_test.go:539, pkg/dxf/framework/taskexecutor/register.go:39)

Comment thread pkg/dxf/framework/taskexecutor/manager.go
Comment thread pkg/dxf/framework/taskexecutor/manager.go
Comment thread pkg/dxf/framework/taskexecutor/task_executor.go Outdated
Comment thread pkg/ddl/backfilling_dist_executor.go
Comment thread pkg/ddl/backfilling_dist_scheduler.go
Comment thread pkg/dxf/framework/taskexecutor/manager.go
Comment thread pkg/dxf/framework/taskexecutor/manager_test.go
@ti-chi-bot ti-chi-bot Bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 1, 2026
Copy link
Copy Markdown

@ingress-bot ingress-bot left a comment

Choose a reason for hiding this comment

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

This review was generated by AI and should be verified by a human reviewer.
Manual follow-up is recommended before merge.

Summary

  • Total findings: 7
  • Inline comments: 7
  • Summary-only findings (no inline anchor): 0
Findings (highest risk first)

⚠️ [Major] (1)

  1. Transient cross-keyspace store resolution terminally fails the task instead of retrying (pkg/dxf/framework/taskexecutor/manager.go:326, pkg/dxf/framework/taskexecutor/manager.go:409)

🟡 [Minor] (3)

  1. Backfill executor resolves sessPool with a second keyspace predicate keyed off a different instance store than the manager used (pkg/ddl/backfilling_dist_executor.go:133, pkg/dxf/framework/taskexecutor/manager.go:320)
  2. TaskStore keyspace invariant is enforced only on the scheduler side, not the executor side (pkg/dxf/framework/taskexecutor/task_executor.go:77, pkg/dxf/framework/scheduler/scheduler.go:124, pkg/dxf/importinto/task_executor_test.go:88)
  3. Executor path resolves the task store but never re-checks it against task.Keyspace like the scheduler does (pkg/dxf/importinto/task_executor.go:912, pkg/dxf/framework/taskexecutor/manager.go:319, pkg/dxf/framework/scheduler/scheduler.go:124)

ℹ️ [Info] (1)

  1. New Param.TaskStore doc diverges from the parallel scheduler.Param.TaskStore doc for the same concept (pkg/dxf/framework/taskexecutor/task_executor.go:77, pkg/dxf/framework/scheduler/interface.go:185)

🧹 [Nit] (2)

  1. Scheduler test injects TaskStore by hand-building BaseScheduler, bypassing the provided test seams (pkg/ddl/backfilling_dist_scheduler_test.go:49, pkg/ddl/backfilling_dist_scheduler_test.go:178)
  2. New manager test leaks a global task-type registration without cleanup (pkg/dxf/framework/taskexecutor/manager_test.go:536, pkg/dxf/framework/taskexecutor/register.go:39)

Comment thread pkg/dxf/framework/taskexecutor/manager.go Outdated
Comment thread pkg/ddl/backfilling_dist_executor.go
Comment thread pkg/dxf/framework/taskexecutor/task_executor.go
Comment thread pkg/dxf/importinto/task_executor.go
Comment thread pkg/dxf/framework/taskexecutor/task_executor.go
Comment thread pkg/ddl/backfilling_dist_scheduler_test.go
Comment thread pkg/dxf/framework/taskexecutor/manager_test.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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
pkg/dxf/framework/taskexecutor/manager.go (1)

320-330: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Add an explanatory comment and post-resolution keyspace validation.

The keyspace resolution block silently swaps the instance store for the task-keyspace store, which controls whose keyspace data the task reads and writes. Without an inline comment, future editors may not understand that this branch enforces next-gen multi-keyspace isolation. Additionally, there is no validation that GetKSStore returned a store matching task.Keyspace, so a misconfiguration could silently proceed with the wrong store.

As per coding guidelines, comments should explain non-obvious intent and correctness constraints.

📝 Suggested addition
 	taskStore := m.store
+	// Next-gen multi-keyspace isolation: when the task belongs to a different
+	// keyspace, resolve and use the task's keyspace store for all data operations.
 	if m.store.GetKeyspace() != task.Keyspace {
 		if err2 := m.taskTable.WithNewSession(func(se sessionctx.Context) error {
 			var err2 error
 			taskStore, err2 = se.GetSQLServer().GetKSStore(task.Keyspace)
 			return err2
 		}); err2 != nil {
 			m.logger.Warn("get task store failed", zap.Int64("task-id", task.ID),
 				zap.String("task-key", task.Key), zap.Error(err2))
 			return false
 		}
+		// Defensive check: verify the resolved store matches the task keyspace.
+		if taskStore.GetKeyspace() != task.Keyspace {
+			m.logger.Error("resolved task store keyspace mismatch",
+				zap.Int64("task-id", task.ID), zap.String("task-keyspace", task.Keyspace),
+				zap.String("store-keyspace", taskStore.GetKeyspace()))
+			return false
+		}
 	}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/dxf/framework/taskexecutor/manager.go` around lines 320 - 330, Add an
inline comment above the branch that explains this code is intentionally
swapping the executor's instance store to the task-specific keyspace to enforce
next-gen multi-keyspace isolation and the correctness constraints this implies;
then after calling m.taskTable.WithNewSession(...
se.GetSQLServer().GetKSStore(task.Keyspace) ...) verify that the returned
taskStore actually corresponds to task.Keyspace (e.g., check its
GetKeyspace/GetName or other identity method) and if it does not match, log a
warning including task.ID and task.Key and the resolved store identity and
return false to avoid silently operating on the wrong keyspace.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@pkg/dxf/framework/taskexecutor/manager.go`:
- Around line 320-330: Add an inline comment above the branch that explains this
code is intentionally swapping the executor's instance store to the
task-specific keyspace to enforce next-gen multi-keyspace isolation and the
correctness constraints this implies; then after calling
m.taskTable.WithNewSession(... se.GetSQLServer().GetKSStore(task.Keyspace) ...)
verify that the returned taskStore actually corresponds to task.Keyspace (e.g.,
check its GetKeyspace/GetName or other identity method) and if it does not
match, log a warning including task.ID and task.Key and the resolved store
identity and return false to avoid silently operating on the wrong keyspace.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: eb14813e-9cb8-4f45-b0e8-717eb75cbbac

📥 Commits

Reviewing files that changed from the base of the PR and between 55224ec and 965fe28.

📒 Files selected for processing (6)
  • pkg/dxf/framework/scheduler/interface.go
  • pkg/dxf/framework/taskexecutor/BUILD.bazel
  • pkg/dxf/framework/taskexecutor/manager.go
  • pkg/dxf/framework/taskexecutor/manager_test.go
  • pkg/dxf/framework/taskexecutor/task_executor.go
  • pkg/dxf/framework/taskexecutor/task_executor_test.go
✅ Files skipped from review due to trivial changes (1)
  • pkg/dxf/framework/scheduler/interface.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • pkg/dxf/framework/taskexecutor/task_executor.go
  • pkg/dxf/framework/taskexecutor/manager_test.go

@D3Hunter
Copy link
Copy Markdown
Contributor Author

D3Hunter commented Jun 1, 2026

/retest

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Jun 1, 2026

@D3Hunter: PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test.

Details

In response to this:

/retest

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.

@D3Hunter
Copy link
Copy Markdown
Contributor Author

D3Hunter commented Jun 1, 2026

/retest

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Jun 1, 2026

@D3Hunter: PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test.

Details

In response to this:

/retest

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.

@D3Hunter
Copy link
Copy Markdown
Contributor Author

D3Hunter commented Jun 1, 2026

/retest

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Jun 1, 2026

@D3Hunter: PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test.

Details

In response to this:

/retest

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.

Copy link
Copy Markdown
Contributor Author

@D3Hunter D3Hunter left a comment

Choose a reason for hiding this comment

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

Summary

  • Total findings: 4
  • Inline comments: 4
  • Summary-only findings (no inline anchor): 0
Findings (highest risk first)

⚠️ [Major] (1)

  1. Empty-keyspace tasks can get stuck before executor startup (pkg/dxf/framework/taskexecutor/manager.go:320)

🟡 [Minor] (3)

  1. Keyspace mismatch error omits both keyspace values (pkg/dxf/framework/taskexecutor/task_executor.go:265 and pkg/dxf/framework/scheduler/scheduler.go:127)
  2. Test name hides the deliberately mismatched task keyspace (pkg/dxf/importinto/task_executor_test.go:73)
  3. Task-store keyspace resolution is duplicated across scheduler and executor managers (pkg/dxf/framework/taskexecutor/manager.go:319 and pkg/dxf/framework/scheduler/scheduler_manager.go:354)

Comment thread pkg/dxf/framework/taskexecutor/manager.go
Comment thread pkg/dxf/framework/taskexecutor/task_executor.go Outdated
Comment thread pkg/dxf/importinto/task_executor_test.go
Comment thread pkg/dxf/framework/taskexecutor/manager.go
@ti-chi-bot ti-chi-bot Bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jun 2, 2026
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Jun 3, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: joechenrh, wjhuang2016

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

The pull request process is described 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

@ti-chi-bot ti-chi-bot Bot added lgtm approved and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 3, 2026
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Jun 3, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-06-02 06:51:05.311142001 +0000 UTC m=+251566.381459441: ☑️ agreed by joechenrh.
  • 2026-06-03 07:33:37.438099375 +0000 UTC m=+340518.508416765: ☑️ agreed by wjhuang2016.

@D3Hunter
Copy link
Copy Markdown
Contributor Author

D3Hunter commented Jun 3, 2026

/retest

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Jun 3, 2026

@D3Hunter: PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test.

Details

In response to this:

/retest

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.

@D3Hunter
Copy link
Copy Markdown
Contributor Author

D3Hunter commented Jun 3, 2026

/retest

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Jun 3, 2026

@D3Hunter: PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test.

Details

In response to this:

/retest

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.

@D3Hunter
Copy link
Copy Markdown
Contributor Author

D3Hunter commented Jun 3, 2026

/retest

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Jun 3, 2026

@D3Hunter: PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test.

Details

In response to this:

/retest

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.

@D3Hunter
Copy link
Copy Markdown
Contributor Author

D3Hunter commented Jun 4, 2026

/retest

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Jun 4, 2026

@D3Hunter: PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test.

Details

In response to this:

/retest

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.

@D3Hunter
Copy link
Copy Markdown
Contributor Author

D3Hunter commented Jun 4, 2026

/retest

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Jun 4, 2026

@D3Hunter: PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test.

Details

In response to this:

/retest

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 merged commit f9faeaf into pingcap:master Jun 4, 2026
41 of 45 checks passed
@D3Hunter D3Hunter deleted the unify-task-store-creation branch June 4, 2026 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants