mirror of
https://github.com/ddworken/hishtory.git
synced 2025-07-01 05:01:08 +02:00
Document that we use WAL + run a checkpoint after hishtory imports
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user