Add support for larger transactions in Raft (#24991)

* Add support for larger transactions in Raft

* Add CHANGELOG

* Appease the new lint rules
This commit is contained in:
Paul Banks
2024-01-24 14:38:39 +00:00
committed by GitHub
parent b85365e980
commit 2d88a454d9
17 changed files with 563 additions and 18 deletions

View File

@@ -86,6 +86,7 @@ var (
_ ToggleablePurgemonster = (*TransactionalCache)(nil)
_ Backend = (*Cache)(nil)
_ Transactional = (*TransactionalCache)(nil)
_ TransactionalLimits = (*TransactionalCache)(nil)
)
// NewCache returns a physical cache of the given size.
@@ -271,3 +272,14 @@ func (c *TransactionalCache) Transaction(ctx context.Context, txns []*TxnEntry)
return nil
}
// TransactionLimits implements physical.TransactionalLimits
func (c *TransactionalCache) TransactionLimits() (int, int) {
if tl, ok := c.Transactional.(TransactionalLimits); ok {
return tl.TransactionLimits()
}
// We don't have any specific limits of our own so return zeros to signal that
// the caller should use whatever reasonable defaults it would if it used a
// non-TransactionalLimits backend.
return 0, 0
}