Yifan Zhang has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/19571 )

Change subject: KUDU-3452 Create tablet without enough healthy tservers
......................................................................


Patch Set 3:

(5 comments)

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

http://gerrit.cloudera.org:8080/#/c/19571/3//COMMIT_MSG@10
PS3, Line 10: will retry continuously
> I'm not sure I understand what will retry continuously here?  What is compo
It seems that the catalog manager's 'bgtasks' thread will continuously try to 
assign replicas for newly created tablets(in PREPARING state), and then it 
fails to select as many alive tservers as needed.


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

http://gerrit.cloudera.org:8080/#/c/19571/3/src/kudu/master/catalog_manager.cc@417
PS3, Line 417: 
DEFINE_bool(enable_create_tablet_without_enough_healthy_tservers, false,
We should also tag this new flag 'hidden', just as the 
'catalog_manager_check_ts_count_for_create_table' flag.


http://gerrit.cloudera.org:8080/#/c/19571/3/src/kudu/master/catalog_manager.cc@5933
PS3, Line 5933:       int nreplicas = 0;
              :       // Get replica factor.
              :       {
              :         TableMetadataLock table_guard(tablet->table().get(), 
LockMode::READ);
              :         nreplicas = table_guard.data().pb.num_replicas();
              :       }
              :       // Try to create a table without enough alive tablet 
servers.
              :       if (alive_num_ts < nreplicas &&
              :           
FLAGS_enable_create_tablet_without_enough_healthy_tservers) {
              :         // RAFT protocol require: (replica_factor + 1) / 2 >= 
the number of alive tservers,
              :         // or it can not run.
              :         if (alive_num_ts < (nreplicas + 1) / 2) {
              :           return Status::InvalidArgument(Substitute("RAFT 
protocal requires at least $0 "
              :                                                     "alive 
tablet servers, but only left $1 "
              :                                                     "alive 
tablet servers",
              :                                                     ((nreplicas 
+ 1) / 2), alive_num_ts));
              :         }
              :         nreplicas = alive_num_ts;
              :       }
> How about encapsulate the logic into SelectNReplicasForTablet()? since it's
+1


http://gerrit.cloudera.org:8080/#/c/19571/3/src/kudu/master/catalog_manager.cc@6006
PS3, Line 6006: Status CatalogManager::SelectReplicasForTablet(const 
PlacementPolicy& policy,
> I didn't find any where else using SelectReplicasForTablet(), why not remov
+1


http://gerrit.cloudera.org:8080/#/c/19571/3/src/kudu/tools/kudu-tool-test.cc
File src/kudu/tools/kudu-tool-test.cc:

http://gerrit.cloudera.org:8080/#/c/19571/3/src/kudu/tools/kudu-tool-test.cc@9228
PS3, Line 9228:
> Is it able to alter the table in this case?
Would be great to test adding range partitions when there is only 2 tservers 
alive.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I742ba1ff770f5c8b1be5800334c29bec96e195c6
Gerrit-Change-Number: 19571
Gerrit-PatchSet: 3
Gerrit-Owner: Wang Xixu <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: KeDeng <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Wang Xixu <[email protected]>
Gerrit-Reviewer: Yifan Zhang <[email protected]>
Gerrit-Reviewer: Yingchun Lai <[email protected]>
Gerrit-Reviewer: Yuqi Du <[email protected]>
Gerrit-Comment-Date: Thu, 23 Mar 2023 08:49:27 +0000
Gerrit-HasComments: Yes

Reply via email to