Skip to content

Commit

Permalink
Do not die on flushes failing after delete
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalif committed Sep 21, 2021
1 parent ea6afb1 commit 04777d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -1734,6 +1734,10 @@ func (inode *Inode) FlushPart(part uint64) {
resp, err := cloud.MultipartBlobAdd(&partInput)
inode.mu.Lock()

if inode.CacheState == ST_DELETED {
// File was deleted while we were flushing it
return
}
inode.recordFlushError(err)
if err != nil {
log.Errorf("Failed to flush part %v of object %v: %v", part, key, err)
Expand Down

0 comments on commit 04777d4

Please sign in to comment.