You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Yifan Zhang (Code Review)" <ge...@cloudera.org> on 2021/11/30 04:22:47 UTC

[kudu-CR] KUDU-3341: No further retry when DeleteTabet with WRONG SERVER UUID error

Yifan Zhang has uploaded this change for review. ( http://gerrit.cloudera.org:8080/18057


Change subject: KUDU-3341: No further retry when DeleteTabet with WRONG_SERVER_UUID error
......................................................................

KUDU-3341: No further retry when DeleteTabet with WRONG_SERVER_UUID error

This patch improves catalog_manager's behavior when
delete tablet with a 'WRONG_SERVER_UUID' error.
It's better to mark this RetryTask failed than keep
retrying send too many requests. I also add a test
that reproduces the scenario described in the JIRA.

Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
---
M src/kudu/integration-tests/delete_tablet-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/mini-cluster/internal_mini_cluster.cc
M src/kudu/mini-cluster/internal_mini_cluster.h
4 files changed, 104 insertions(+), 18 deletions(-)



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
Gerrit-Change-Number: 18057
Gerrit-PatchSet: 1
Gerrit-Owner: Yifan Zhang <ch...@163.com>

[kudu-CR] KUDU-3341: Stop retrying to DeleteTablet on wrong server

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

Change subject: KUDU-3341: Stop retrying to DeleteTablet on wrong server
......................................................................


Patch Set 7:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/18057/6/src/kudu/master/catalog_manager.cc
File src/kudu/master/catalog_manager.cc:

http://gerrit.cloudera.org:8080/#/c/18057/6/src/kudu/master/catalog_manager.cc@4167
PS6, Line 4167:           LOG(WARNING) << Substitute("TS $0: delete failed for tablet $1 "
> can you rephrase it to be more similar to the rest?
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
Gerrit-Change-Number: 18057
Gerrit-PatchSet: 7
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Thu, 02 Dec 2021 01:19:58 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3341: Stop retrying to DeleteTablet on wrong server

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

Change subject: KUDU-3341: Stop retrying to DeleteTablet on wrong server
......................................................................


Patch Set 6: Code-Review+1

(2 comments)

http://gerrit.cloudera.org:8080/#/c/18057/3//COMMIT_MSG
Commit Message:

PS3: 
> I have tried to shorten the subject line but it's still over 50 characters 
That's fine, 50 is not a hard limit, I was just surprised to see the subject line to be longer than the body.


http://gerrit.cloudera.org:8080/#/c/18057/6/src/kudu/master/catalog_manager.cc
File src/kudu/master/catalog_manager.cc:

http://gerrit.cloudera.org:8080/#/c/18057/6/src/kudu/master/catalog_manager.cc@4167
PS6, Line 4167:           LOG_WITH_PREFIX(WARNING) << Substitute("delete failed due to $0: $1. No further retry.",
can you rephrase it to be more similar to the rest?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
Gerrit-Change-Number: 18057
Gerrit-PatchSet: 6
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Wed, 01 Dec 2021 17:32:32 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3341: Stop retrying to DeleteTablet on wrong server

Posted by "Yifan Zhang (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Attila Bukor, Kudu Jenkins, Andrew Wong, 

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

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

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

Change subject: KUDU-3341: Stop retrying to DeleteTablet on wrong server
......................................................................

KUDU-3341: Stop retrying to DeleteTablet on wrong server

This patch improves catalog_manager's behavior when delete tablet with a
'WRONG_SERVER_UUID' error. It's better to mark this RetryTask failed than keep
retrying to send too many requests. Because master would always receive same
error message until the "wrong uuid server" restarts with a "correct
uuid", at that time the tserver would send full tablets report and then
trigger the deletion of outdated tablets.

I also add a test that reproduces the scenario described in the JIRA.

Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
---
M src/kudu/integration-tests/delete_tablet-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/mini-cluster/internal_mini_cluster.cc
M src/kudu/mini-cluster/internal_mini_cluster.h
4 files changed, 97 insertions(+), 11 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
Gerrit-Change-Number: 18057
Gerrit-PatchSet: 4
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>

[kudu-CR] KUDU-3341: No further retry when DeleteTabet with WRONG SERVER UUID error

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

Change subject: KUDU-3341: No further retry when DeleteTabet with WRONG_SERVER_UUID error
......................................................................


Patch Set 3:

(7 comments)

http://gerrit.cloudera.org:8080/#/c/18057/1/src/kudu/integration-tests/delete_tablet-itest.cc
File src/kudu/integration-tests/delete_tablet-itest.cc:

http://gerrit.cloudera.org:8080/#/c/18057/1/src/kudu/integration-tests/delete_tablet-itest.cc@240
PS1, Line 240: 
> To speed up the test, could we reduce the Raft heartbeat interval down to s
Done


http://gerrit.cloudera.org:8080/#/c/18057/1/src/kudu/integration-tests/delete_tablet-itest.cc@241
PS1, Line 241: // Regression test for KUDU-3341: Ensure that master would not retry to send
             : // DeleteTablet() RPC to a "wrong 
> Does this test actually need 5 servers? Would we get the same test coverage
No, we don't really need 5 servers. I tested with 3 tservers and when re-added the tserver with a new uuid, a replacement for the dead replica would also be triggered.  So 3 servers is enough.


http://gerrit.cloudera.org:8080/#/c/18057/1/src/kudu/integration-tests/delete_tablet-itest.cc@251
PS1, Line 251:   NO_FATALS(StartCluster(/*num_tablet_servers=*/kNumTabletServers));
             :   TestWorkload wo
> nit: could reduce to a single line? ASSERT_OK(v.RunKsck()); ?
Done


http://gerrit.cloudera.org:8080/#/c/18057/1/src/kudu/integration-tests/delete_tablet-itest.cc@267
PS1, Line 267:   }
> nit: we never called workload.Start(), so there's no need to call StopAndJo
Done


http://gerrit.cloudera.org:8080/#/c/18057/1/src/kudu/master/catalog_manager.cc
File src/kudu/master/catalog_manager.cc:

http://gerrit.cloudera.org:8080/#/c/18057/1/src/kudu/master/catalog_manager.cc@4147
PS1, Line 4147:         case TabletServerErrorPB::ALREADY_INPROGRESS:
> Should we call MarkComplete() for this and TABLET_NOT_FOUND? It's a CAS wit
Done


http://gerrit.cloudera.org:8080/#/c/18057/1/src/kudu/mini-cluster/internal_mini_cluster.cc
File src/kudu/mini-cluster/internal_mini_cluster.cc:

http://gerrit.cloudera.org:8080/#/c/18057/1/src/kudu/mini-cluster/internal_mini_cluster.cc@221
PS1, Line 221: Status InternalMiniCluster::AddTabletServer(const HostPort& hp) {
> warning: the parameter 'hp' is copied for each invocation but only used as 
Done


http://gerrit.cloudera.org:8080/#/c/18057/1/src/kudu/mini-cluster/internal_mini_cluster.cc@230
PS1, Line 230: emplace_back(std::mov
> nit: we could construct in place with
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
Gerrit-Change-Number: 18057
Gerrit-PatchSet: 3
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Tue, 30 Nov 2021 08:25:43 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3341: Stop retrying to DeleteTablet on wrong server

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

Change subject: KUDU-3341: Stop retrying to DeleteTablet on wrong server
......................................................................


Patch Set 6:

(7 comments)

http://gerrit.cloudera.org:8080/#/c/18057/3//COMMIT_MSG
Commit Message:

PS3: 
> nit: can you shorten the subject line and reflow the body? Subjects should 
I have tried to shorten the subject line but it's still over 50 characters :(


http://gerrit.cloudera.org:8080/#/c/18057/3//COMMIT_MSG@11
PS3, Line 11: than keep retrying to send too many reque
> Can you add why this is safe to do to the commit message?
Done


http://gerrit.cloudera.org:8080/#/c/18057/3/src/kudu/integration-tests/delete_tablet-itest.cc
File src/kudu/integration-tests/delete_tablet-itest.cc:

http://gerrit.cloudera.org:8080/#/c/18057/3/src/kudu/integration-tests/delete_tablet-itest.cc@251
PS3, Line 251: umTabletServers));
> nit: no need to add this comment as the variable name describes what this i
Done


http://gerrit.cloudera.org:8080/#/c/18057/3/src/kudu/integration-tests/delete_tablet-itest.cc@273
PS3, Line 273: 
> Why do we need to wait here? Can't we just simply wait until ASSERT_EVENTUA
Done


http://gerrit.cloudera.org:8080/#/c/18057/3/src/kudu/integration-tests/delete_tablet-itest.cc@285
PS3, Line 285:   ASSERT_EQ(num_replicas, num_delete_tablet_rpcs);
> I guess this is to make sure that it's not retried for a sufficient amount 
Yes, but it seems that the retry interval has nothing to do with raft heartbeat interval (https://github.com/apache/kudu/blob/150f3ee1a4c7a19ec46797928dc8b84e14b6c4a8/src/kudu/master/catalog_manager.cc#L3948).


http://gerrit.cloudera.org:8080/#/c/18057/3/src/kudu/master/catalog_manager.cc
File src/kudu/master/catalog_manager.cc:

http://gerrit.cloudera.org:8080/#/c/18057/3/src/kudu/master/catalog_manager.cc@4149
PS3, Line 4149:               "because the tablet was not found. No further retry: $2",
> Can you leave the existing messages unchanged and just add a new case? Chan
Done


http://gerrit.cloudera.org:8080/#/c/18057/3/src/kudu/mini-cluster/internal_mini_cluster.cc
File src/kudu/mini-cluster/internal_mini_cluster.cc:

http://gerrit.cloudera.org:8080/#/c/18057/3/src/kudu/mini-cluster/internal_mini_cluster.cc@221
PS3, Line 221:   if (nodes == ClusterNodes::ALL || nodes == ClusterNodes::TS_ONLY) {
> can you make AddTabletServer() call this method?
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
Gerrit-Change-Number: 18057
Gerrit-PatchSet: 6
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Wed, 01 Dec 2021 16:37:15 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3341: Stop retrying to DeleteTablet on wrong server

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

Change subject: KUDU-3341: Stop retrying to DeleteTablet on wrong server
......................................................................


Patch Set 7: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
Gerrit-Change-Number: 18057
Gerrit-PatchSet: 7
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Thu, 02 Dec 2021 08:15:40 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-3341: Stop retrying to DeleteTablet on wrong server

Posted by "Yifan Zhang (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Attila Bukor, Kudu Jenkins, Andrew Wong, 

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

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

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

Change subject: KUDU-3341: Stop retrying to DeleteTablet on wrong server
......................................................................

KUDU-3341: Stop retrying to DeleteTablet on wrong server

This patch improves catalog_manager's behavior when delete tablet with
a 'WRONG_SERVER_UUID' error. It's better to mark this RetryTask failed
than keep retrying to send too many requests. Because master would
always receive same error message until the "wrong uuid server" restarts
with a "correct uuid", at that time the tserver would send full tablets
report and then trigger the deletion of outdated tablets.

I also add a test that reproduces the scenario described in the JIRA.

Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
---
M src/kudu/integration-tests/delete_tablet-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/mini-cluster/internal_mini_cluster.cc
M src/kudu/mini-cluster/internal_mini_cluster.h
4 files changed, 97 insertions(+), 11 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
Gerrit-Change-Number: 18057
Gerrit-PatchSet: 6
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>

[kudu-CR] KUDU-3341: Stop retrying to DeleteTablet on wrong server

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

Change subject: KUDU-3341: Stop retrying to DeleteTablet on wrong server
......................................................................


Patch Set 7: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
Gerrit-Change-Number: 18057
Gerrit-PatchSet: 7
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Thu, 02 Dec 2021 05:05:20 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-3341: No further retry when DeleteTabet with WRONG SERVER UUID error

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

Change subject: KUDU-3341: No further retry when DeleteTabet with WRONG_SERVER_UUID error
......................................................................


Patch Set 1:

(6 comments)

Thanks for the fix!

http://gerrit.cloudera.org:8080/#/c/18057/1/src/kudu/integration-tests/delete_tablet-itest.cc
File src/kudu/integration-tests/delete_tablet-itest.cc:

http://gerrit.cloudera.org:8080/#/c/18057/1/src/kudu/integration-tests/delete_tablet-itest.cc@240
PS1, Line 240:   FLAGS_follower_unavailable_considered_failed_sec = 10;
To speed up the test, could we reduce the Raft heartbeat interval down to something like 100ms, and set the unavailable time to something like 2 seconds instead of 20?


http://gerrit.cloudera.org:8080/#/c/18057/1/src/kudu/integration-tests/delete_tablet-itest.cc@241
PS1, Line 241:   const int kNumTablets = 5;
             :   const int kNumTabletServers = 5;
Does this test actually need 5 servers? Would we get the same test coverage for the fix with 3?


http://gerrit.cloudera.org:8080/#/c/18057/1/src/kudu/integration-tests/delete_tablet-itest.cc@251
PS1, Line 251:     Status s = v.RunKsck();
             :     ASSERT_OK(s);
nit: could reduce to a single line? ASSERT_OK(v.RunKsck()); ?


http://gerrit.cloudera.org:8080/#/c/18057/1/src/kudu/integration-tests/delete_tablet-itest.cc@267
PS1, Line 267:   workload.StopAndJoin();
nit: we never called workload.Start(), so there's no need to call StopAndJoin().


http://gerrit.cloudera.org:8080/#/c/18057/1/src/kudu/master/catalog_manager.cc
File src/kudu/master/catalog_manager.cc:

http://gerrit.cloudera.org:8080/#/c/18057/1/src/kudu/master/catalog_manager.cc@4147
PS1, Line 4147:         case TabletServerErrorPB::ALREADY_INPROGRESS:
Should we call MarkComplete() for this and TABLET_NOT_FOUND? It's a CAS with kStateRunning anyway, so a subsequent call to MarkFailed() would be a no-op.


http://gerrit.cloudera.org:8080/#/c/18057/1/src/kudu/mini-cluster/internal_mini_cluster.cc
File src/kudu/mini-cluster/internal_mini_cluster.cc:

http://gerrit.cloudera.org:8080/#/c/18057/1/src/kudu/mini-cluster/internal_mini_cluster.cc@230
PS1, Line 230: push_back(shared_ptr<
nit: we could construct in place with

 mini_tablet_servers_.emplace_back(make_shared<MiniTabletServer>(tablet_server.release());



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
Gerrit-Change-Number: 18057
Gerrit-PatchSet: 1
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Tue, 30 Nov 2021 05:50:37 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3341: Stop retrying to DeleteTablet on wrong server

Posted by "Yifan Zhang (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Attila Bukor, Kudu Jenkins, Andrew Wong, 

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

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

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

Change subject: KUDU-3341: Stop retrying to DeleteTablet on wrong server
......................................................................

KUDU-3341: Stop retrying to DeleteTablet on wrong server

This patch improves catalog_manager's behavior when delete tablet with
a 'WRONG_SERVER_UUID' error. It's better to mark this RetryTask failed
than keep retrying to send too many requests. Because master would
always receive same error message until the "wrong uuid server" restarts
with a "correct uuid", at that time the tserver would send full tablets
report and then trigger the deletion of outdated tablets.

I also add a test that reproduces the scenario described in the JIRA.

Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
---
M src/kudu/integration-tests/delete_tablet-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/mini-cluster/internal_mini_cluster.cc
M src/kudu/mini-cluster/internal_mini_cluster.h
4 files changed, 97 insertions(+), 11 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
Gerrit-Change-Number: 18057
Gerrit-PatchSet: 5
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>

[kudu-CR] KUDU-3341: No further retry when DeleteTabet with WRONG SERVER UUID error

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

Change subject: KUDU-3341: No further retry when DeleteTabet with WRONG_SERVER_UUID error
......................................................................


Patch Set 3:

(7 comments)

http://gerrit.cloudera.org:8080/#/c/18057/3//COMMIT_MSG
Commit Message:

PS3: 
nit: can you shorten the subject line and reflow the body? Subjects should be kept short, but the body is normally wrapped at 80 characters when it's not a log message etc.


http://gerrit.cloudera.org:8080/#/c/18057/3//COMMIT_MSG@11
PS3, Line 11: It's better to mark this RetryTask failed
Can you add why this is safe to do to the commit message?


http://gerrit.cloudera.org:8080/#/c/18057/3/src/kudu/integration-tests/delete_tablet-itest.cc
File src/kudu/integration-tests/delete_tablet-itest.cc:

http://gerrit.cloudera.org:8080/#/c/18057/3/src/kudu/integration-tests/delete_tablet-itest.cc@251
PS3, Line 251: num_tablet_servers
nit: no need to add this comment as the variable name describes what this is.


http://gerrit.cloudera.org:8080/#/c/18057/3/src/kudu/integration-tests/delete_tablet-itest.cc@273
PS3, Line 273:   SleepFor(MonoDelta::FromSeconds(5));
Why do we need to wait here? Can't we just simply wait until ASSERT_EVENTUALLY() succeeds?


http://gerrit.cloudera.org:8080/#/c/18057/3/src/kudu/integration-tests/delete_tablet-itest.cc@285
PS3, Line 285:   SleepFor(MonoDelta::FromSeconds(5));
I guess this is to make sure that it's not retried for a sufficient amount of time, but this seems arbitrary. Should it be some multiple of raft heartbeat interval?


http://gerrit.cloudera.org:8080/#/c/18057/3/src/kudu/master/catalog_manager.cc
File src/kudu/master/catalog_manager.cc:

http://gerrit.cloudera.org:8080/#/c/18057/3/src/kudu/master/catalog_manager.cc@4149
PS3, Line 4149:           LOG_WITH_PREFIX(WARNING) << Substitute("delete failed due to $0: $1. No further retry.",
Can you leave the existing messages unchanged and just add a new case? Changing warning/error messages can make debugging across versions a pain, so it's best to avoid it when possible.


http://gerrit.cloudera.org:8080/#/c/18057/3/src/kudu/mini-cluster/internal_mini_cluster.cc
File src/kudu/mini-cluster/internal_mini_cluster.cc:

http://gerrit.cloudera.org:8080/#/c/18057/3/src/kudu/mini-cluster/internal_mini_cluster.cc@221
PS3, Line 221: Status InternalMiniCluster::AddTabletServer(const HostPort& hp) {
can you make AddTabletServer() call this method?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
Gerrit-Change-Number: 18057
Gerrit-PatchSet: 3
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Tue, 30 Nov 2021 17:51:11 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3341: Stop retrying to DeleteTablet on wrong server

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

Change subject: KUDU-3341: Stop retrying to DeleteTablet on wrong server
......................................................................


Patch Set 8: Code-Review+2

> Change has been successfully cherry-picked as 0222c3163129b1d6c1c37b216482aa64f921c415
 > by Yifan Zhang

Ah, cool!  Thank you very much for the fix!


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
Gerrit-Change-Number: 18057
Gerrit-PatchSet: 8
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Thu, 02 Dec 2021 17:45:14 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-3341: Stop retrying to DeleteTablet on wrong server

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

Change subject: KUDU-3341: Stop retrying to DeleteTablet on wrong server
......................................................................

KUDU-3341: Stop retrying to DeleteTablet on wrong server

This patch improves catalog_manager's behavior when delete tablet with
a 'WRONG_SERVER_UUID' error. It's better to mark this RetryTask failed
than keep retrying to send too many requests. Because master would
always receive same error message until the "wrong uuid server" restarts
with a "correct uuid", at that time the tserver would send full tablets
report and then trigger the deletion of outdated tablets.

I also add a test that reproduces the scenario described in the JIRA.

Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
Reviewed-on: http://gerrit.cloudera.org:8080/18057
Tested-by: Kudu Jenkins
Reviewed-by: Andrew Wong <aw...@cloudera.com>
Reviewed-by: Attila Bukor <ab...@apache.org>
---
M src/kudu/integration-tests/delete_tablet-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/mini-cluster/internal_mini_cluster.cc
M src/kudu/mini-cluster/internal_mini_cluster.h
4 files changed, 97 insertions(+), 11 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Andrew Wong: Looks good to me, approved
  Attila Bukor: Looks good to me, approved

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
Gerrit-Change-Number: 18057
Gerrit-PatchSet: 8
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>

[kudu-CR] KUDU-3341: Stop retrying to DeleteTablet on wrong server

Posted by "Yifan Zhang (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Attila Bukor, Kudu Jenkins, Andrew Wong, 

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

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

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

Change subject: KUDU-3341: Stop retrying to DeleteTablet on wrong server
......................................................................

KUDU-3341: Stop retrying to DeleteTablet on wrong server

This patch improves catalog_manager's behavior when delete tablet with
a 'WRONG_SERVER_UUID' error. It's better to mark this RetryTask failed
than keep retrying to send too many requests. Because master would
always receive same error message until the "wrong uuid server" restarts
with a "correct uuid", at that time the tserver would send full tablets
report and then trigger the deletion of outdated tablets.

I also add a test that reproduces the scenario described in the JIRA.

Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
---
M src/kudu/integration-tests/delete_tablet-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/mini-cluster/internal_mini_cluster.cc
M src/kudu/mini-cluster/internal_mini_cluster.h
4 files changed, 97 insertions(+), 11 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
Gerrit-Change-Number: 18057
Gerrit-PatchSet: 7
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>

[kudu-CR] KUDU-3341: Stop retrying to DeleteTablet on wrong server

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

Change subject: KUDU-3341: Stop retrying to DeleteTablet on wrong server
......................................................................


Patch Set 6:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/18057/1/src/kudu/integration-tests/delete_tablet-itest.cc
File src/kudu/integration-tests/delete_tablet-itest.cc:

http://gerrit.cloudera.org:8080/#/c/18057/1/src/kudu/integration-tests/delete_tablet-itest.cc@241
PS1, Line 241: // Regression test for KUDU-3341: Ensure that master would not retry to send
             : // DeleteTablet() RPC to a "wrong 
> No, we don't really need 5 servers. I tested with 3 tservers and when re-ad
After more testing I think we still need more than 3 tablet servers to make all behaviors predictable and easier to understand. In the last step of this test, i.e. restart the tserver with original uuid, we want to make sure that old replicas(if any) would finally be deleted even if master gave up deleting tablets when it failed on wrong_server_uuid error. But if we only have 3 tservers, in the end there would be also some replicas running on the tserver, which are newly replicated ones. Then it's hard to verify old replicas are actually deleted.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
Gerrit-Change-Number: 18057
Gerrit-PatchSet: 6
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Wed, 01 Dec 2021 17:20:49 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3341: No further retry when DeleteTabet with WRONG SERVER UUID error

Posted by "Yifan Zhang (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, 

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

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

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

Change subject: KUDU-3341: No further retry when DeleteTabet with WRONG_SERVER_UUID error
......................................................................

KUDU-3341: No further retry when DeleteTabet with WRONG_SERVER_UUID error

This patch improves catalog_manager's behavior when
delete tablet with a 'WRONG_SERVER_UUID' error.
It's better to mark this RetryTask failed than keep
retrying send too many requests. I also add a test
that reproduces the scenario described in the JIRA.

Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
---
M src/kudu/integration-tests/delete_tablet-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/mini-cluster/internal_mini_cluster.cc
M src/kudu/mini-cluster/internal_mini_cluster.h
4 files changed, 108 insertions(+), 18 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
Gerrit-Change-Number: 18057
Gerrit-PatchSet: 2
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)

[kudu-CR] KUDU-3341: No further retry when DeleteTabet with WRONG SERVER UUID error

Posted by "Yifan Zhang (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, Andrew Wong, 

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

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

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

Change subject: KUDU-3341: No further retry when DeleteTabet with WRONG_SERVER_UUID error
......................................................................

KUDU-3341: No further retry when DeleteTabet with WRONG_SERVER_UUID error

This patch improves catalog_manager's behavior when
delete tablet with a 'WRONG_SERVER_UUID' error.
It's better to mark this RetryTask failed than keep
retrying send too many requests. I also add a test
that reproduces the scenario described in the JIRA.

Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
---
M src/kudu/integration-tests/delete_tablet-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/mini-cluster/internal_mini_cluster.cc
M src/kudu/mini-cluster/internal_mini_cluster.h
4 files changed, 108 insertions(+), 18 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ieaa36086300bda7f958570c690b951dc090c342a
Gerrit-Change-Number: 18057
Gerrit-PatchSet: 3
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)