token_metadata: Remove excessive empty tokens check

After the previous patch empty passed tokens make the helper co_return
early, so this if is the dead code

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
Pavel Emelyanov
2022-08-23 11:26:58 +03:00
parent 056d21c050
commit 8238c38e9f

View File

@@ -424,12 +424,6 @@ future<> token_metadata_impl::update_normal_tokens(std::unordered_set<token> tok
bool should_sort_tokens = false;
if (tokens.empty()) {
auto msg = format("tokens is empty in update_normal_tokens");
tlogger.error("{}", msg);
throw std::runtime_error(msg);
}
// Phase 1: erase all tokens previously owned by the endpoint.
for(auto it = _token_to_endpoint_map.begin(), ite = _token_to_endpoint_map.end(); it != ite;) {
co_await coroutine::maybe_yield();