Skip to content
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

Merged
merged 3 commits into from
Sep 11, 2017

Conversation

prateek
Copy link
Collaborator

@prateek prateek commented Sep 11, 2017

  • Catches an error we were dropping in the persist/fs.Writer.Close()

Making a test for this is more involved, opened #348 as a follow up.

/cc @robskillington

@coveralls
Copy link

coveralls commented Sep 11, 2017

Coverage Status

Changes Unknown when pulling 603be14 on prateek/ns-isolation-writer-close into ** on prateek/ns-isolation**.

Copy link
Collaborator

@robskillington robskillington left a 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

@@ -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 {
Copy link
Collaborator

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure thing

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@prateek prateek merged commit b8df2ae into prateek/ns-isolation Sep 11, 2017
@prateek prateek deleted the prateek/ns-isolation-writer-close branch September 11, 2017 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants