From 4dc2faa49ae85fe7306fb930e48964caa08bf5ef Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Wed, 14 Aug 2024 22:03:31 +0200 Subject: [PATCH] test/raft/replication: clean up remaining index_t usage With implicit conversion of tagged integers to untagged ones going away, explicitly untag the operands / arguments of the following operations, in "test/raft/replication.hh": - assignment to raft_cluster::_seen - call to hasher_int::hash_range() Signed-off-by: Laszlo Ersek --- test/raft/replication.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/raft/replication.hh b/test/raft/replication.hh index 82ba3bc4d8..8631655e22 100644 --- a/test/raft/replication.hh +++ b/test/raft/replication.hh @@ -433,7 +433,7 @@ public: future<> load_snapshot(raft::snapshot_id snp_id) override { hasher = make_lw_shared((*_snapshots)[_id][snp_id].hasher); tlogger.debug("sm[{}] loads snapshot {} idx={}", _id, (*_snapshots)[_id][snp_id].hasher.finalize_uint64(), (*_snapshots)[_id][snp_id].idx); - _seen = (*_snapshots)[_id][snp_id].idx; + _seen = (*_snapshots)[_id][snp_id].idx.value(); if (_seen >= _apply_entries) { _done.set_value(); } @@ -1390,7 +1390,7 @@ void raft_cluster::verify() { for (auto& s : (*_persisted_snapshots)) { auto& [snp, val] = s.second; auto digest = val.hasher.finalize_uint64(); - auto expected = hasher_int::hash_range(val.idx).finalize_uint64(); + auto expected = hasher_int::hash_range(val.idx.value()).finalize_uint64(); BOOST_CHECK_MESSAGE(digest == expected, format("Persisted snapshot {} doesn't match {} != {}", snp.id, digest, expected)); } @@ -1410,7 +1410,7 @@ std::vector raft_cluster::get_states(test_case test, bool raft::index_t start_idx{1}; if (i < test.initial_snapshots.size()) { states[i].snapshot = test.initial_snapshots[i].snap; - states[i].snp_value.hasher = hasher_int::hash_range(test.initial_snapshots[i].snap.idx); + states[i].snp_value.hasher = hasher_int::hash_range(test.initial_snapshots[i].snap.idx.value()); states[i].snp_value.idx = test.initial_snapshots[i].snap.idx; start_idx = states[i].snapshot.idx + raft::index_t{1}; }