-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.component/ddlThis issue is related to DDL of TiDB.This issue is related to DDL of TiDB.severity/majortype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
If the checkpoint record shows the it is generated by current node
tidb/pkg/ddl/ingest/checkpoint.go
Lines 307 to 308 in c24dca5
if s.instanceAddr == cp.InstanceAddr || cp.InstanceAddr == "" /* initial state */ { | |
s.localDataIsValid = true |
we skip the data whose key is smaller that "local storage key watermark" and assume the data is already stay in local storage.
tidb/pkg/ddl/ingest/checkpoint.go
Lines 128 to 137 in c24dca5
// IsComplete checks if the task is complete. | |
// This is called before the reader reads the data and decides whether to skip the current task. | |
func (s *CheckpointManager) IsComplete(end kv.Key) bool { | |
s.mu.Lock() | |
defer s.mu.Unlock() | |
if len(s.minKeySyncGlobal) > 0 && end.Cmp(s.minKeySyncGlobal) <= 0 { | |
return true | |
} | |
return s.localDataIsValid && len(s.minKeySyncLocal) > 0 && end.Cmp(s.minKeySyncLocal) <= 0 | |
} |
However this is not reliable, especially we are using /tmp
folder to store the data https://docs.pingcap.com/tidb/stable/command-line-flags-for-tidb-configuration#--temp-dir. If the node restarts in many OS /tmp
folder will be cleaned.
Metadata
Metadata
Assignees
Labels
affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.component/ddlThis issue is related to DDL of TiDB.This issue is related to DDL of TiDB.severity/majortype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.