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

Cherry-pick #9069 to 6.x: Propagate Sync error when running SafeFileRotate #9141

Merged
merged 5 commits into from
Nov 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ https://github.com/elastic/beats/compare/v6.5.0...6.x[Check the HEAD diff]

*Affecting all Beats*

- Propagate Sync error when running SafeFileRotate. {pull}9069[9069]

*Auditbeat*

*Filebeat*
Expand Down
3 changes: 1 addition & 2 deletions libbeat/common/file/helper_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ func SafeFileRotate(path, tempfile string) error {
return nil // ignore error
}
defer f.Close()
f.Sync()

return nil
return f.Sync()
}