Todd Lipcon has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/5192

Change subject: bshuf_block: fix GetLastKey()
......................................................................

bshuf_block: fix GetLastKey()

This fixes a bug where the bitshuffle encoding would return the wrong
value for GetLastKey(). This function is only used in the case that the
column in question is a non-composite primary key, and so far in real
use cases users have apparently only used bitshuffle-encoded ints as
non-key columns or part of a composite key (in which case the index is
generated on the encoded composite key, not the individual columns)

The result of returning the wrong value for GetLastKey() was that the
resulting index blocks would be incorrect, and seeks based on key would
end up at the wrong row. This could cause spurious "row not found"
errors or even crashes in some cases.

The patch fixes the issue and also expands test coverage to cover the
GetFirstKey/GetLastKey calls.

Change-Id: I83dbc01ebf7a10e69b7fff6b7973967ebf6b4580
---
M src/kudu/cfile/bshuf_block.h
M src/kudu/cfile/encoding-test.cc
2 files changed, 30 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/92/5192/1
-- 
To view, visit http://gerrit.cloudera.org:8080/5192
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I83dbc01ebf7a10e69b7fff6b7973967ebf6b4580
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <[email protected]>

Reply via email to