dht: Use get_random_number<uint64_t> instead of int64_t in token::get_random_token

I bisect the opposite change in
9c202b52da as the cause of issue 6193. I
don't know why. Maybe get_random_number<signed_type> is buggy?

In any case, reverting to uint64_t solves the issue.

Fixes #6193

Signed-off-by: Rafael Ávila de Espíndola <espindola@scylladb.com>
Message-Id: <20200418001611.440733-1-espindola@scylladb.com>
(cherry picked from commit f3fd466156)
This commit is contained in:
Rafael Ávila de Espíndola
2020-04-17 17:16:11 -07:00
committed by Avi Kivity
parent 77b7a48a02
commit c563234f40

View File

@@ -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<int64_t>()};
return token(kind::key, dht::get_random_number<uint64_t>());
}
token token::from_sstring(const sstring& t) {