You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Todd Lipcon (Code Review)" <ge...@cloudera.org> on 2017/08/01 01:11:34 UTC

[kudu-CR] KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks

Hello Andrew Wong,

I'd like you to do a code review.  Please visit

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

to review the following change.

Change subject: KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks
......................................................................

KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks

This fixes a bug when seeking past the last element of a prefix-encoded
binary block. In very specific circumstances, described in the JIRA,
this would cause a Status::Corruption() to be returned.

Prior to the fix, the updated test would fail pretty reliably when
looped 50-100 times. With the patch, I looped it 1000 times with no
failure.

Change-Id: I1670b2244d586e4920f0603c48f65ed993a3b12b
---
M src/kudu/cfile/binary_prefix_block.cc
M src/kudu/cfile/encoding-test.cc
2 files changed, 47 insertions(+), 9 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1670b2244d586e4920f0603c48f65ed993a3b12b
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Andrew Wong <an...@cloudera.com>

[kudu-CR] KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has submitted this change and it was merged.

Change subject: KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks
......................................................................


KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks

This fixes a bug when seeking past the last element of a prefix-encoded
binary block. In very specific circumstances, described in the JIRA,
this would cause a Status::Corruption() to be returned.

Prior to the fix, the updated test would fail pretty reliably when
looped 50-100 times. With the patch, I looped it 1000 times with no
failure.

Change-Id: I1670b2244d586e4920f0603c48f65ed993a3b12b
Reviewed-on: http://gerrit.cloudera.org:8080/7545
Tested-by: Kudu Jenkins
Reviewed-by: David Ribeiro Alves <da...@gmail.com>
Reviewed-by: Andrew Wong <aw...@cloudera.com>
---
M src/kudu/cfile/binary_prefix_block.cc
M src/kudu/cfile/encoding-test.cc
2 files changed, 48 insertions(+), 9 deletions(-)

Approvals:
  David Ribeiro Alves: Looks good to me, approved
  Andrew Wong: Looks good to me, but someone else must approve
  Kudu Jenkins: Verified



-- 
To view, visit http://gerrit.cloudera.org:8080/7545
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1670b2244d586e4920f0603c48f65ed993a3b12b
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Andrew Wong <an...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks

Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change.

Change subject: KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks
......................................................................


Patch Set 3: Code-Review+2

-- 
To view, visit http://gerrit.cloudera.org:8080/7545
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1670b2244d586e4920f0603c48f65ed993a3b12b
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Andrew Wong <an...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change.

Change subject: KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7545/1/src/kudu/cfile/encoding-test.cc
File src/kudu/cfile/encoding-test.cc:

PS1, Line 237: static string RandomFormatString(Random* r) {
             :     char buf[8];
> nit: a comment here explaining what a "random" format string is would be ni
Done


-- 
To view, visit http://gerrit.cloudera.org:8080/7545
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1670b2244d586e4920f0603c48f65ed993a3b12b
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Andrew Wong <an...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Hello Andrew Wong, Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

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

to look at the new patch set (#2).

Change subject: KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks
......................................................................

KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks

This fixes a bug when seeking past the last element of a prefix-encoded
binary block. In very specific circumstances, described in the JIRA,
this would cause a Status::Corruption() to be returned.

Prior to the fix, the updated test would fail pretty reliably when
looped 50-100 times. With the patch, I looped it 1000 times with no
failure.

Change-Id: I1670b2244d586e4920f0603c48f65ed993a3b12b
---
M src/kudu/cfile/binary_prefix_block.cc
M src/kudu/cfile/encoding-test.cc
2 files changed, 48 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/45/7545/2
-- 
To view, visit http://gerrit.cloudera.org:8080/7545
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I1670b2244d586e4920f0603c48f65ed993a3b12b
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Andrew Wong <an...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks

Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change.

Change subject: KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7545/2/src/kudu/cfile/encoding-test.cc
File src/kudu/cfile/encoding-test.cc:

PS2, Line 260: Gen
nit: rename to something clearer. maybe: GenerateStringOfLength or something?


-- 
To view, visit http://gerrit.cloudera.org:8080/7545
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1670b2244d586e4920f0603c48f65ed993a3b12b
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Andrew Wong <an...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change.

Change subject: KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7545/2/src/kudu/cfile/encoding-test.cc
File src/kudu/cfile/encoding-test.cc:

PS2, Line 260: Gen
> nit: rename to something clearer. maybe: GenerateStringOfLength or somethin
but the parameter isn't the length, it's just an index of sorts. How about GenTestString()?


-- 
To view, visit http://gerrit.cloudera.org:8080/7545
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1670b2244d586e4920f0603c48f65ed993a3b12b
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Andrew Wong <an...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change.

Change subject: KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks
......................................................................


Patch Set 3: Code-Review+1

-- 
To view, visit http://gerrit.cloudera.org:8080/7545
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1670b2244d586e4920f0603c48f65ed993a3b12b
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Andrew Wong <an...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change.

Change subject: KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks
......................................................................


Patch Set 1: Code-Review+1

(1 comment)

Comment nit, otherwise lgtm

http://gerrit.cloudera.org:8080/#/c/7545/1/src/kudu/cfile/encoding-test.cc
File src/kudu/cfile/encoding-test.cc:

PS1, Line 237: static string RandomFormatString(Random* r) {
             :     char buf[8];
nit: a comment here explaining what a "random" format string is would be nice (e.g. could refer to random length too, but that's not the case)


-- 
To view, visit http://gerrit.cloudera.org:8080/7545
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1670b2244d586e4920f0603c48f65ed993a3b12b
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Andrew Wong <an...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks

Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change.

Change subject: KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7545/2/src/kudu/cfile/encoding-test.cc
File src/kudu/cfile/encoding-test.cc:

PS2, Line 260: Gen
> but the parameter isn't the length, it's just an index of sorts. How about 
sgtm


-- 
To view, visit http://gerrit.cloudera.org:8080/7545
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1670b2244d586e4920f0603c48f65ed993a3b12b
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Andrew Wong <an...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Hello Andrew Wong, Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

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

to look at the new patch set (#3).

Change subject: KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks
......................................................................

KUDU-2085. Fix crash when seeking past end of prefix-encoded blocks

This fixes a bug when seeking past the last element of a prefix-encoded
binary block. In very specific circumstances, described in the JIRA,
this would cause a Status::Corruption() to be returned.

Prior to the fix, the updated test would fail pretty reliably when
looped 50-100 times. With the patch, I looped it 1000 times with no
failure.

Change-Id: I1670b2244d586e4920f0603c48f65ed993a3b12b
---
M src/kudu/cfile/binary_prefix_block.cc
M src/kudu/cfile/encoding-test.cc
2 files changed, 48 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/45/7545/3
-- 
To view, visit http://gerrit.cloudera.org:8080/7545
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I1670b2244d586e4920f0603c48f65ed993a3b12b
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Andrew Wong <an...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>