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

[kudu-CR] tablet: add early returns to maintenance functions

Andrew Wong has uploaded this change for review. ( http://gerrit.cloudera.org:8080/8606


Change subject: tablet: add early returns to maintenance functions
......................................................................

tablet: add early returns to maintenance functions

When a Tablet is stopped, further maintenance ops are not scheduled,
further IO is prevented, etc. This patch optimizes this further to stop
various functions that are called by maintenance threads to prevent
their execution, returning an error instead.

Previously, certain ops (e.g. flush DMS) would guarantee durability by
checking for success. In such cases, it is sufficient to instead check
that the tablet has been stopped.

Currently this is an optimization for tablets that are shutting down to
return early from these calls, but in the future could be useful in
stopping all IO done by a tablet that is failing, e.g. due to disk
failure.

Change-Id: I84ad557851863f6fd9acff28ddcd1244e62cf516
---
M src/kudu/integration-tests/stop_tablet-itest.cc
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet_replica.cc
M src/kudu/tablet/tablet_replica.h
M src/kudu/tablet/tablet_replica_mm_ops.cc
5 files changed, 34 insertions(+), 6 deletions(-)



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I84ad557851863f6fd9acff28ddcd1244e62cf516
Gerrit-Change-Number: 8606
Gerrit-PatchSet: 1
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>

[kudu-CR] tablet: add early returns to maintenance functions

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

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

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

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

Change subject: tablet: add early returns to maintenance functions
......................................................................

tablet: add early returns to maintenance functions

When a Tablet is stopped, further maintenance ops are not scheduled,
further IO is prevented, etc. This patch optimizes this further to stop
various functions that are called by maintenance threads to prevent
their execution, returning an error instead.

Previously, certain ops (e.g. flush DMS) would guarantee durability by
checking for the success these functions. These checks are now replaced
with on-error checks that the tablet has been stopped, since these
failures are inconsequential if the tablet is stopped.

Currently this is an optimization for tablets that are shutting down to
return early from these calls, but in the future, this could be useful
in stopping all IO done by a tablet that is failing, e.g. due to disk
failure.

Change-Id: I84ad557851863f6fd9acff28ddcd1244e62cf516
---
M src/kudu/integration-tests/stop_tablet-itest.cc
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet_replica.cc
M src/kudu/tablet/tablet_replica.h
M src/kudu/tablet/tablet_replica_mm_ops.cc
5 files changed, 34 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/06/8606/6
-- 
To view, visit http://gerrit.cloudera.org:8080/8606
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I84ad557851863f6fd9acff28ddcd1244e62cf516
Gerrit-Change-Number: 8606
Gerrit-PatchSet: 6
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] tablet: add early returns to maintenance functions

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

Change subject: tablet: add early returns to maintenance functions
......................................................................


Patch Set 7:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/8606/6/src/kudu/tablet/tablet_replica_mm_ops.cc
File src/kudu/tablet/tablet_replica_mm_ops.cc:

http://gerrit.cloudera.org:8080/#/c/8606/6/src/kudu/tablet/tablet_replica_mm_ops.cc@200
PS6, Line 200: $0 
LogPrefix() includes the trailing space, so it's usually preferable to write it Log(WARNING) << LogPrefix() << ...

but you could also make it Substitute("$0failed...



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I84ad557851863f6fd9acff28ddcd1244e62cf516
Gerrit-Change-Number: 8606
Gerrit-PatchSet: 7
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 21 Nov 2017 20:19:50 +0000
Gerrit-HasComments: Yes

[kudu-CR] tablet: add early returns to maintenance functions

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

Change subject: tablet: add early returns to maintenance functions
......................................................................


Patch Set 8: Code-Review+2

(1 comment)

http://gerrit.cloudera.org:8080/#/c/8606/5/src/kudu/integration-tests/stop_tablet-itest.cc
File src/kudu/integration-tests/stop_tablet-itest.cc:

http://gerrit.cloudera.org:8080/#/c/8606/5/src/kudu/integration-tests/stop_tablet-itest.cc@93
PS5, Line 93: server.
> I think that's an optimization, but it wouldn't get the same result as canc
hmm, ok



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I84ad557851863f6fd9acff28ddcd1244e62cf516
Gerrit-Change-Number: 8606
Gerrit-PatchSet: 8
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 21 Nov 2017 22:36:48 +0000
Gerrit-HasComments: Yes

[kudu-CR] tablet: add early returns to maintenance functions

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

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

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

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

Change subject: tablet: add early returns to maintenance functions
......................................................................

tablet: add early returns to maintenance functions

When a Tablet is stopped, further maintenance ops are not scheduled,
further IO is prevented, etc. This patch optimizes this further to stop
various functions that are called by maintenance threads to prevent
their execution, returning an error instead.

Previously, certain ops (e.g. flush DMS) would guarantee durability by
checking for the success these functions. These checks are now replaced
with on-error checks that the tablet has been stopped, since these
failures are inconsequential if the tablet is stopped.

Currently this is an optimization for tablets that are shutting down to
return early from these calls, but in the future, this could be useful
in stopping all IO done by a tablet that is failing, e.g. due to disk
failure.

Change-Id: I84ad557851863f6fd9acff28ddcd1244e62cf516
---
M src/kudu/integration-tests/stop_tablet-itest.cc
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet_replica.cc
M src/kudu/tablet/tablet_replica.h
M src/kudu/tablet/tablet_replica_mm_ops.cc
5 files changed, 34 insertions(+), 6 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I84ad557851863f6fd9acff28ddcd1244e62cf516
Gerrit-Change-Number: 8606
Gerrit-PatchSet: 2
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] tablet: add early returns to maintenance functions

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

Change subject: tablet: add early returns to maintenance functions
......................................................................

tablet: add early returns to maintenance functions

When a Tablet is stopped, further maintenance ops are not scheduled,
further IO is prevented, etc. This patch optimizes this further to stop
various functions that are called by maintenance threads to prevent
their execution, returning an error instead.

Previously, certain ops (e.g. flush DMS) would guarantee durability by
checking for the success these functions. These checks are now replaced
with on-error checks that the tablet has been stopped, since these
failures are inconsequential if the tablet is stopped.

Currently this is an optimization for tablets that are shutting down to
return early from these calls, but in the future, this could be useful
in stopping all IO done by a tablet that is failing, e.g. due to disk
failure.

Change-Id: I84ad557851863f6fd9acff28ddcd1244e62cf516
Reviewed-on: http://gerrit.cloudera.org:8080/8606
Tested-by: Kudu Jenkins
Reviewed-by: Mike Percy <mp...@apache.org>
---
M src/kudu/integration-tests/stop_tablet-itest.cc
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet_replica.cc
M src/kudu/tablet/tablet_replica.h
M src/kudu/tablet/tablet_replica_mm_ops.cc
5 files changed, 34 insertions(+), 8 deletions(-)

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

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I84ad557851863f6fd9acff28ddcd1244e62cf516
Gerrit-Change-Number: 8606
Gerrit-PatchSet: 10
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] tablet: add early returns to maintenance functions

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

Change subject: tablet: add early returns to maintenance functions
......................................................................


Patch Set 8:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/8606/6/src/kudu/tablet/tablet_replica_mm_ops.cc
File src/kudu/tablet/tablet_replica_mm_ops.cc:

http://gerrit.cloudera.org:8080/#/c/8606/6/src/kudu/tablet/tablet_replica_mm_ops.cc@200
PS6, Line 200: ())
> LogPrefix() includes the trailing space, so it's usually preferable to writ
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I84ad557851863f6fd9acff28ddcd1244e62cf516
Gerrit-Change-Number: 8606
Gerrit-PatchSet: 8
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 21 Nov 2017 22:31:02 +0000
Gerrit-HasComments: Yes

[kudu-CR] tablet: add early returns to maintenance functions

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

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

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

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

Change subject: tablet: add early returns to maintenance functions
......................................................................

tablet: add early returns to maintenance functions

When a Tablet is stopped, further maintenance ops are not scheduled,
further IO is prevented, etc. This patch optimizes this further to stop
various functions that are called by maintenance threads to prevent
their execution, returning an error instead.

Previously, certain ops (e.g. flush DMS) would guarantee durability by
checking for the success these functions. These checks are now replaced
with on-error checks that the tablet has been stopped, since these
failures are inconsequential if the tablet is stopped.

Currently this is an optimization for tablets that are shutting down to
return early from these calls, but in the future, this could be useful
in stopping all IO done by a tablet that is failing, e.g. due to disk
failure.

Change-Id: I84ad557851863f6fd9acff28ddcd1244e62cf516
---
M src/kudu/integration-tests/stop_tablet-itest.cc
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet_replica.cc
M src/kudu/tablet/tablet_replica.h
M src/kudu/tablet/tablet_replica_mm_ops.cc
5 files changed, 31 insertions(+), 6 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I84ad557851863f6fd9acff28ddcd1244e62cf516
Gerrit-Change-Number: 8606
Gerrit-PatchSet: 5
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] tablet: add early returns to maintenance functions

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

Change subject: tablet: add early returns to maintenance functions
......................................................................


Patch Set 5:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/8606/5//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/8606/5//COMMIT_MSG@11
PS5, Line 11: prevent
This sounds like reasonable approach. Why bother with trying to unschedule them all when we can just do this?


http://gerrit.cloudera.org:8080/#/c/8606/5/src/kudu/integration-tests/stop_tablet-itest.cc
File src/kudu/integration-tests/stop_tablet-itest.cc:

http://gerrit.cloudera.org:8080/#/c/8606/5/src/kudu/integration-tests/stop_tablet-itest.cc@93
PS5, Line 93: hog the maintenance threads
Shouldn't the "prepare" step of the MM ops simply check for kOpen state as well, then?


http://gerrit.cloudera.org:8080/#/c/8606/5/src/kudu/tablet/tablet_replica.cc
File src/kudu/tablet/tablet_replica.cc:

http://gerrit.cloudera.org:8080/#/c/8606/5/src/kudu/tablet/tablet_replica.cc@690
PS5, Line 690: state_change_guard
nit: there are lots of variable names to read here already; we usually just name these guards "l". At first scan I thought we managed to name a lock "state_change_guard"


http://gerrit.cloudera.org:8080/#/c/8606/5/src/kudu/tablet/tablet_replica_mm_ops.cc
File src/kudu/tablet/tablet_replica_mm_ops.cc:

