mirror of
https://github.com/talent-plan/tinykv.git
synced 2024-12-26 12:50:11 +08:00
parent
d975005666
commit
28f12587cb
@ -261,7 +261,7 @@ func (ps *PeerStorage) clearExtraData(newRegion *metapb.Region) {
|
||||
if bytes.Compare(oldStartKey, newStartKey) < 0 {
|
||||
ps.clearRange(newRegion.Id, oldStartKey, newStartKey)
|
||||
}
|
||||
if bytes.Compare(newEndKey, oldEndKey) < 0 {
|
||||
if bytes.Compare(newEndKey, oldEndKey) < 0 || (len(oldEndKey) == 0 && len(newEndKey) != 0) {
|
||||
ps.clearRange(newRegion.Id, newEndKey, oldEndKey)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user