mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-27 11:55:15 +00:00
gms: added missing operator==() required for endpoint_state_map comparison.
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
This commit is contained in:
@@ -43,6 +43,13 @@ private:
|
||||
db_clock::time_point _update_timestamp;
|
||||
bool _is_alive;
|
||||
public:
|
||||
bool operator==(const endpoint_state& other) const {
|
||||
return _heart_beat_state == other._heart_beat_state &&
|
||||
_application_state == other._application_state &&
|
||||
_update_timestamp == other._update_timestamp &&
|
||||
_is_alive == other._is_alive;
|
||||
}
|
||||
|
||||
endpoint_state()
|
||||
: _heart_beat_state(0)
|
||||
, _update_timestamp(db_clock::now())
|
||||
|
||||
@@ -35,6 +35,10 @@ private:
|
||||
int32_t _generation;
|
||||
int32_t _version;
|
||||
public:
|
||||
bool operator==(const heart_beat_state& other) const {
|
||||
return _generation == other._generation && _version == other._version;
|
||||
}
|
||||
|
||||
heart_beat_state(int32_t gen)
|
||||
: _generation(gen)
|
||||
, _version(0) {
|
||||
|
||||
@@ -72,6 +72,11 @@ public:
|
||||
int version;
|
||||
sstring value;
|
||||
public:
|
||||
bool operator==(const versioned_value& other) const {
|
||||
return version == other.version &&
|
||||
value == other.value;
|
||||
}
|
||||
|
||||
versioned_value()
|
||||
: version(version_generator::get_next_version())
|
||||
, value("") {
|
||||
|
||||
Reference in New Issue
Block a user