Improve atomic delete#3233
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3233 +/- ##
=======================================
Coverage 44.63% 44.63%
=======================================
Files 113 113
Lines 12161 12161
=======================================
Hits 5428 5428
Misses 5898 5898
Partials 835 835
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Should we try deleting hidden directory?
There was a problem hiding this comment.
Not sure, but the current logic is if we remove hidden directory, it can not found bundle, since bundle become , container name become hidden, it can not removed againxxx/.id
There was a problem hiding this comment.
I think we can just check for IsNotExist on rename instead of making an extra stat call.
There was a problem hiding this comment.
Also think this way, the current way can avoid doing RemoveAll
There was a problem hiding this comment.
can we handle this error on the os.Rename?
|
Actually I am not find where to get namespace directory hidden 😕 containerd/runtime/v1/linux/runtime.go Lines 288 to 296 in 835e6d0 |
|
@crosbymichael , I still get 2 questions:
|
skip hidden directories in load task, and return soon if path not exist in atomicDelete Signed-off-by: Ace-Tang <[email protected]>
| !os.IsNotExist(err) { | ||
| return err | ||
| } | ||
| return os.RemoveAll(atomicPath) |
There was a problem hiding this comment.
I think we would need to skip this if Rename does not succeed
| !os.IsNotExist(err) { | ||
| return err | ||
| } | ||
| return os.RemoveAll(atomicPath) |
skip hidden directories in load task, and return soon if path not exist in atomicDelete carry of containerd#3233 Closes containerd#3233 Signed-off-by: Ace-Tang <[email protected]> Signed-off-by: Michael Crosby <[email protected]>
skip hidden directories in load task, and return soon if path not exist in atomicDelete carry of containerd#3233 Closes containerd#3233 Signed-off-by: Ace-Tang <[email protected]> Signed-off-by: Michael Crosby <[email protected]>
skip hidden directories in load task, and return soon if path not exist
in atomicDelete
Signed-off-by: Ace-Tang [email protected]