kv: avoid *Transaction -> []LockUpdate
translation in IntentResolver.ResolveIntents
#77219
Labels
A-kv-transactions
Relating to MVCC and the transactional model.
C-cleanup
Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.
E-quick-win
Likely to be a quick win for someone experienced.
T-kv
KV Team
In #76282, we saw OOMs during a highly concurrent data ingestion workload. The OOMs were permitted in part because CRDB did not push back on the client fast enough, allowing too much async work to build up in the IntentResolver.
To avoid some memory amplification along the intent resolution path, we could rework the contract of
IntentResolver.ResolveIntents
to avoid the eager*Transaction -> []LockUpdate
translation.Instead of calling
LocksAsLockUpdates
here, which allocates memory proportionally to the number of intent spans in a txn, we should haveResolveIntents
accept an interface which lazily transforms eachLockSpan
in aTransaction
to aLockUpdate
in this loop.Jira issue: CRDB-13478
The text was updated successfully, but these errors were encountered: