You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Adar Dembo (Code Review)" <ge...@cloudera.org> on 2019/06/06 08:04:14 UTC

[kudu-CR] KUDU-2809 (2/6): skip unobservable rows when iterating an MRS

Hello Will Berkeley, Mike Percy, Grant Henke,

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

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

to review the following change.


Change subject: KUDU-2809 (2/6): skip unobservable rows when iterating an MRS
......................................................................

KUDU-2809 (2/6): skip unobservable rows when iterating an MRS

An unobservable row is one whose entire lifespan is contained within the
time range of a diff scan. Such rows should be hidden from the diff scan
results as they represent "changes" that the client wouldn't expect to see.

This patch adds such a heuristic to the MRS iterator. It's relatively
straight-forward because the MRS only stores REDOs and always remembers its
rows' insertion timestamps. Delta stores are more complicated; a patch for
handling unobservable rows for them will follow.

Change-Id: I801991260749d1f810540cb32ec84c3ea6a02160
---
M src/kudu/tablet/memrowset-test.cc
M src/kudu/tablet/memrowset.cc
M src/kudu/tablet/memrowset.h
M src/kudu/tablet/tablet-test.cc
4 files changed, 132 insertions(+), 11 deletions(-)



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I801991260749d1f810540cb32ec84c3ea6a02160
Gerrit-Change-Number: 13534
Gerrit-PatchSet: 1
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>

