Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/18448 )
Change subject: [tools] use thread pool for 'kudu local_replica copy_from_local' ...................................................................... Patch Set 5: (7 comments) http://gerrit.cloudera.org:8080/#/c/18448/5/src/kudu/tools/tool_action_common.cc File src/kudu/tools/tool_action_common.cc: http://gerrit.cloudera.org:8080/#/c/18448/5/src/kudu/tools/tool_action_common.cc@136 PS5, Line 136: . Each thread runs its own " : "KuduSession. nit: since this is being used in common code, maybe remove this. Or consider adding a separate flag for the copy tool http://gerrit.cloudera.org:8080/#/c/18448/5/src/kudu/tools/tool_action_local_replica.cc File src/kudu/tools/tool_action_local_replica.cc: http://gerrit.cloudera.org:8080/#/c/18448/5/src/kudu/tools/tool_action_local_replica.cc@448 PS5, Line 448: vector nit: just FYI this can also be a set, to deduplicate up front. That way some of the sets we maintain below could just be vectors http://gerrit.cloudera.org:8080/#/c/18448/5/src/kudu/tools/tool_action_local_replica.cc@483 PS5, Line 483: INFO nit: maybe make this a warning or error? http://gerrit.cloudera.org:8080/#/c/18448/5/src/kudu/tools/tool_action_local_replica.cc@483 PS5, Line 483: "Tablet $0 copy failed, error=Not found in source filesystem." nit: maybe "Tablet $0 copy failed, not found in source filesystem" http://gerrit.cloudera.org:8080/#/c/18448/5/src/kudu/tools/tool_action_local_replica.cc@498 PS5, Line 498: LOG(INFO) << copying_replica->last_status(); Just curious, does this also print the tablet IDs? If not, it might be worth considering http://gerrit.cloudera.org:8080/#/c/18448/5/src/kudu/tools/tool_action_local_replica.cc@536 PS5, Line 536: do { : s = client.Start(tablet_id, /* meta */ nullptr); : if (PREDICT_FALSE(!s.ok())) { : s = s.CloneAndPrepend("Start copy tablet failed"); : break; : } : s = client.FetchAll(fake_replica); : if (PREDICT_FALSE(!s.ok())) { : s = s.CloneAndPrepend("Fetch all tablet data failed"); : break; : } : s = client.Finish(); : if (PREDICT_FALSE(!s.ok())) { : s = s.CloneAndPrepend("Finish copy tablet failed"); : break; : } : } while (false); nit: consider writing as Status s = client.Start(tablet_id, nullptr).AndThen([&] { return client.FetchAll(fake_replica); }).AndThen([&] { return client.Finish(); }) http://gerrit.cloudera.org:8080/#/c/18448/5/src/kudu/tools/tool_action_local_replica.cc@558 PS5, Line 558: Tablet $0 copy failed, error=$1. nit: maybe "Tablet $0 copy failed: $1" -- To view, visit http://gerrit.cloudera.org:8080/18448 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4de49e948cc1a686db5e1bf424470ca9e800ee36 Gerrit-Change-Number: 18448 Gerrit-PatchSet: 5 Gerrit-Owner: Yingchun Lai <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Yifan Zhang <[email protected]> Gerrit-Reviewer: Yingchun Lai <[email protected]> Gerrit-Comment-Date: Sat, 30 Apr 2022 05:35:17 +0000 Gerrit-HasComments: Yes
