f-15: fix: remove lock from db in readonly
All checks were successful
Pre Release Workflow / set-release-target (push) Successful in 1s
Pre Release Workflow / build (agent, amd64, linux) (push) Successful in 1m29s
Pre Release Workflow / build (db, amd64, linux) (push) Successful in 1m29s
Pre Release Workflow / build (dhcp, amd64, linux) (push) Successful in 1m25s
Pre Release Workflow / build (metacli, amd64, linux) (push) Successful in 1m28s
Pre Release Workflow / build (metadata, amd64, linux) (push) Successful in 1m29s
Pre Release Workflow / build (vpc, amd64, linux) (push) Successful in 1m28s
Pre Release Workflow / upload-scripts (run-dnsmasq-in-netns.sh) (push) Successful in 5s
Pre Release Workflow / prerelease (push) Successful in 12s

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-04-06 20:16:24 +02:00
commit bf00d74a26
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632

View file

@ -6,7 +6,8 @@ import (
func InitDB(conf Config, readonly bool) *badger.DB {
opts := badger.DefaultOptions(conf.Path).
WithReadOnly(readonly)
WithReadOnly(readonly).
WithBypassLockGuard(readonly)
opts.Logger = nil
opts.ValueLogFileSize = 10 << 20 // 10 Mo par fichier vlog
opts.NumMemtables = 1