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

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

Merged
merged 7 commits into from
Oct 11, 2019

Conversation

ycombinator
Copy link
Contributor

Backports the following commits to 6.8:

CHANGELOG.next.asciidoc Outdated Show resolved Hide resolved
Copy link

@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
Contributor Author

jenkins, test this

@ycombinator
Copy link
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
Contributor Author

jenkins, test this

@ycombinator ycombinator force-pushed the backport/6.8/pr-13907 branch from b7343d8 to d5e0075 Compare October 10, 2019 04:46
@@ -25,3 +25,4 @@ type File struct {

func (File) Continuable() bool { return true }
func (File) HasState() bool { return true }
func (f File) Removed() bool { return isRemoved(f.File) }

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

@@ -25,3 +25,4 @@ type File struct {

func (File) Continuable() bool { return true }
func (File) HasState() bool { return true }
func (f File) Removed() bool { return isRemoved(f.File) }

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

@@ -44,3 +44,4 @@ func (p Pipe) Name() string { return p.File.Name() }
func (p Pipe) Stat() (os.FileInfo, error) { return p.File.Stat() }
func (p Pipe) Continuable() bool { return false }
func (p Pipe) HasState() bool { return false }
func (p Pipe) Removed() bool { return false }

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

@@ -25,3 +25,4 @@ type File struct {

func (File) Continuable() bool { return true }
func (File) HasState() bool { return true }
func (f File) Removed() bool { return isRemoved(f.File) }

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
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!

@ycombinator ycombinator force-pushed the backport/6.8/pr-13907 branch from 43cf306 to bf7609b Compare October 11, 2019 05:13
* 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 ycombinator force-pushed the backport/6.8/pr-13907 branch from bf7609b to 1acdccf Compare October 11, 2019 12:55
@ycombinator
Copy link
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