-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Conversation
There was a problem hiding this 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
jenkins, test this |
@urso The CI failure is now fixed so this is ready for another review from you, when you get a chance, please. Thanks! |
jenkins, test this |
b7343d8
to
d5e0075
Compare
@@ -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) } |
There was a problem hiding this comment.
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) } |
There was a problem hiding this comment.
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 } |
There was a problem hiding this comment.
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) } |
There was a problem hiding this comment.
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
43cf306
to
bf7609b
Compare
* 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
bf7609b
to
1acdccf
Compare
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. |
Backports the following commits to 6.8: