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 #16370 to 7.x: libbeat/common/file: fix fsync failure on AIX #16417

Merged
merged 1 commit into from
Feb 19, 2020

Conversation

urso
Copy link

@urso urso commented Feb 19, 2020

Cherry-pick of PR #16370 to 7.x branch. Original message:

What does this PR do?

On AIX, fsync syscall doesn't work with read-only files.
As os.Open is actually opening in read-only mode, it must be changed
for os.OpenFile with O_RDWR flag.

Why is it important?

Fix for AIX

Checklist

  • [x ] My code follows the style guidelines of this project
  • [ x] I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works

How to test this PR locally

Only for AIX

Related issues

On AIX, fsync syscall doesn't work with read-only files.
As os.Open is actually opening in read-only mode, it must be changed
for os.OpenFile with O_RDWR flag.

(cherry picked from commit 81b8fb1)
@urso urso merged commit efc53ef into elastic:7.x Feb 19, 2020
@urso urso deleted the backport_16370_7.x branch February 19, 2020 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants