Open bluecrabs007 opened 4 months ago
This seems important to fix before v20 because vtop is affected. I'll check if I can repro with small numbers like 3 and 5.
There's something special about 103 and 107 :) Works fine with 3,5,7,9,55,101,105,109,111. Given that, I'd say that this isn't critical to fix, though certainly nice to fix.
% for i in 3 5 7 9 101 105 109 111
for> do
for> vtctldclient GenerateShardRanges $i | tail -n 2 | head -n 1
for> done
"aa-"
"cc-"
"db-"
"e3-"
"fd-"
"fd-"
"fd-"
"fd-"
There's something special about 103 and 107 :) Works fine with 3,5,7,9,55,101,105,109,111. Given that, I'd say that this isn't critical to fix, though certainly nice to fix.
% for i in 3 5 7 9 101 105 109 111 for> do for> vtctldclient GenerateShardRanges $i | tail -n 2 | head -n 1 for> done "aa-" "cc-" "db-" "e3-" "fd-" "fd-" "fd-" "fd-"
Yes, its just 103 & 107 that are effected. I ran tests upto 128 shards.
Overview of the Issue
There is a bug in the way the shard ranges are generated for 103 & 107 shards. For example.
You can see that the ending ranges for 102 & 2 are what we typically expect.
But when you use 103 or 107, you get the ending range ending in
-ff
.I have not deployed a keyspace with 103 or 107 shards, so not sure how the keyspace would work, but the output from the range generation logic seems to give unexpected results.
Reproduction Steps
Binary Version
Operating System and Environment details
Log Fragments