Skip to content

txnkv: fix the issue that deleteRange cannot use nil as endkey#429

Merged
youjiali1995 merged 1 commit intotikv:masterfrom
oh-my-tidb:delete-range
Feb 24, 2022
Merged

txnkv: fix the issue that deleteRange cannot use nil as endkey#429
youjiali1995 merged 1 commit intotikv:masterfrom
oh-my-tidb:delete-range

Conversation

@disksing
Copy link
Collaborator

See #428

Note: it only fix the issue on client side. We need to update tikv to resolve it completely.

Signed-off-by: disksing i@disksing.com

Signed-off-by: disksing <i@disksing.com>
Comment on lines +1541 to +1544
var end []byte
if len(endKey) > 0 {
end = codec.EncodeBytes(nil, endKey)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not do it for start key too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is innecessary. There will be no key located before "" or encode("") so encode or not encode both are fine.

@youjiali1995 youjiali1995 merged commit e5f932a into tikv:master Feb 24, 2022
@Jy-poi
Copy link

Jy-poi commented Feb 24, 2022

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants