Bug Report
Affected branch: release-8.5 only (introduced by the DXF dynamic-parameter backport #64930, commit e7f04fa; master is NOT affected). Found during a v8.5.4..v8.5.6 PR-by-PR review.
What happened
#63674 (master #63605, closing #63201) added reorgInfo.UpdateConfigFromSysTbl(ctx) to the worker-adjustment ticker in writePhysicalTableRecord, so that ADMIN ALTER DDL JOBS ... THREAD/BATCH_SIZE takes effect on a running txn-mode reorg by refreshing ReorgMeta atomics from mysql.tidb_ddl_job every 2s.
The #64930 backport dropped exactly that line during conflict resolution (-reorgInfo.UpdateConfigFromSysTbl(ctx) in pkg/ddl/backfilling.go). Since then the ticker only compares against the in-memory ReorgMeta — which nothing updates — so the target worker count forever equals the job-start value.
master never lost the line (still present at pkg/ddl/backfilling.go:1110); on release-8.5 only the local-ingest ticker (backfilling.go:886) still calls it. DXF (modifyTaskParamLoop) and local-ingest paths are unaffected.
Impact
With tidb_enable_dist_task=off and tidb_ddl_enable_fast_reorg=off (txn backfill mode), admin alter ddl jobs N thread = X is accepted and persisted but silently has no effect on the running backfill. New parameters only take effect after an owner switch / job restart. No wrong results.
Reproduction (verified end-to-end on a v8.5.7 tikv cluster, 8.4M-row table)
- txn mode (dist_task=off, fast_reorg=off): job accepted
admin alter ddl jobs 117 thread = 32 (job COMMENTS show txn, thread=32), ran 3m33s (~100 ticker ticks) — zero adjust ddl job config success log lines.
- local ingest control (fast_reorg=on): same alter —
adjust ddl job config success appears within 2-5s (backfilling.go:901, workers tuned to 16/32).
This proves the alter itself is effective and the logging works; only the txn path never refreshes the config.
Note: the existing regression test TestFixAdminAlterDDLJobs (tests/realtikvtest/addindextest4/integration_test.go, the mockUpdateColumnWorkerStuck/mockAddIndexTxnWorkerStuck cases) should catch this — worth checking its CI status on release-8.5.
Suggested fix
Restore reorgInfo.UpdateConfigFromSysTbl(ctx) as the first statement of the case <-ticker.C: branch in writePhysicalTableRecord (pkg/ddl/backfilling.go), aligning with master.
Bug Report
Affected branch: release-8.5 only (introduced by the DXF dynamic-parameter backport #64930, commit e7f04fa; master is NOT affected). Found during a v8.5.4..v8.5.6 PR-by-PR review.
What happened
#63674 (master #63605, closing #63201) added
reorgInfo.UpdateConfigFromSysTbl(ctx)to the worker-adjustment ticker inwritePhysicalTableRecord, so thatADMIN ALTER DDL JOBS ... THREAD/BATCH_SIZEtakes effect on a running txn-mode reorg by refreshingReorgMetaatomics frommysql.tidb_ddl_jobevery 2s.The #64930 backport dropped exactly that line during conflict resolution (
-reorgInfo.UpdateConfigFromSysTbl(ctx)inpkg/ddl/backfilling.go). Since then the ticker only compares against the in-memoryReorgMeta— which nothing updates — so the target worker count forever equals the job-start value.master never lost the line (still present at
pkg/ddl/backfilling.go:1110); on release-8.5 only the local-ingest ticker (backfilling.go:886) still calls it. DXF (modifyTaskParamLoop) and local-ingest paths are unaffected.Impact
With
tidb_enable_dist_task=offandtidb_ddl_enable_fast_reorg=off(txn backfill mode),admin alter ddl jobs N thread = Xis accepted and persisted but silently has no effect on the running backfill. New parameters only take effect after an owner switch / job restart. No wrong results.Reproduction (verified end-to-end on a v8.5.7 tikv cluster, 8.4M-row table)
admin alter ddl jobs 117 thread = 32(job COMMENTS showtxn, thread=32), ran 3m33s (~100 ticker ticks) — zeroadjust ddl job config successlog lines.adjust ddl job config successappears within 2-5s (backfilling.go:901, workers tuned to 16/32).This proves the alter itself is effective and the logging works; only the txn path never refreshes the config.
Note: the existing regression test
TestFixAdminAlterDDLJobs(tests/realtikvtest/addindextest4/integration_test.go, themockUpdateColumnWorkerStuck/mockAddIndexTxnWorkerStuckcases) should catch this — worth checking its CI status on release-8.5.Suggested fix
Restore
reorgInfo.UpdateConfigFromSysTbl(ctx)as the first statement of thecase <-ticker.C:branch inwritePhysicalTableRecord(pkg/ddl/backfilling.go), aligning with master.