KeyRanges printed in trace logs can be ambiguous
- Dominant language
- C++
- Stars
- 16.7k
- Forks
- 1.6k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 126
Description
Key ranges are logged by converting each key to a printable range and separating the two keys by the string `" - "`. It is possible, however, for the printable version of the keys to contain this string, possibly making it unclear what the two keys actually are.
Because all printable characters are left intact from the original key except `\` (and some whitespace characters, like tab), we'd need to either escape additional characters in the key or incorporate a character like `\` into our separator in order to do the disambiguation. Unfortunately, either choice probably makes things a little worse in the typical case.
Contributor guide
Research direction
No files or tests are named. Start by locating the KeyRange trace-logging entry point and inspect how printable keys and the " - " separator are produced. Define a representation that makes both keys unambiguous while preserving the usual readable output as much as possible, then add coverage for keys whose printable form contains the separator.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100