Closed lance6716 closed 1 week ago
If the checkpoint record shows the it is generated by current node
https://github.com/pingcap/tidb/blob/c24dca58f5ee68941a656ac898136eaf63070703/pkg/ddl/ingest/checkpoint.go#L307-L308
we skip the data whose key is smaller that "local storage key watermark" and assume the data is already stay in local storage.
https://github.com/pingcap/tidb/blob/c24dca58f5ee68941a656ac898136eaf63070703/pkg/ddl/ingest/checkpoint.go#L128-L137
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.
/tmp
If the checkpoint record shows the it is generated by current node
https://github.com/pingcap/tidb/blob/c24dca58f5ee68941a656ac898136eaf63070703/pkg/ddl/ingest/checkpoint.go#L307-L308
we skip the data whose key is smaller that "local storage key watermark" and assume the data is already stay in local storage.
https://github.com/pingcap/tidb/blob/c24dca58f5ee68941a656ac898136eaf63070703/pkg/ddl/ingest/checkpoint.go#L128-L137
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.