-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check checkpoint file writer error #347
Check checkpoint file writer error #347
Conversation
Changes Unknown when pulling 603be14 on prateek/ns-isolation-writer-close into ** on prateek/ns-isolation**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM other than nit
persist/fs/write.go
Outdated
@@ -262,8 +262,11 @@ func (w *writer) writeCheckpointFile() error { | |||
if err != nil { | |||
return err | |||
} | |||
defer fd.Close() | |||
return w.digestBuf.WriteDigestToFile(fd, w.digestFdWithDigestContents.Digest().Sum32()) | |||
if err := w.digestBuf.WriteDigestToFile(fd, w.digestFdWithDigestContents.Digest().Sum32()); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Extract the digest calculation to line before to reduce line length and improve overall readability?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
persist/fs.Writer.Close()
Making a test for this is more involved, opened #348 as a follow up.
/cc @robskillington