Skip to content

Improve sqlite3_dotlk to avoid stale locks #205

@ncruces

Description

@ncruces

Use the locking algorithm from miquels/liblockfile (also bruceg/dotlock and nightlyone/lockfile) to avoid crashes being unrecoverable from.

Only on Unix, and only for the main database lock.

Outside Unix, keep using O_EXCL for the main database lock: it's a portable Go API for this purpose, which any Go platform should support.

For the shared memory index, keep using Mkdir to "reserve" the file name, which improves data safety, as it conflicts with the default VFSes.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions