You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Alexey Serbin (Code Review)" <ge...@cloudera.org> on 2018/10/20 06:55:16 UTC

[kudu-CR] [rebalancer] location-aware rebalancer (part 6/n)

Alexey Serbin has uploaded this change for review. ( http://gerrit.cloudera.org:8080/11747


Change subject: [rebalancer] location-aware rebalancer (part 6/n)
......................................................................

[rebalancer] location-aware rebalancer (part 6/n)

Added SetReplace() and CheckCompleteReplace() auxiliary fuctions.
A follow-up patch will start using those.

Change-Id: I80b560d70c4d7383ee89917a359b4bb2f41bfd31
---
M src/kudu/tools/tool_replica_util.cc
M src/kudu/tools/tool_replica_util.h
2 files changed, 155 insertions(+), 0 deletions(-)



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I80b560d70c4d7383ee89917a359b4bb2f41bfd31
Gerrit-Change-Number: 11747
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>

[kudu-CR] [rebalancer] location-aware rebalancer (part 6/n)

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

Change subject: [rebalancer] location-aware rebalancer (part 6/n)
......................................................................


Patch Set 1:

(5 comments)

http://gerrit.cloudera.org:8080/#/c/11747/1/src/kudu/tools/tool_replica_util.h
File src/kudu/tools/tool_replica_util.h:

http://gerrit.cloudera.org:8080/#/c/11747/1/src/kudu/tools/tool_replica_util.h@121
PS1, Line 121: is
> Remove.
Done


http://gerrit.cloudera.org:8080/#/c/11747/1/src/kudu/tools/tool_replica_util.cc
File src/kudu/tools/tool_replica_util.cc:

http://gerrit.cloudera.org:8080/#/c/11747/1/src/kudu/tools/tool_replica_util.cc@415
PS1, Line 415:   if (is_ts_uuid_replace_attr_set) {
             :     // Nothing to do: the replica is already marked with the REPLACE attribute.
             :     return Status::OK();
             :   }
> Why not return from the loop body?
That's a good idea.


http://gerrit.cloudera.org:8080/#/c/11747/1/src/kudu/tools/tool_replica_util.cc@435
PS1, Line 435: if (resp.error().code() == tserver::TabletServerErrorPB::CAS_FAILED &&
             :         cas_failed) {
             :       *cas_failed = true;
             :     }
> I think we should explicitly set cas_failed=false if cas_failed is non-null
Yup, that's a good catch.


http://gerrit.cloudera.org:8080/#/c/11747/1/src/kudu/tools/tool_replica_util.cc@460
PS1, Line 460:   // Check if the replica with UUID 'to_ts_uuid' is in the config, and if it has
             :   // been promoted to voter.
It's a stale comment, I removed it.


http://gerrit.cloudera.org:8080/#/c/11747/1/src/kudu/tools/tool_replica_util.cc@494
PS1, Line 494: is_all_voters
> Why do we need to check this?
I thought making current leader step-down before the non-voter is promoted in some cases might needlessly delay the promotion of already caught-up replica.  Also, the former leader is not going to be evicted anyway before the non-voter become a voter.  In addition, de-moting the former leader at this point slightly increases chances of the former leader to be re-elected in case of network issues and RPC queue overflows.

From the other side, I don't see a lot of benefits demoting current leader early.

I added a comment.  If you think there is something wrong with those arguments, I can remove that logic.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I80b560d70c4d7383ee89917a359b4bb2f41bfd31
Gerrit-Change-Number: 11747
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Tue, 23 Oct 2018 19:05:32 +0000
Gerrit-HasComments: Yes

[kudu-CR] [rebalancer] location-aware rebalancer (part 6/n)

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Hello Will Berkeley, Kudu Jenkins, 

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

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

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

Change subject: [rebalancer] location-aware rebalancer (part 6/n)
......................................................................

[rebalancer] location-aware rebalancer (part 6/n)

Added SetReplace() and CheckCompleteReplace() auxiliary fuctions.
A follow-up patch will start using those.

Change-Id: I80b560d70c4d7383ee89917a359b4bb2f41bfd31
---
M src/kudu/tools/tool_replica_util.cc
M src/kudu/tools/tool_replica_util.h
2 files changed, 157 insertions(+), 0 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I80b560d70c4d7383ee89917a359b4bb2f41bfd31
Gerrit-Change-Number: 11747
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>

[kudu-CR] [rebalancer] location-aware rebalancer (part 6/n)

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

Change subject: [rebalancer] location-aware rebalancer (part 6/n)
......................................................................


Patch Set 4: Verified+1

Unrelated flake in org.apache.kudu.spark.kudu.DefaultSourceTest


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I80b560d70c4d7383ee89917a359b4bb2f41bfd31
Gerrit-Change-Number: 11747
Gerrit-PatchSet: 4
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Mon, 29 Oct 2018 23:05:15 +0000
Gerrit-HasComments: No

[kudu-CR] [rebalancer] location-aware rebalancer (part 6/n)

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has removed Kudu Jenkins from this change.  ( http://gerrit.cloudera.org:8080/11747 )

Change subject: [rebalancer] location-aware rebalancer (part 6/n)
......................................................................


Removed reviewer Kudu Jenkins with the following votes:

* Verified-1 by Kudu Jenkins (120)
-- 
To view, visit http://gerrit.cloudera.org:8080/11747
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: deleteReviewer
Gerrit-Change-Id: I80b560d70c4d7383ee89917a359b4bb2f41bfd31
Gerrit-Change-Number: 11747
Gerrit-PatchSet: 4
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>

[kudu-CR] [rebalancer] location-aware rebalancer (part 6/n)

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

Change subject: [rebalancer] location-aware rebalancer (part 6/n)
......................................................................


Patch Set 2: Code-Review+2

(1 comment)

http://gerrit.cloudera.org:8080/#/c/11747/1/src/kudu/tools/tool_replica_util.cc
File src/kudu/tools/tool_replica_util.cc:

http://gerrit.cloudera.org:8080/#/c/11747/1/src/kudu/tools/tool_replica_util.cc@494
PS1, Line 494: s promoted in
> I thought making current leader step-down before the non-voter is promoted 
(thumbsup)



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I80b560d70c4d7383ee89917a359b4bb2f41bfd31
Gerrit-Change-Number: 11747
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Mon, 29 Oct 2018 17:21:55 +0000
Gerrit-HasComments: Yes

[kudu-CR] [rebalancer] location-aware rebalancer (part 6/n)

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

Change subject: [rebalancer] location-aware rebalancer (part 6/n)
......................................................................


Patch Set 1:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/11747/1/src/kudu/tools/tool_replica_util.h
File src/kudu/tools/tool_replica_util.h:

http://gerrit.cloudera.org:8080/#/c/11747/1/src/kudu/tools/tool_replica_util.h@121
PS1, Line 121: is
Remove.


http://gerrit.cloudera.org:8080/#/c/11747/1/src/kudu/tools/tool_replica_util.cc
File src/kudu/tools/tool_replica_util.cc:

http://gerrit.cloudera.org:8080/#/c/11747/1/src/kudu/tools/tool_replica_util.cc@415
PS1, Line 415:   if (is_ts_uuid_replace_attr_set) {
             :     // Nothing to do: the replica is already marked with the REPLACE attribute.
             :     return Status::OK();
             :   }
Why not return from the loop body?


http://gerrit.cloudera.org:8080/#/c/11747/1/src/kudu/tools/tool_replica_util.cc@435
PS1, Line 435: if (resp.error().code() == tserver::TabletServerErrorPB::CAS_FAILED &&
             :         cas_failed) {
             :       *cas_failed = true;
             :     }
I think we should explicitly set cas_failed=false if cas_failed is non-null, cas_opid_idx was set, and the change config succeeded or failed for a reason besides CAS_FAILED.


http://gerrit.cloudera.org:8080/#/c/11747/1/src/kudu/tools/tool_replica_util.cc@494
PS1, Line 494: is_all_voters
Why do we need to check this?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I80b560d70c4d7383ee89917a359b4bb2f41bfd31
Gerrit-Change-Number: 11747
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Mon, 22 Oct 2018 21:53:59 +0000
Gerrit-HasComments: Yes

[kudu-CR] [rebalancer] location-aware rebalancer (part 6/n)

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

Change subject: [rebalancer] location-aware rebalancer (part 6/n)
......................................................................

[rebalancer] location-aware rebalancer (part 6/n)

Added SetReplace() and CheckCompleteReplace() auxiliary fuctions.
A follow-up patch will start using those.

Change-Id: I80b560d70c4d7383ee89917a359b4bb2f41bfd31
Reviewed-on: http://gerrit.cloudera.org:8080/11747
Tested-by: Alexey Serbin <as...@cloudera.com>
Reviewed-by: Will Berkeley <wd...@gmail.com>
---
M src/kudu/tools/tool_replica_util.cc
M src/kudu/tools/tool_replica_util.h
2 files changed, 157 insertions(+), 0 deletions(-)

Approvals:
  Alexey Serbin: Verified
  Will Berkeley: Looks good to me, approved

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I80b560d70c4d7383ee89917a359b4bb2f41bfd31
Gerrit-Change-Number: 11747
Gerrit-PatchSet: 5
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>

[kudu-CR] [rebalancer] location-aware rebalancer (part 6/n)

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

Change subject: [rebalancer] location-aware rebalancer (part 6/n)
......................................................................


Patch Set 4: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I80b560d70c4d7383ee89917a359b4bb2f41bfd31
Gerrit-Change-Number: 11747
Gerrit-PatchSet: 4
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Mon, 29 Oct 2018 23:17:35 +0000
Gerrit-HasComments: No