[kudu-CR] KUDU-2809 (2/6): skip unobservable rows when iterating an MRS

Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Will Berkeley has posted comments on this change. ( http://gerrit.cloudera.org:8080/13534 )

Change subject: KUDU-2809 (2/6): skip unobservable rows when iterating an MRS
......................................................................


Patch Set 2: Code-Review+1


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I801991260749d1f810540cb32ec84c3ea6a02160
Gerrit-Change-Number: 13534
Gerrit-PatchSet: 2
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Thu, 06 Jun 2019 22:18:02 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-2809 (2/6): skip unobservable rows when iterating an MRS

Posted by "Mike Percy (Code Review)" <ge...@cloudera.org>.
Mike Percy has posted comments on this change. ( http://gerrit.cloudera.org:8080/13534 )

Change subject: KUDU-2809 (2/6): skip unobservable rows when iterating an MRS
......................................................................


Patch Set 3: Code-Review+2

(1 comment)

http://gerrit.cloudera.org:8080/#/c/13534/2/src/kudu/tablet/memrowset.h
File src/kudu/tablet/memrowset.h:

http://gerrit.cloudera.org:8080/#/c/13534/2/src/kudu/tablet/memrowset.h@593
PS2, Line 593:                                       bool insert_excluded,
> I did; see L569-L570.
I should have highlighted it; I was talking about insert_excluded not apply_status, which lgtm, but I wouldn't say it's a blocker since looking at the impl makes it clear



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I801991260749d1f810540cb32ec84c3ea6a02160
Gerrit-Change-Number: 13534
Gerrit-PatchSet: 3
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Fri, 07 Jun 2019 07:06:54 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2809 (2/6): skip unobservable rows when iterating an MRS

Posted by "Mike Percy (Code Review)" <ge...@cloudera.org>.
Mike Percy has posted comments on this change. ( http://gerrit.cloudera.org:8080/13534 )

Change subject: KUDU-2809 (2/6): skip unobservable rows when iterating an MRS
......................................................................


Patch Set 6: Code-Review+2

(1 comment)

http://gerrit.cloudera.org:8080/#/c/13534/2/src/kudu/tablet/memrowset.h
File src/kudu/tablet/memrowset.h:

http://gerrit.cloudera.org:8080/#/c/13534/2/src/kudu/tablet/memrowset.h@593
PS2, Line 593:                                       bool insert_excluded,
> But insert_excluded _is_ documented. Here's the full block comment:
Thanks for pointing that out. It must have been too late to be reviewing bit patches when I finished up last night. I don't love the function comment above the enum but NBD.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I801991260749d1f810540cb32ec84c3ea6a02160
Gerrit-Change-Number: 13534
Gerrit-PatchSet: 6
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Fri, 07 Jun 2019 18:47:00 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2809 (2/6): skip unobservable rows when iterating an MRS

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/13534 )

Change subject: KUDU-2809 (2/6): skip unobservable rows when iterating an MRS
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/13534/2/src/kudu/tablet/memrowset.h
File src/kudu/tablet/memrowset.h:

http://gerrit.cloudera.org:8080/#/c/13534/2/src/kudu/tablet/memrowset.h@586
PS2, Line 586: row
             :     // row 
> nit: s/row row/row/
Done


http://gerrit.cloudera.org:8080/#/c/13534/2/src/kudu/tablet/memrowset.h@593
PS2, Line 593:                                       bool insert_excluded,
> nit: maybe doc this param
I did; see L569-L570.

It's a quirky style (bunching up the enum definition with the function) but I like that it "scopes" the enum to just this one usage.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I801991260749d1f810540cb32ec84c3ea6a02160
Gerrit-Change-Number: 13534
Gerrit-PatchSet: 2
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Fri, 07 Jun 2019 05:52:04 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2809 (2/6): skip unobservable rows when iterating an MRS

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Hello Will Berkeley, Mike Percy, Kudu Jenkins, Grant Henke, 

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

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

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

Change subject: KUDU-2809 (2/6): skip unobservable rows when iterating an MRS
......................................................................

KUDU-2809 (2/6): skip unobservable rows when iterating an MRS

An unobservable row is one whose entire lifespan is contained within the
time range of a diff scan. Such rows should be hidden from the diff scan
results as they represent "changes" that the client wouldn't expect to see.

This patch adds such a heuristic to the MRS iterator. It's relatively
straight-forward because the MRS only stores REDOs and always remembers its
rows' insertion timestamps. Delta stores are more complicated; a patch for
handling unobservable rows for them will follow.

Change-Id: I801991260749d1f810540cb32ec84c3ea6a02160
---
M src/kudu/tablet/memrowset-test.cc
M src/kudu/tablet/memrowset.cc
M src/kudu/tablet/memrowset.h
M src/kudu/tablet/tablet-test.cc
4 files changed, 132 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/34/13534/5
-- 
To view, visit http://gerrit.cloudera.org:8080/13534
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I801991260749d1f810540cb32ec84c3ea6a02160
Gerrit-Change-Number: 13534
Gerrit-PatchSet: 5
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>

[kudu-CR] KUDU-2809 (2/6): skip unobservable rows when iterating an MRS

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Hello Will Berkeley, Mike Percy, Kudu Jenkins, Grant Henke, 

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

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

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

Change subject: KUDU-2809 (2/6): skip unobservable rows when iterating an MRS
......................................................................

KUDU-2809 (2/6): skip unobservable rows when iterating an MRS

An unobservable row is one whose entire lifespan is contained within the
time range of a diff scan. Such rows should be hidden from the diff scan
results as they represent "changes" that the client wouldn't expect to see.

This patch adds such a heuristic to the MRS iterator. It's relatively
straight-forward because the MRS only stores REDOs and always remembers its
rows' insertion timestamps. Delta stores are more complicated; a patch for
handling unobservable rows for them will follow.

Change-Id: I801991260749d1f810540cb32ec84c3ea6a02160
---
M src/kudu/tablet/memrowset-test.cc
M src/kudu/tablet/memrowset.cc
M src/kudu/tablet/memrowset.h
M src/kudu/tablet/tablet-test.cc
4 files changed, 132 insertions(+), 11 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I801991260749d1f810540cb32ec84c3ea6a02160
Gerrit-Change-Number: 13534
Gerrit-PatchSet: 3
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>

[kudu-CR] KUDU-2809 (2/6): skip unobservable rows when iterating an MRS

Posted by "Mike Percy (Code Review)" <ge...@cloudera.org>.
Mike Percy has posted comments on this change. ( http://gerrit.cloudera.org:8080/13534 )

Change subject: KUDU-2809 (2/6): skip unobservable rows when iterating an MRS
......................................................................


Patch Set 2: Code-Review+2

(2 comments)

http://gerrit.cloudera.org:8080/#/c/13534/2/src/kudu/tablet/memrowset.h
File src/kudu/tablet/memrowset.h:

http://gerrit.cloudera.org:8080/#/c/13534/2/src/kudu/tablet/memrowset.h@586
PS2, Line 586: row
             :     // row 
nit: s/row row/row/


http://gerrit.cloudera.org:8080/#/c/13534/2/src/kudu/tablet/memrowset.h@593
PS2, Line 593:                                       bool insert_excluded,
nit: maybe doc this param



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I801991260749d1f810540cb32ec84c3ea6a02160
Gerrit-Change-Number: 13534
Gerrit-PatchSet: 2
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Fri, 07 Jun 2019 00:55:13 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2809 (2/6): skip unobservable rows when iterating an MRS

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/13534 )

Change subject: KUDU-2809 (2/6): skip unobservable rows when iterating an MRS
......................................................................

KUDU-2809 (2/6): skip unobservable rows when iterating an MRS

An unobservable row is one whose entire lifespan is contained within the
time range of a diff scan. Such rows should be hidden from the diff scan
results as they represent "changes" that the client wouldn't expect to see.

This patch adds such a heuristic to the MRS iterator. It's relatively
straight-forward because the MRS only stores REDOs and always remembers its
rows' insertion timestamps. Delta stores are more complicated; a patch for
handling unobservable rows for them will follow.

Change-Id: I801991260749d1f810540cb32ec84c3ea6a02160
Reviewed-on: http://gerrit.cloudera.org:8080/13534
Reviewed-by: Mike Percy <mp...@apache.org>
Tested-by: Kudu Jenkins
---
M src/kudu/tablet/memrowset-test.cc
M src/kudu/tablet/memrowset.cc
M src/kudu/tablet/memrowset.h
M src/kudu/tablet/tablet-test.cc
4 files changed, 132 insertions(+), 11 deletions(-)

Approvals:
  Mike Percy: Looks good to me, approved
  Kudu Jenkins: Verified

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I801991260749d1f810540cb32ec84c3ea6a02160
Gerrit-Change-Number: 13534
Gerrit-PatchSet: 7
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>

[kudu-CR] KUDU-2809 (2/6): skip unobservable rows when iterating an MRS

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/13534 )

Change subject: KUDU-2809 (2/6): skip unobservable rows when iterating an MRS
......................................................................


Patch Set 4:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/13534/2/src/kudu/tablet/memrowset.h
File src/kudu/tablet/memrowset.h:

http://gerrit.cloudera.org:8080/#/c/13534/2/src/kudu/tablet/memrowset.h@593
PS2, Line 593:                                       bool insert_excluded,
> I should have highlighted it; I was talking about insert_excluded not apply
But insert_excluded _is_ documented. Here's the full block comment:

  // Walks the mutations in 'mutation_head', applying relevant ones to 'dst_row'
  // (performing any allocations out of 'dst_arena'). 'insert_excluded' is true
  // if the row's original insertion took place outside the iterator's time range.
  //
  // On success, 'apply_status' summarizes the application process.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I801991260749d1f810540cb32ec84c3ea6a02160
Gerrit-Change-Number: 13534
Gerrit-PatchSet: 4
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Fri, 07 Jun 2019 07:12:34 +0000
Gerrit-HasComments: Yes