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
The following commit(s) were added to refs/heads/master by this push:
new 1f2fe809b [mvcc] use operator==() instead of Equals()
1f2fe809b is described below
commit 1f2fe809bb56cf417e4a04acce8020cc530eddbf
Author: Alexey Serbin <[email protected]>
AuthorDate: Mon Aug 7 16:03:01 2023 -0700
[mvcc] use operator==() instead of Equals()
This patch replaces Equals() with operator==() for MvccSnapshot.
This patch doesn't contain any functional modifications.
Change-Id: I171df89cc10a013df888afe702efe0084bff6c79
Reviewed-on: http://gerrit.cloudera.org:8080/20325
Reviewed-by: Mahesh Reddy <[email protected]>
Reviewed-by: Abhishek Chennaka <[email protected]>
Reviewed-by: Marton Greber <[email protected]>
Tested-by: Alexey Serbin <[email protected]>
---
src/kudu/tablet/delta_store.cc | 7 +++----
src/kudu/tablet/mvcc.cc | 2 +-
src/kudu/tablet/mvcc.h | 2 +-
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/kudu/tablet/delta_store.cc b/src/kudu/tablet/delta_store.cc
index 461f34e22..0c748a138 100644
--- a/src/kudu/tablet/delta_store.cc
+++ b/src/kudu/tablet/delta_store.cc
@@ -462,10 +462,9 @@ Status
DeltaPreparer<Traits>::FilterColumnIdsAndCollectDeltas(
}
// May only be used on a fully inclusive snapshot.
- DCHECK(opts_.snap_to_include.Equals(Traits::kType == REDO ?
-
MvccSnapshot::CreateSnapshotIncludingAllOps() :
-
MvccSnapshot::CreateSnapshotIncludingNoOps()));
-
+ DCHECK(opts_.snap_to_include ==
+ (Traits::kType == REDO ? MvccSnapshot::CreateSnapshotIncludingAllOps()
+ :
MvccSnapshot::CreateSnapshotIncludingNoOps()));
faststring buf;
RowChangeListEncoder encoder(&buf);
for (const auto& src : prepared_deltas_) {
diff --git a/src/kudu/tablet/mvcc.cc b/src/kudu/tablet/mvcc.cc
index bb2b88409..a4f06dbce 100644
--- a/src/kudu/tablet/mvcc.cc
+++ b/src/kudu/tablet/mvcc.cc
@@ -499,7 +499,7 @@ void MvccSnapshot::AddAppliedTimestamp(Timestamp timestamp)
{
}
}
-bool MvccSnapshot::Equals(const MvccSnapshot& other) const {
+bool MvccSnapshot::operator==(const MvccSnapshot& other) const {
if (type_ != other.type_) {
return false;
}
diff --git a/src/kudu/tablet/mvcc.h b/src/kudu/tablet/mvcc.h
index ec4a4ea99..b4ab5ee1d 100644
--- a/src/kudu/tablet/mvcc.h
+++ b/src/kudu/tablet/mvcc.h
@@ -158,7 +158,7 @@ class MvccSnapshot {
// Returns true if 'other' represents the same set of timestamps as this
// snapshot, false otherwise.
- bool Equals(const MvccSnapshot& other) const;
+ bool operator==(const MvccSnapshot& other) const;
private:
friend class MvccManager;