Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multi-schema-change fast reorg has no chance to save checkpoint #53165

Closed
lance6716 opened this issue May 10, 2024 · 0 comments · Fixed by #53233
Closed

multi-schema-change fast reorg has no chance to save checkpoint #53165

lance6716 opened this issue May 10, 2024 · 0 comments · Fixed by #53233
Labels

Comments

@lance6716
Copy link
Contributor

We use FlushModeAuto to save checkpoint

flushed, imported, _, err := TryFlushAllIndexes(s.flushCtrl, FlushModeAuto, s.indexIDs)

But when indexIDs has more than one elements, each index (engine) check flush based on shared last flush time and will update the time immediately

shouldFlush = shouldImport ||
time.Since(bc.timeOfLastFlush.Load()) >= interval

It's unlikely that all engines are flushed

func TryFlushAllIndexes(flushCtrl FlushController, mode FlushMode, indexIDs []int64) (flushed, imported bool, failedIdxID int64, err error) {
allFlushed := true
allImported := true
for _, idxID := range indexIDs {
// TODO(lance6716): use flushCtrl.Flush(indexIDs, mode)
flushed, imported, err := flushCtrl.Flush(idxID, mode)
if err != nil {
return false, false, idxID, err
}
allFlushed = allFlushed && flushed
allImported = allImported && imported
}
return allFlushed, allImported, -1, nil
}
so at caller checkpoint is not updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants