mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-23 06:20:48 +02:00
serialize sqlite operations
fix https://github.com/seaweedfs/seaweedfs/issues/3827
This commit is contained in:
1 parent
dff85e9c71
commit
cea73ac008
1 file changed
+2
@@ -74,6 +74,8 @@ func (store *SqliteStore) initialize(dbFile, createTable, upsertQuery string) (e
|
||||
return fmt.Errorf("connect to %s error:%v", dbFile, err)
|
||||
}
|
||||
|
||||
store.DB.SetMaxOpenConns(1)
|
||||
|
||||
if err = store.CreateTable(context.Background(), abstract_sql.DEFAULT_TABLE); err != nil {
|
||||
return fmt.Errorf("init table %s: %v", abstract_sql.DEFAULT_TABLE, err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user