Commit b03a2ab
authored
impl(storage): fine grained known checksum tracking (#2805)
With this change we track whether the CRC32C checksum, the MD5 hash, or
both are set to known values. Once one of them is set to a known value,
the value cannot be changed: the corresponding `with_known_*()` function
is not available. It is also not possible to revert from known values
to computed values. The `compute_*()` functions are not available.
As a side effect: the CRC32C checksum is always present, either known
or computed. It cannot be removed from the upload.
Renamed the (crate private) types from `Precomputed` to `Known*`.1 parent 0fe7a87 commit b03a2ab
4 files changed
Lines changed: 306 additions & 102 deletions
File tree
- src/storage/src/storage
- perform_upload
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
18 | 25 | | |
19 | 26 | | |
20 | 27 | | |
| |||
84 | 91 | | |
85 | 92 | | |
86 | 93 | | |
87 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
88 | 122 | | |
89 | | - | |
| 123 | + | |
90 | 124 | | |
91 | | - | |
| 125 | + | |
92 | 126 | | |
93 | | - | |
| 127 | + | |
94 | 128 | | |
95 | 129 | | |
96 | 130 | | |
| |||
359 | 393 | | |
360 | 394 | | |
361 | 395 | | |
362 | | - | |
| 396 | + | |
363 | 397 | | |
364 | 398 | | |
365 | 399 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
| 151 | + | |
157 | 152 | | |
158 | | - | |
| 153 | + | |
159 | 154 | | |
160 | 155 | | |
161 | 156 | | |
| |||
0 commit comments