http://gerrit.cloudera.org:8080/#/c/8606/5/src/kudu/tablet/tablet_replica_mm_ops.cc@200
PS5, Line 200:     LOG(WARNING) << Substitute("Failed to flush DMS on $0: $1",
nit: when logging, it's best to use the standard prefix when possible, which is 

  T <tablet id> P <server uuid>: Message

Because it allows for easily grepping through large archives of log files.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I84ad557851863f6fd9acff28ddcd1244e62cf516
Gerrit-Change-Number: 8606
Gerrit-PatchSet: 5
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 21 Nov 2017 05:06:53 +0000
Gerrit-HasComments: Yes

[kudu-CR] tablet: add early returns to maintenance functions

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

Change subject: tablet: add early returns to maintenance functions
......................................................................


Patch Set 9: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I84ad557851863f6fd9acff28ddcd1244e62cf516
Gerrit-Change-Number: 8606
Gerrit-PatchSet: 9
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Wed, 22 Nov 2017 05:26:49 +0000
Gerrit-HasComments: No

[kudu-CR] tablet: add early returns to maintenance functions

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

Change subject: tablet: add early returns to maintenance functions
......................................................................


Patch Set 6:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/8606/5//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/8606/5//COMMIT_MSG@11
PS5, Line 11: prevent
> This sounds like reasonable approach. Why bother with trying to unschedule 
Mentioned in slack, this only aborts execution, but they can still be scheduled. If that happens, we can get stuck in a loop of scheduling an op and aborting (unless the op is eventually canceled).


http://gerrit.cloudera.org:8080/#/c/8606/5/src/kudu/integration-tests/stop_tablet-itest.cc
File src/kudu/integration-tests/stop_tablet-itest.cc:

http://gerrit.cloudera.org:8080/#/c/8606/5/src/kudu/integration-tests/stop_tablet-itest.cc@93
PS5, Line 93: hog the maintenance threads
> Shouldn't the "prepare" step of the MM ops simply check for kOpen state as 
I think that's an optimization, but it wouldn't get the same result as canceling ops, since the ops would still be scheduled.


http://gerrit.cloudera.org:8080/#/c/8606/5/src/kudu/tablet/tablet_replica.cc
File src/kudu/tablet/tablet_replica.cc:

http://gerrit.cloudera.org:8080/#/c/8606/5/src/kudu/tablet/tablet_replica.cc@690
PS5, Line 690: state_change_guard
> nit: there are lots of variable names to read here already; we usually just
Done


http://gerrit.cloudera.org:8080/#/c/8606/5/src/kudu/tablet/tablet_replica_mm_ops.cc
File src/kudu/tablet/tablet_replica_mm_ops.cc:

http://gerrit.cloudera.org:8080/#/c/8606/5/src/kudu/tablet/tablet_replica_mm_ops.cc@200
PS5, Line 200:     LOG(WARNING) << Substitute("$0 failed to flush DMS: $1",
> nit: when logging, it's best to use the standard prefix when possible, whic
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I84ad557851863f6fd9acff28ddcd1244e62cf516
Gerrit-Change-Number: 8606
Gerrit-PatchSet: 6
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 21 Nov 2017 09:25:46 +0000
Gerrit-HasComments: Yes

[kudu-CR] tablet: add early returns to maintenance functions

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

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

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

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

Change subject: tablet: add early returns to maintenance functions
......................................................................

tablet: add early returns to maintenance functions

When a Tablet is stopped, further maintenance ops are not scheduled,
further IO is prevented, etc. This patch optimizes this further to stop
various functions that are called by maintenance threads to prevent
their execution, returning an error instead.

Previously, certain ops (e.g. flush DMS) would guarantee durability by
checking for the success these functions. These checks are now replaced
with on-error checks that the tablet has been stopped, since these
failures are inconsequential if the tablet is stopped.

Currently this is an optimization for tablets that are shutting down to
return early from these calls, but in the future, this could be useful
in stopping all IO done by a tablet that is failing, e.g. due to disk
failure.

Change-Id: I84ad557851863f6fd9acff28ddcd1244e62cf516
---
M src/kudu/integration-tests/stop_tablet-itest.cc
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet_replica.cc
M src/kudu/tablet/tablet_replica.h
M src/kudu/tablet/tablet_replica_mm_ops.cc
5 files changed, 34 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/06/8606/4
-- 
To view, visit http://gerrit.cloudera.org:8080/8606
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I84ad557851863f6fd9acff28ddcd1244e62cf516
Gerrit-Change-Number: 8606
Gerrit-PatchSet: 4
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] tablet: add early returns to maintenance functions

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

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

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

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

Change subject: tablet: add early returns to maintenance functions
......................................................................

tablet: add early returns to maintenance functions

When a Tablet is stopped, further maintenance ops are not scheduled,
further IO is prevented, etc. This patch optimizes this further to stop
various functions that are called by maintenance threads to prevent
their execution, returning an error instead.

Previously, certain ops (e.g. flush DMS) would guarantee durability by
checking for the success these functions. These checks are now replaced
with on-error checks that the tablet has been stopped, since these
failures are inconsequential if the tablet is stopped.

Currently this is an optimization for tablets that are shutting down to
return early from these calls, but in the future, this could be useful
in stopping all IO done by a tablet that is failing, e.g. due to disk
failure.

Change-Id: I84ad557851863f6fd9acff28ddcd1244e62cf516
---
M src/kudu/integration-tests/stop_tablet-itest.cc
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet_replica.cc
M src/kudu/tablet/tablet_replica.h
M src/kudu/tablet/tablet_replica_mm_ops.cc
5 files changed, 34 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/06/8606/8
-- 
To view, visit http://gerrit.cloudera.org:8080/8606
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I84ad557851863f6fd9acff28ddcd1244e62cf516
Gerrit-Change-Number: 8606
Gerrit-PatchSet: 8
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] tablet: add early returns to maintenance functions

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

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

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

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

Change subject: tablet: add early returns to maintenance functions
......................................................................

tablet: add early returns to maintenance functions

When a Tablet is stopped, further maintenance ops are not scheduled,
further IO is prevented, etc. This patch optimizes this further to stop
various functions that are called by maintenance threads to prevent
their execution, returning an error instead.

Previously, certain ops (e.g. flush DMS) would guarantee durability by
checking for the success these functions. These checks are now replaced
with on-error checks that the tablet has been stopped, since these
failures are inconsequential if the tablet is stopped.

Currently this is an optimization for tablets that are shutting down to
return early from these calls, but in the future, this could be useful
in stopping all IO done by a tablet that is failing, e.g. due to disk
failure.

Change-Id: I84ad557851863f6fd9acff28ddcd1244e62cf516
---
M src/kudu/integration-tests/stop_tablet-itest.cc
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet_replica.cc
M src/kudu/tablet/tablet_replica.h
M src/kudu/tablet/tablet_replica_mm_ops.cc
5 files changed, 34 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/06/8606/7
-- 
To view, visit http://gerrit.cloudera.org:8080/8606
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I84ad557851863f6fd9acff28ddcd1244e62cf516
Gerrit-Change-Number: 8606
Gerrit-PatchSet: 7
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>