1: IterReverse 很有用,但目前无法指定开始的key, 看计划有TODO,但好久了
type Retriever interface {
Getter
// Iter creates an Iterator positioned on the first entry that k <= entry's key.
// If such entry is not found, it returns an invalid Iterator with no error.
// It yields only keys that < upperBound. If upperBound is nil, it means the upperBound is unbounded.
// The Iterator must be Closed after use.
Iter(k Key, upperBound Key) (Iterator, error)
// IterReverse creates a reversed Iterator positioned on the first entry which key is less than k.
// The returned iterator will iterate from greater key to smaller key.
// If k is nil, the returned iterator will be positioned at the last key.
// TODO: Add lower bound limit
IterReverse(k Key) (Iterator, error)
}
2: tikv写入的时候开始一个Transaction, 写入过程中失败了(比如网络连接断开)有必要rollback吗? 还是直接忽略就可以
3: 实际测试IterReverse返回的iter不在最后一个key上,如果传入参数为nil的话. iter也是无效的
4: tikv的go-client的iter没有找到直接移动到last的选项,比如我想无任何key过滤取我所有数据的最后一条数据