Fix bd-144: Update main .db file timestamp after import (WAL mode)
- Added CheckpointWAL method to SQLite storage - Import now checkpoints WAL after completion - Updates main .db file modification time for staleness detection - PRAGMA wal_checkpoint(FULL) flushes WAL to main database
This commit is contained in:
@@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
@@ -242,6 +243,13 @@ func importIssuesCore(ctx context.Context, dbPath string, store storage.Storage,
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Phase 8: Checkpoint WAL to update main .db file timestamp
|
||||
// This ensures staleness detection sees the database as fresh
|
||||
if err := sqliteStore.CheckpointWAL(ctx); err != nil {
|
||||
// Non-fatal - just log warning
|
||||
fmt.Fprintf(os.Stderr, "Warning: failed to checkpoint WAL: %v\n", err)
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user