bugfix: updatedAt timestamp file may be empty#2580
bugfix: updatedAt timestamp file may be empty#2580crosbymichael merged 3 commits intocontainerd:masterfrom
Conversation
6718bf4 to
caa9572
Compare
Codecov Report
@@ Coverage Diff @@
## master #2580 +/- ##
=======================================
Coverage 44.05% 44.05%
=======================================
Files 98 98
Lines 10130 10130
=======================================
Hits 4463 4463
Misses 4945 4945
Partials 722 722
Continue to review full report at Codecov.
|
|
I'm curious about the second fix: returning no error when the file contents are empty. Seems like the caller should be fixing that on error rather than have a function However, I would assume the right solution is to re-write a partially or incorrectly written file w/timestamp when it is discovered to be empty or interrupted during the initial write/create. |
Ingests should be temporary and we should avoid read side-effects which write. Treating an empty file as an empty timestamp seems reasonable. However I think if this problem is manifesting itself in the first place, we should not be using |
|
add a pr in |
caa9572 to
831b155
Compare
Signed-off-by: Michael Wan <zirenwan@gmail.com>
|
Encounter an error when update |
Signed-off-by: Michael Wan <zirenwan@gmail.com>
27d2c64 to
6a08168
Compare
|
CI failed: seems to |
Signed-off-by: Michael Wan <zirenwan@gmail.com>
6a08168 to
92243ff
Compare
|
LGTM |
Signed-off-by: Michael Wan zirenwan@gmail.com
we may restart containerd when pulling a image. After containerd restarted, there may occur an error like below when we try to re-pull the image:
The reason why occurred this error is because the
updatedatfile is empty, this PR is to fix this problem: we should allow the timestamp file is empty, and when finding theupdatedatfile is empty, we should set theupdatedatequals tostartedat