Yingchun Lai 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:

(10 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 conside
Done


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 som
Done


http://gerrit.cloudera.org:8080/#/c/18448/5/src/kudu/tools/tool_action_local_replica.cc@476
PS5, Line 476: // Prepare to check copy progress.
> nit: What about "Protects 'copying_replicas' and 'failed_tablet_ids'"?
Done


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?
Done


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"
Done


http://gerrit.cloudera.org:8080/#/c/18448/5/src/kudu/tools/tool_action_local_replica.cc@486
PS5, Line 486: continue
> nit: Is this needed?
Done


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 wort
no, it doesn't. I addded it.
Done


http://gerrit.cloudera.org:8080/#/c/18448/5/src/kudu/tools/tool_action_local_replica.cc@518
PS5, Line 518:     if (ContainsKey(failed_tablet_ids, tablet_id)) continue;
> nit: What about removing non-exist tablets from `tablet_ids_to_copy` in adv
Done


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
Good suggestion to simplify code, thanks!
Done.


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"
Done



--
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: Thu, 05 May 2022 02:42:08 +0000
Gerrit-HasComments: Yes

Reply via email to