Reapply "kvdb/postgres: remove global application level lock"

This reverts commit 67419a7c0c.
This commit is contained in:
Alex Akselrod committed 2024-12-12 10:40:33 -08:00
1 parent 3cebd370de
commit f3bb7095b2
3 files changed
-53

No files matched your search

-8
View File
@@ -55,10 +55,6 @@ type Config struct {
// commands. Note that the sqlite keywords to be replaced are
// case-sensitive.
SQLiteCmdReplacements SQLiteCmdReplacements
// WithTxLevelLock when set will ensure that there is a transaction
// level lock.
WithTxLevelLock bool
}
// db holds a reference to the sql db connection.
@@ -79,10 +75,6 @@ type db struct {
// db is the underlying database connection instance.
db *sql.DB
// lock is the global write lock that ensures single writer. This is
// only used if cfg.WithTxLevelLock is set.
lock sync.RWMutex
// table is the name of the table that contains the data for all
// top-level buckets that have keys that cannot be mapped to a distinct
// sql table.