mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-24 19:19:11 +08:00
weed filer: mysql/postgres use ReadCommitted transaction isolation level for atomic rename
This commit is contained in:
parent
c5a3ff1c35
commit
b4c276263f
@ -26,7 +26,10 @@ type TxOrDB interface {
|
||||
}
|
||||
|
||||
func (store *AbstractSqlStore) BeginTransaction(ctx context.Context) (context.Context, error) {
|
||||
tx, err := store.DB.BeginTx(ctx, nil)
|
||||
tx, err := store.DB.BeginTx(ctx, &sql.TxOptions{
|
||||
Isolation: sql.LevelReadCommitted,
|
||||
ReadOnly: false,
|
||||
})
|
||||
if err != nil {
|
||||
return ctx, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user