From ebb430f52078ed2ce6f418b1ecf5984a1f5bce33 Mon Sep 17 00:00:00 2001 From: Umputun Date: Thu, 2 Jan 2025 00:52:00 -0600 Subject: [PATCH] disable sqlite pragmas --- app/main.go | 2 +- app/storage/storage.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/main.go b/app/main.go index d450d35..766fde1 100644 --- a/app/main.go +++ b/app/main.go @@ -680,7 +680,7 @@ func migrateSamples(ctx context.Context, opts options, samplesDB *storage.Sample } migrateSamples := func(file string, sampleType storage.SampleType, origin storage.SampleOrigin) (*storage.SamplesStats, error) { if _, err := os.Stat(file); err != nil { - log.Printf("[DEBUG] samples file %s not found, err: %v, skip", file, err) + log.Printf("[DEBUG] samples file %s not found, skip", file) return &storage.SamplesStats{}, nil } fh, err := os.Open(file) //nolint:gosec // file path is controlled by the app diff --git a/app/storage/storage.go b/app/storage/storage.go index 3fc773d..0a8a62e 100644 --- a/app/storage/storage.go +++ b/app/storage/storage.go @@ -62,12 +62,12 @@ func (e *Engine) MakeLock() RWLocker { } func setSqlitePragma(db *sqlx.DB) error { - // set pragmas for better concurrency support + // set pragmas for sqlite pragmas := map[string]string{ - "journal_mode": "WAL", - "synchronous": "NORMAL", - "busy_timeout": "5000", - "foreign_keys": "ON", + // "journal_mode": "WAL", + // "synchronous": "NORMAL", + // "busy_timeout": "5000", + // "foreign_keys": "ON", } // set pragma