Michael Ho has posted comments on this change. ( http://gerrit.cloudera.org:8080/12260 )
Change subject: IMPALA-7985: Port RemoteShutdown() to KRPC. ...................................................................... Patch Set 2: (3 comments) http://gerrit.cloudera.org:8080/#/c/12260/2/be/src/service/control-service.h File be/src/service/control-service.h: http://gerrit.cloudera.org:8080/#/c/12260/2/be/src/service/control-service.h@79 PS2, Line 79: /// Retry the Rpc 'rpc_call' up to 3 times. : /// Pass 'debug_action' to DebugAction() to potentially inject errors. : template <typename F> : static Status DoRpcWithRetry(F&& rpc_call, const TQueryCtx& query_ctx, : const char* debug_action, const char* error_msg) { > Thanks. The idea (suggested by Thomas) was for DoRpcWithRetry to be reusabl I am fine with doing the refactoring with a separate JIRA as long as it doesn't become a back burner somehow. That said, it seems to make sense to add a sleep time between retries in this patch at least for the case of remote server being too busy (see the example in KrpcDataStreamSender). http://gerrit.cloudera.org:8080/#/c/12260/2/be/src/service/control-service.h@87 PS2, Line 87: MonoDelta::FromSeconds(10) > Yes, I wondered about this too. I decided that while my 2 clients are using Given what you stated above about DoRpcWithRetry() being reusable, I am not sure it makes sense to make assumption about the clients and hardcode the timeout / number of retries / sleep time between retries. http://gerrit.cloudera.org:8080/#/c/12260/2/be/src/service/impala-server.cc File be/src/service/impala-server.cc: http://gerrit.cloudera.org:8080/#/c/12260/2/be/src/service/impala-server.cc@2489 PS2, Line 2489: ShutdownStatusPB > Is that safe? GetShutdownStatus() allocates the ShutdownStatusPB on the sta It is an official C++ feature to extend the life time of a temporary object to the life time of the const reference which refers to it. -- To view, visit http://gerrit.cloudera.org:8080/12260 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4fd00ee4e638f5e71e27893162fd65501ef9e74e Gerrit-Change-Number: 12260 Gerrit-PatchSet: 2 Gerrit-Owner: Andrew Sherman <asher...@cloudera.com> Gerrit-Reviewer: Andrew Sherman <asher...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Michael Ho <k...@cloudera.com> Gerrit-Reviewer: Thomas Marshall <thomasmarsh...@cmu.edu> Gerrit-Comment-Date: Tue, 29 Jan 2019 19:12:43 +0000 Gerrit-HasComments: Yes