[xCluster] Handle Large transaction Apply on consumer #16826
Labels
area/docdb
YugabyteDB core features
kind/enhancement
This is an enhancement of an existing feature
priority/medium
Medium priority issue
xCluster
Label for xCluster related issues/improvements
Jira Link: DB-6176
Description
Large transactions apply batching....
Flag txn_max_apply_batch_records
Notes:
What's the impact of this on large transactions that involve moving a lot of intents to Regular DB.
Impact: Replication stalls during this step.
Notes: Large transactions we only apply a limited number of intents, and then write a checkpoint entry in regular rocksDB and async apply rest of the intents. There is just 1 APPLYING OP, but RegularDB will have special checkpoints (intent key or key for reverse index).
Problem: 1. Amount of data can be so large that it can affect cluster stability. We need to split to batches. 2. Raft DoReplicated holds raft locks which will block raft heartbeats causing lease losses.
This SHOULD be disabled on the consumer side. We should keep the batching and async apply. But the WriteRequest RPC should wait for all batch to complete.
Make sure intent aware iterator can deal with intents moving to regular db during a scan.
Next steps: Test this! >100k KVs (with packed). Copy with a million rows. Without any changes does it break consistency or bring down the cluster?
Warning: Please confirm that this issue does not contain any sensitive information
The text was updated successfully, but these errors were encountered: