mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
dht: Use get_random_number<uint64_t> instead of int64_t in token::get_random_token
I bisect the opposite change in9c202b52daas 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 commitf3fd466156)
This commit is contained in:
committed by
Avi Kivity
parent
77b7a48a02
commit
c563234f40
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user