Do not use tipb.KeyRange. Use EncodeRowKeyWithHandle to generate endKey. Avoid decode values when only need handle.