From c563234f407acefaef3684efe54c1f89bfc35a50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= Date: Fri, 17 Apr 2020 17:16:11 -0700 Subject: [PATCH] dht: Use get_random_number instead of int64_t in token::get_random_token MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I bisect the opposite change in 9c202b52da79aeece9814ebfc922951ad51f7317 as the cause of issue 6193. I don't know why. Maybe get_random_number is buggy? In any case, reverting to uint64_t solves the issue. Fixes #6193 Signed-off-by: Rafael Ávila de Espíndola Message-Id: <20200418001611.440733-1-espindola@scylladb.com> (cherry picked from commit f3fd4661563106c770d2d5b45208daae44f146cf) --- dht/token.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dht/token.cc b/dht/token.cc index a494ca9a4b..dc4a3bcb6b 100644 --- a/dht/token.cc +++ b/dht/token.cc @@ -118,7 +118,7 @@ token token::midpoint(const token& t1, const token& t2) { } token token::get_random_token() { - return {kind::key, dht::get_random_number()}; + return token(kind::key, dht::get_random_number()); } token token::from_sstring(const sstring& t) {