mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00: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) {
|
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 {
|
if err != nil {
|
||||||
return ctx, err
|
return ctx, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue