txn: allow larger initial chunk size for read check-ts for read-consistency
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
When the read check-ts [feature](https://docs.pingcap.com/zh/tidb/dev/system-variables#tidb_rc_read_check_ts%E4%BB%8E-v600-%E7%89%88%E6%9C%AC%E5%BC%80%E5%A7%8B%E5%BC%95%E5%85%A5) is used, there's a constraint that the statement retry could work only when conflicts are detected and there're no result packets are responded to the client yet.
However, the init chunk size has a limit [upper bound](https://docs.pingcap.com/tidb/dev/system-variables#tidb_init_chunk_size) which is 32, which means the select statement may respond error to the client if the total result row number is larger than 32 and there's possible conflict after the first chunk is responded. As a result, the client may receive errors and have to process these errors if the read check-ts feature is enabled and the whole result row number is large, even the conflict happens rarely.
An enhancement for the read check-ts feature is to allow the init chunk size to be adjusted to a larger value like 1024 so the client does not need to handle errors when the conflict happens rarely and the select result row number is large.
Contributor guide
Assessment
This issue has not been assessed yet.