-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Example:
time=2026-02-13T16:51:34.108Z level=ERROR msg="database is locked" component=opstore error="database is locked" query="INSERT INTO `host_cursors` (`host`,`seq`) VALUES (\"plc.directory\",1897383) ON CONFLICT (`host`) DO UPDATE SET `seq`=`excluded`.`seq`" duration=5.004547649s rows=0 file=/home/david/go/pkg/mod/github.com/orandin/[email protected]/logger.go:163
time=2026-02-13T16:51:34.108Z level=ERROR msg="failed to persist cursor" component=ingestor error="database is locked"
Happens when the cursor update happens at the same time as a batch of ops are getting committed (sqlite is single-writer).
This is mostly harmless, since the cursor is persisted every second, so the next attempt will likely succeed. We could maybe convert it into a warning. Or use application-level locking to make sure there are never any concurrent writers? Or tell Gorm to retry automatically?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels