cockroachdb / cockroachdb/cockroach
concurrency: enable VIR on by default
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
Now that the main VIR feature is implemented, we have a few more things to do before being able to enable it by default:
- [ ] Enable VIR metamorphically in roachtests.
- [ ] Put the `preferDistinctTxns` optimization in the initial lock table scan behind a cluster setting, default off. This optimization will help some specific workloads where there is a large number of intents (tens of thousands) from many transactions. But it can also hurt other workloads where there is a large number of intents from the same transaction; in these cases, we can potentially iterate over millions of intent looking for ones from other transactions. This large scan will hurt the performance of the request.
- [ ] Add metrics for the number of evaluation cycles with VIR for the same request. This indicates that the request encounters more and more intents on each iteration, which can lead to a quadratic amount of work to virtually resolve each newly found batch of intents together with all previous ones. If this metric goes up, it would be a signal to disable VIR or to enable the `preferDistinctTxns` optimization.
- [ ] Document the above tradeoffs, so it's clear for customers when to (1) disable VIR, and (2) enable the `preferDistinctTxns` optimization. Maybe add a log line that suggests (1) or (2) should be considered.
Jira issue: CRDB-63028
Epic CRDB-63288
Contributor guide
Assessment
This issue has not been assessed yet.