mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
server: add experimental flag for using shared buffer in transacton write
This commit is contained in:
@@ -438,7 +438,7 @@ func (a *applierV3backend) Txn(ctx context.Context, rt *pb.TxnRequest) (*pb.TxnR
|
||||
// When the transaction contains write operations, we use ReadTx instead of
|
||||
// ConcurrentReadTx to avoid extra overhead of copying buffer.
|
||||
var txn mvcc.TxnWrite
|
||||
if isWrite {
|
||||
if isWrite && a.s.Cfg.ExperimentalTxnModeWriteWithSharedBuffer {
|
||||
txn = mvcc.NewReadOnlyTxnWrite(a.s.KV().Read(mvcc.SharedBufReadTxMode, trace))
|
||||
} else {
|
||||
txn = mvcc.NewReadOnlyTxnWrite(a.s.KV().Read(mvcc.ConcurrentReadTxMode, trace))
|
||||
|
||||
Reference in New Issue
Block a user