-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.component/ddlThis issue is related to DDL of TiDB.This issue is related to DDL of TiDB.impact/crashcrash/fatalcrash/fatalreport/customerCustomers have encountered this bug.Customers have encountered this bug.severity/criticaltype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.type/regression
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
use this diff to trigger disk quota import on small tables
diff --git a/pkg/ddl/ingest/backend.go b/pkg/ddl/ingest/backend.go
index f11849f70b..cd08ec14c5 100644
--- a/pkg/ddl/ingest/backend.go
+++ b/pkg/ddl/ingest/backend.go
@@ -187,6 +187,8 @@ func (bc *litBackendCtx) Flush(indexID int64, mode FlushMode) (flushed, imported
}
shouldFlush, shouldImport := bc.checkFlush(mode)
+ shouldFlush = true
+ shouldImport = true
if !shouldFlush {
return false, false, nil
}
and print TS used in import, or check TiKV
run TestAddIndexRemoteDuplicateCheck
with the change, or other ADD INDEX that can trigger disk-quota import
diff --git a/tests/realtikvtest/addindextest4/ingest_test.go b/tests/realtikvtes
t/addindextest4/ingest_test.go
index 2e393ce4f8..7a3f91f031 100644
--- a/tests/realtikvtest/addindextest4/ingest_test.go
+++ b/tests/realtikvtest/addindextest4/ingest_test.go
@@ -407,7 +407,8 @@ func TestAddIndexRemoteDuplicateCheck(t *testing.T) {
tk.MustExec("insert into t values(100000, 1, 1);")
ingest.ForceSyncFlagForTest = true
- tk.MustGetErrCode("alter table t add unique index idx(b);", errno.ErrDupEntry)
+ tk.MustExec("alter table t add index idx_test(b);")
+ //tk.MustGetErrCode("alter table t add unique index idx(b);", errno.ErrDupEntry)
ingest.ForceSyncFlagForTest = false
tk.MustExec("set global tidb_ddl_reorg_worker_cnt=4;")
2. What did you expect to see? (Required)
no error
3. What did you see instead (Required)
TiKV panic due to it has data with TS = 0
4. What is your TiDB version? (Required)
Metadata
Metadata
Assignees
Labels
affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.component/ddlThis issue is related to DDL of TiDB.This issue is related to DDL of TiDB.impact/crashcrash/fatalcrash/fatalreport/customerCustomers have encountered this bug.Customers have encountered this bug.severity/criticaltype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.type/regression