client-go
client-go copied to clipboard
[WIP] Introduce Codec
This PR aims unify CodecPDClient and CodecPDClientV2 by introducing a Codec interface.
There is a bug that might block this pull request: https://github.com/tikv/client-go/blob/bb026bdad8f34604cc01fdafbaf4063729583a44/txnkv/txnsnapshot/scan.go#L217. We should use to check if we need to proceed the scan:
if len(reqEndKey) == 0 || (len(loc.EndKey) > 0 && bytes.Compare(loc.EndKey, reqEndKey) < 0) {
reqEndKey = loc.EndKey
}