diff --git a/db/size_estimates_virtual_reader.cc b/db/size_estimates_virtual_reader.cc index a8979f66d1..b9fd4cecf4 100644 --- a/db/size_estimates_virtual_reader.cc +++ b/db/size_estimates_virtual_reader.cc @@ -195,10 +195,10 @@ static future> get_local_ranges(replica::database& db, // All queries will be on that table, where all entries are text and there's no notion of // token ranges form the CQL point of view. auto left_inf = boost::find_if(ranges, [] (auto&& r) { - return r.end() && (!r.start() || r.start()->value() == dht::minimum_token()); + return r.end() && (!r.start() || r.start()->value().is_minimum()); }); auto right_inf = boost::find_if(ranges, [] (auto&& r) { - return r.start() && (!r.end() || r.end()->value() == dht::maximum_token()); + return r.start() && (!r.end() || r.end()->value().is_maximum()); }); if (left_inf != right_inf && left_inf != ranges.end() && right_inf != ranges.end()) { local_ranges.push_back(token_range{to_bytes(right_inf->start()), to_bytes(left_inf->end())}); diff --git a/dht/i_partitioner.cc b/dht/i_partitioner.cc index ee119e4ddb..e7a5e3e6fb 100644 --- a/dht/i_partitioner.cc +++ b/dht/i_partitioner.cc @@ -67,7 +67,7 @@ static_sharder::next_shard(const token& t) const { auto shard = shard_for_reads(t); auto next_shard = shard + 1 == _shard_count ? 0 : shard + 1; auto next_token = token_for_next_shard_for_reads(t, next_shard); - if (next_token == dht::maximum_token()) { + if (next_token.is_maximum()) { return std::nullopt; } return shard_and_token{next_shard, next_token}; @@ -189,7 +189,7 @@ ring_position_range_sharder::next(const schema& s) { auto shard_boundary_token = next_shard_and_token->token; auto shard_boundary = ring_position::starting_at(shard_boundary_token); if ((!_range.end() || shard_boundary.less_compare(s, _range.end()->value())) - && shard_boundary_token != maximum_token()) { + && !shard_boundary_token.is_maximum()) { // split the range at end_of_shard auto start = _range.start(); auto end = interval_bound(shard_boundary, false); @@ -240,7 +240,7 @@ split_range_to_single_shard(const schema& s, const static_sharder& sharder, cons start_boundary, shard] () mutable { if (pr.overlaps(partition_range(start_boundary, {}), cmp) - && !(start_boundary && start_boundary->value().token() == maximum_token())) { + && !(start_boundary && start_boundary->value().token().is_maximum())) { dht::token end_token = maximum_token(); auto s_a_t = sharder.next_shard(start_token); if (s_a_t) {