Skip to content

Commit

Permalink
kv: fix transaction too large error message (#17198) (#17219)
Browse files Browse the repository at this point in the history
  • Loading branch information
sre-bot authored May 19, 2020
1 parent e481b9f commit 6098373
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kv/memdb_buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (m *memDbBuffer) Set(k Key, v []byte) error {

m.sandbox.Put(k, v)
if m.Size() > int(m.bufferSizeLimit) {
return ErrTxnTooLarge.GenWithStackByArgs(m.Size())
return ErrTxnTooLarge.GenWithStackByArgs(atomic.LoadUint64(&TxnTotalSizeLimit))
}
return nil
}
Expand All @@ -108,7 +108,7 @@ func (m *memDbBuffer) Set(k Key, v []byte) error {
func (m *memDbBuffer) Delete(k Key) error {
m.sandbox.Put(k, nil)
if m.Size() > int(m.bufferSizeLimit) {
return ErrTxnTooLarge.GenWithStackByArgs(m.Size())
return ErrTxnTooLarge.GenWithStackByArgs(atomic.LoadUint64(&TxnTotalSizeLimit))
}
return nil
}
Expand Down

0 comments on commit 6098373

Please sign in to comment.