Commit aaf5a2a
committed
cachekey: remove ID length assumption
AppendStrID was copied out of a system that only used UUIDs for string
IDs, so we could make the assumption that IDs would be shorter than
127-bytes. This is not true generally, but apparently while copying the
function, we forgot to re-evaluate the assumptions in the code. (even
when stated in the comments)
Fortunately, `encoding/binary.AppendUvarint` will grow the buffer if
necessary, so this is a performance bug, not a correctness bug.1 parent 44942c5 commit aaf5a2a
1 file changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
0 commit comments