Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/17993 )
Change subject: [txns] fix UB in TxnSystemClient when adding max timeout to now ...................................................................... Patch Set 1: (2 comments) http://gerrit.cloudera.org:8080/#/c/17993/1/src/kudu/master/txn_manager.cc File src/kudu/master/txn_manager.cc: http://gerrit.cloudera.org:8080/#/c/17993/1/src/kudu/master/txn_manager.cc@98 PS1, Line 98: // Conversion of a deadline specified for an RPC into a timeout, i.e. : // convert a point in time to a delta between current time and the specified : // point in time. : MonoDelta ToDelta(const MonoTime& deadline) { : MonoDelta timeout = deadline == MonoTime::Max() : ? MonoDelta::FromNanoseconds(std::numeric_limits<int64_t>::max()) : : deadline - MonoTime::Now(); : return timeout; : } > Is this still needed? There was one remaining usage, though I've removed it. http://gerrit.cloudera.org:8080/#/c/17993/1/src/kudu/transactions/txn_system_client.h File src/kudu/transactions/txn_system_client.h: http://gerrit.cloudera.org:8080/#/c/17993/1/src/kudu/transactions/txn_system_client.h@178 PS1, Line 178: const MonoTime& deadline > nit: maybe, it's a good point to update other places to converge passing ar Standardized to pass-by-value since it's a bit more flexible (allows function bodies to rewrite the deadline if needed, e.g. if not initialized). -- To view, visit http://gerrit.cloudera.org:8080/17993 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1e5d4d06e8c0801c7f6b2399f7622e6f039f988e Gerrit-Change-Number: 17993 Gerrit-PatchSet: 1 Gerrit-Owner: Andrew Wong <[email protected]> Gerrit-Reviewer: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Comment-Date: Wed, 03 Nov 2021 07:22:09 +0000 Gerrit-HasComments: Yes
