cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.16k stars 3.82k forks source link

kvserver: add setting to reject overly large transactions #135945

Open andrewbaptist opened 13 hours ago

andrewbaptist commented 13 hours ago

Previously we had an ability to reject transactions that had too many intents, however this was tied together with the limit where we condense spans. The limits have too different purposes and should be set independently. The condense size limit (kv.transaction.max_intents_bytes) is used to protect the memory on the client side by using less precise tracking once it passes a certain size. The new limit (kv.transaction.reject_intents_bytes) is intended to protect the server side by preventing a client from creating a transaction with too many bytes in it. Large transactions are suboptimal for a few reasons.

Epic: none

Release note (ops change): Adds a new configurable parameter kv.transaction.reject_intents_bytes which will prevent client transactions from getting too large.

cockroach-teamcity commented 13 hours ago

This change is Reviewable