mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-10-14 00:59:33 +00:00
Don't fsync immediately after all writes (#1490)
This commit is contained in:
parent
8941c518fc
commit
a792d4a19e
@ -8,6 +8,7 @@ var (
|
||||
BlockCacheCapacity: 256 * opt.MiB,
|
||||
WriteBuffer: 128 * opt.MiB,
|
||||
DisableSeeksCompaction: true,
|
||||
NoSync: true,
|
||||
}
|
||||
|
||||
// Options is a function that returns a leveldb
|
||||
|
@ -4,7 +4,6 @@ import (
|
||||
"github.com/kaspanet/kaspad/infrastructure/db/database"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/syndtr/goleveldb/leveldb"
|
||||
"github.com/syndtr/goleveldb/leveldb/opt"
|
||||
)
|
||||
|
||||
// LevelDBTransaction is a thin wrapper around native leveldb
|
||||
@ -41,7 +40,7 @@ func (tx *LevelDBTransaction) Commit() error {
|
||||
}
|
||||
|
||||
tx.isClosed = true
|
||||
return errors.WithStack(tx.db.ldb.Write(tx.batch, &opt.WriteOptions{Sync: true}))
|
||||
return errors.WithStack(tx.db.ldb.Write(tx.batch, nil))
|
||||
}
|
||||
|
||||
// Rollback rolls back whatever changes were made to the
|
||||
|
Loading…
x
Reference in New Issue
Block a user