cockroachdb/cockroach

kv: expose byte limits through kv.Txn API

开放

#63,661 创建于 2021年4月14日

 (2 条评论) (0 个反应) (0 位负责人)Go (4,124 个派生)batch import
A-kv-clientC-enhancementT-kvhelp wanted

仓库指标

星标
 (32,150 个星标)
PR 合并指标
 (平均合并 5天 4小时) (30 天内合并 26 个 PR)

描述

Currently, the kv.Txn API exposes key limits through the maxRows arg (which is poorly named) of its Scan and ReverseScan methods, but it does not expose an ability to impose a byte limit. Byte limits were introduced into the kv proto API in https://github.com/cockroachdb/cockroach/commit/417aa0843dbc1b816d7326cf223e141aa817bd30. However, because of this limitation in the kv.Txn API, users who want byte limits need to construct raw roachpb protos to be able to use them.

We should add byte limits to the kv.Txn and kv.DB API.

Jira issue: CRDB-6709

贡献者指南