Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/20282 )
Change subject: KUDU-3498 Scanner keeps alive in periodically ...................................................................... Patch Set 23: Code-Review+1 (3 comments) Overall looks good to me. Just two nits to address and this patch should be good to go. Thank you! http://gerrit.cloudera.org:8080/#/c/20282/23/src/kudu/client/client.h File src/kudu/client/client.h: http://gerrit.cloudera.org:8080/#/c/20282/23/src/kudu/client/client.h@2959 PS23, Line 2959: This can be called nit: please also add a note that this method isn't a thread-safe, meaning it shouldn't be called concurrently from multiple threads. http://gerrit.cloudera.org:8080/#/c/20282/23/src/kudu/client/client.h@2965 PS23, Line 2965: keep_alive_interval_ms API usability nit: does it make sense to set this parameter by default to 30000 ms (the half of the default setting for the --scanner_ttl_ms scanner)? The API would look like Status StartKeepAlivePeriodically(uint64_t keep_alive_interval_ms = 30000); So, in the code it would be possible to call scanner->StartKeepAlivePeriodically() without thinking about proper setting for the keep-alive interval in the majority of the cases. http://gerrit.cloudera.org:8080/#/c/20282/23/src/kudu/client/scanner-internal.cc File src/kudu/client/scanner-internal.cc: http://gerrit.cloudera.org:8080/#/c/20282/23/src/kudu/client/scanner-internal.cc@106 PS23, Line 106: if (keep_alive_timer_ && keep_alive_timer_->started()) { There is a race condition here when StartKeepAlivePeriodically() is called concurrently from different threads, but I guess nobody is going to do so in practice :) With adding corresponding comment about KuduScanner::StartKeepAlivePeriodically() not being thread-safe, this looks good to me. -- To view, visit http://gerrit.cloudera.org:8080/20282 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1165d96814eb4bcd5db9b5cb60403fffc5b18c81 Gerrit-Change-Number: 20282 Gerrit-PatchSet: 23 Gerrit-Owner: Wang Xixu <1450306...@qq.com> Gerrit-Reviewer: Alexey Serbin <ale...@apache.org> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Mahesh Reddy <mre...@cloudera.com> Gerrit-Reviewer: Wang Xixu <1450306...@qq.com> Gerrit-Reviewer: Yifan Zhang <chinazhangyi...@163.com> Gerrit-Reviewer: Yingchun Lai <laiyingc...@apache.org> Gerrit-Reviewer: Yuqi Du <shenxingwuy...@gmail.com> Gerrit-Comment-Date: Thu, 09 Nov 2023 19:30:42 +0000 Gerrit-HasComments: Yes