Commit 8bb7919
Merge #153369
153369: backup: use ioctx.ReadAll when reading index metadata r=msbutler a=kev-cao
We currently use `io.Reader`'s `Read` to read the index metadata file. However, `Read` behavior w.r.t to returning an EOF after reading the entire file is not consistent --- S3's implementation returns EOF even if bytes are read, whereas GCS's implementation returns EOF only if a read is attempted after reading the file. The correct solution is to use `ioctx.ReadAll` whenever performing reads.
Fixes: #153215
Fixes: #153214
Fixes: #153213
Fixes: #153212
Release note: None
Co-authored-by: Kevin Cao <39608887+kev-cao@users.noreply.github.com>1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
239 | 240 | | |
240 | 241 | | |
241 | 242 | | |
242 | | - | |
| 243 | + | |
243 | 244 | | |
244 | 245 | | |
245 | 246 | | |
246 | 247 | | |
247 | 248 | | |
248 | 249 | | |
249 | 250 | | |
250 | | - | |
251 | | - | |
252 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
253 | 254 | | |
254 | 255 | | |
255 | 256 | | |
| |||
0 commit comments