You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2021/10/25 20:44:53 UTC

[kudu] 03/03: [mvcc] avoid copying in AnyApplyingAtOrBeforeUnlocked()

This is an automated email from the ASF dual-hosted git repository.

alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 96aa6ee65f6beae0ed2a2c00d1f43c742428325c
Author: Alexey Serbin <al...@apache.org>
AuthorDate: Mon Oct 25 12:22:48 2021 -0700

    [mvcc] avoid copying in AnyApplyingAtOrBeforeUnlocked()
    
    This is a follow-up to 2ca437e25e93dba3d3678dd20d92ffa0b4ba2e29.
    
    Change-Id: I5c1522028e0a1a5c1696e459861133adf30eb598
    Reviewed-on: http://gerrit.cloudera.org:8080/17965
    Tested-by: Alexey Serbin <as...@cloudera.com>
    Reviewed-by: Andrew Wong <aw...@cloudera.com>
---
 src/kudu/tablet/mvcc.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/kudu/tablet/mvcc.cc b/src/kudu/tablet/mvcc.cc
index 58ed9f5..bb2b884 100644
--- a/src/kudu/tablet/mvcc.cc
+++ b/src/kudu/tablet/mvcc.cc
@@ -359,7 +359,7 @@ bool MvccManager::AreAllOpsAppliedUnlocked(Timestamp ts) const {
 bool MvccManager::AnyApplyingAtOrBeforeUnlocked(Timestamp ts) const {
   // TODO(todd) this is not actually checking on the applying ops, it's checking on
   // _all in-flight_. Is this a bug?
-  for (const InFlightOpsMap::value_type entry : ops_in_flight_) {
+  for (const auto& entry : ops_in_flight_) {
     if (entry.first <= ts.value()) {
       return true;
     }