Skip to content

[6.8] Check if file has disappeared sooner in Log reader (#13907)#13960

Merged
ycombinator merged 7 commits intoelastic:6.8from
ycombinator:backport/6.8/pr-13907
Oct 11, 2019
Merged

[6.8] Check if file has disappeared sooner in Log reader (#13907)#13960
ycombinator merged 7 commits intoelastic:6.8from
ycombinator:backport/6.8/pr-13907

Conversation

@ycombinator
Copy link
Copy Markdown
Contributor

Backports the following commits to 6.8:

Copy link
Copy Markdown

@urso urso left a comment

Choose a reason for hiding this comment

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

Please check CI. Looks like you are using functions that have been changed/introduced in 7.x

@ycombinator ycombinator requested a review from urso October 9, 2019 15:42
@ycombinator
Copy link
Copy Markdown
Contributor Author

jenkins, test this

@ycombinator
Copy link
Copy Markdown
Contributor Author

@urso The CI failure is now fixed so this is ready for another review from you, when you get a chance, please. Thanks!

@ycombinator
Copy link
Copy Markdown
Contributor Author

jenkins, test this

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

exported method File.Removed should have comment or be unexported

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

exported method File.Removed should have comment or be unexported

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

exported method Pipe.Removed should have comment or be unexported

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

exported method File.Removed should have comment or be unexported

@ycombinator
Copy link
Copy Markdown
Contributor Author

@urso Thanks for the explaining off-PR why the check for CloseRemoved in log.go wouldn't work on Windows. Per our conversation, I have backported only the necessary parts from #10747 as part of this PR and fixed the check for CloseRemoved. Please re-review when you get a chance. Thank you!

* Adding comment about EOF and removing redundant logic

* Adding debug logging when close_remove and close_renamed situations are reached

* Check file stats related errors before adding to buffer

* Reordering checks to be same as before

* Add CHANGELOG entry

* Fixing issue # in CHANGELOG entry

* Move CloseInactive and truncate checks back to being after EOF check

* Don't perform stat call for CloseRemoved/CloseRenamed unless those settings are enabled

* Better comments / function godoc

* Renaming method to be more descriptive

* Fixing up CHANGELOG
@ycombinator
Copy link
Copy Markdown
Contributor Author

Travis CI is green but Jenkins CI is not. However, the only build that are failing in Jenkins CI is X-Pack/Metricbeat on Linux.

The 6.8 X-Pack/Metricbeat on Linux build hasn't been green for as long as we have history for that build: https://beats-ci.elastic.co/job/elastic+beats+6.8+multijob-linux/beat=x-pack%2Fmetricbeat,label=linux-immutable/.

Since this failure is unrelated to this PR, I'm going ahead and merging it now.

@ycombinator ycombinator merged commit e28e5c2 into elastic:6.8 Oct 11, 2019
@ycombinator ycombinator deleted the backport/6.8/pr-13907 branch December 25, 2019 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants