Skip to content

Commit

Permalink
refactor(scyllaclient): make split range easier to detect
Browse files Browse the repository at this point in the history
It's easier to look for a substring than regex match when checking if given token range string was created by splitting overlapping range.
  • Loading branch information
Michal-Leszczynski authored and karol-kokoszka committed Jun 20, 2024
1 parent 801022f commit 08e1824
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/scyllaclient/client_scylla.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ func dumpRanges(ranges []TokenRange) string {
_ = buf.WriteByte(',')
}
if ttr.StartToken > ttr.EndToken {
_, _ = fmt.Fprintf(&buf, "%d:%d,%d:%d", dht.Murmur3MinToken, ttr.EndToken, ttr.StartToken, dht.Murmur3MaxToken)
_, _ = fmt.Fprintf(&buf, "%d:%d,%d:%d", ttr.StartToken, dht.Murmur3MaxToken, dht.Murmur3MinToken, ttr.EndToken)
} else {
_, _ = fmt.Fprintf(&buf, "%d:%d", ttr.StartToken, ttr.EndToken)
}
Expand Down

0 comments on commit 08e1824

Please sign in to comment.