Document that we use WAL + run a checkpoint after hishtory imports

This commit is contained in:
David Dworken
2022-11-11 17:14:11 -05:00
parent 9c47afbe54
commit 42e0ac2195
3 changed files with 3 additions and 2 deletions

View File

@ -584,6 +584,8 @@ func ImportHistory(ctx *context.Context, shouldReadStdin bool) (int, error) {
if err != nil {
return 0, fmt.Errorf("failed to mark initial import as completed, this may lead to duplicate history entries: %v", err)
}
// Trigger a checkpoint so that these bulk entries are added from the WAL to the main DB
db.Exec("PRAGMA wal_checkpoint")
return len(historyEntries), nil
}