thelastpickle / cassandra-reaper

Automated Repair Awesomeness for Apache Cassandra
http://cassandra-reaper.io/
Apache License 2.0
489 stars 217 forks source link

Repair segments view displays RandomPartitioner tokens using scientific notation #935

Open kornelpal opened 4 years ago

kornelpal commented 4 years ago

Project board link

/repair_run/*/segments returns the tokens as big integers, but browsers (tested with Chrome and Firefox) parse those as JavaScript Numbers, that results in loss of precision and /webui/segments.html displaying big integers using scientific notation.

Recent browsers have support for BigInt, but JSON parsing is still using Number, even when outside of its precision range.

Returning tokens as strings seems to be the simple solution, as the UI is just displaying those, but I am not sure whether such a breaking change in the API is acceptable.

┆Issue is synchronized with this Jira Story by Unito ┆Issue Number: REAP-129

eriksw commented 3 years ago

This would make it more convenient when a segment is failing for days on end and you're writing the command to repair the range manually. (Ideally, #990 would take care of that situation, but it'd still be nice to not see useless scientific notation everywhere in the UI.)