-
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
Filebeat: Fix random error on harvester close #21048
Merged
adriansr
merged 2 commits into
elastic:master
from
adriansr:fix_fb_harvester_close_error
Sep 10, 2020
Merged
Filebeat: Fix random error on harvester close #21048
adriansr
merged 2 commits into
elastic:master
from
adriansr:fix_fb_harvester_close_error
Sep 10, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
botelastic
bot
added
the
needs_team
Indicates that the issue/PR needs a Team:* label
label
Sep 9, 2020
adriansr
added
bug
Filebeat
Filebeat
needs_backport
PR is waiting to be backported to other branches.
review
labels
Sep 9, 2020
This fixes a race condition when a harvester is closed at the same time that its source file size is being calculated. Before this fix, `Error updating file size` errors are randomly printed.
adriansr
force-pushed
the
fix_fb_harvester_close_error
branch
from
September 9, 2020 23:03
6721575
to
b6a86bf
Compare
adriansr
changed the title
Filebeat: Fix race condition on harvester close
Filebeat: Fix radom error on harvester close
Sep 9, 2020
Collaborator
andresrc
added
Team:Services
(Deprecated) Label for the former Integrations-Services team
Team:SIEM
labels
Sep 10, 2020
Pinging @elastic/integrations-services (Team:Services) |
Pinging @elastic/siem (Team:SIEM) |
botelastic
bot
removed
the
needs_team
Indicates that the issue/PR needs a Team:* label
label
Sep 10, 2020
adriansr
changed the title
Filebeat: Fix radom error on harvester close
Filebeat: Fix random error on harvester close
Sep 10, 2020
kvch
approved these changes
Sep 10, 2020
7 tasks
adriansr
removed
the
needs_backport
PR is waiting to be backported to other branches.
label
Sep 10, 2020
adriansr
added a commit
to adriansr/beats
that referenced
this pull request
Sep 10, 2020
This fixes a race condition when a harvester is closed at the same time that its source file size is being calculated. Before this fix, `Error updating file size` errors are randomly printed, because the file handle becomes closed inside the os.Stat call. (cherry picked from commit af6222d)
7 tasks
adriansr
added a commit
to adriansr/beats
that referenced
this pull request
Sep 10, 2020
This fixes a race condition when a harvester is closed at the same time that its source file size is being calculated. Before this fix, `Error updating file size` errors are randomly printed, because the file handle becomes closed inside the os.Stat call. (cherry picked from commit af6222d)
v1v
added a commit
to v1v/beats
that referenced
this pull request
Sep 14, 2020
* upstream/master: (362 commits) Add vendoring to Google Cloud Functions again (elastic#21070) [Elastic Agent] Add fleet.host.id for sending to endpoint. (elastic#21042) Do not need Google credentials before using it (elastic#21072) [Filebeat][New Module] Zoom webhook module (elastic#20414) Add support for GMT timezone offset in decode_cef (elastic#20993) Filebeat: Fix random error on harvester close (elastic#21048) Add ingress controller dashboards (elastic#21052) Fix loggers in composable module. (elastic#21047) [Ingest Manager] Increase kibana client timeout to 5 minutes (elastic#21037) Add changelog. (elastic#21041) [Elastic Agent] Add support for EQL based conditions (elastic#20994) Disable Kafka metricsets based on Jolokia (elastic#20989) Update apm agent (elastic#21031) Add container ECS fields in kubernetes metadata (elastic#20984) Sanitize event.host in Metricbeat (elastic#21022) Update api-keys.asciidoc - API key prerequisites (elastic#21026) [Filebeat][suricata] Map x509 for suricata/eve fileset (elastic#20973) [Filebeat][santa] Map x509 fields in santa module (elastic#20976) [Filebeat][fortinet] Map x509 ecs fields for fortinet fw fileset (elastic#20983) Bump zeek kerberos/ssl/x509 ecs version (elastic#21003) ...
v1v
added a commit
to v1v/beats
that referenced
this pull request
Sep 14, 2020
* upstream/master: (364 commits) Add vendoring to Google Cloud Functions again (elastic#21070) [Elastic Agent] Add fleet.host.id for sending to endpoint. (elastic#21042) Do not need Google credentials before using it (elastic#21072) [Filebeat][New Module] Zoom webhook module (elastic#20414) Add support for GMT timezone offset in decode_cef (elastic#20993) Filebeat: Fix random error on harvester close (elastic#21048) Add ingress controller dashboards (elastic#21052) Fix loggers in composable module. (elastic#21047) [Ingest Manager] Increase kibana client timeout to 5 minutes (elastic#21037) Add changelog. (elastic#21041) [Elastic Agent] Add support for EQL based conditions (elastic#20994) Disable Kafka metricsets based on Jolokia (elastic#20989) Update apm agent (elastic#21031) Add container ECS fields in kubernetes metadata (elastic#20984) Sanitize event.host in Metricbeat (elastic#21022) Update api-keys.asciidoc - API key prerequisites (elastic#21026) [Filebeat][suricata] Map x509 for suricata/eve fileset (elastic#20973) [Filebeat][santa] Map x509 fields in santa module (elastic#20976) [Filebeat][fortinet] Map x509 ecs fields for fortinet fw fileset (elastic#20983) Bump zeek kerberos/ssl/x509 ecs version (elastic#21003) ...
adriansr
added a commit
that referenced
this pull request
Sep 14, 2020
This fixes a race condition when a harvester is closed at the same time that its source file size is being calculated. Before this fix, `Error updating file size` errors are randomly printed, because the file handle becomes closed inside the os.Stat call. (cherry picked from commit af6222d)
adriansr
added a commit
that referenced
this pull request
Sep 14, 2020
This fixes a race condition when a harvester is closed at the same time that its source file size is being calculated. Before this fix, `Error updating file size` errors are randomly printed, because the file handle becomes closed inside the os.Stat call. (cherry picked from commit af6222d)
v1v
added a commit
to v1v/beats
that referenced
this pull request
Sep 18, 2020
…ne-2.0 * upstream/master: (44 commits) Update users.asciidoc (elastic#20802) (elastic#21108) Fix docker provider builder. (elastic#21118) [Elastic Agent] Add docker composable dynamic provider. (elastic#20842) Add new modules/filesets from rsa2elk for 7.10 (elastic#20820) Fix broken links to external websites (elastic#21061) [docs] typo in the command line (elastic#20799) [Filebeat] add panos type and sub_type (elastic#20912) Move the `compute_vm_scalset` to a light metricset and map the cloud metadata (elastic#21038) [Filebeat] Add support for Cloudtrail digest files (elastic#21086) Add metrics collection from cost explorer into aws/billing metricset (elastic#20527) Add vendoring to Google Cloud Functions again (elastic#21070) [Elastic Agent] Add fleet.host.id for sending to endpoint. (elastic#21042) Do not need Google credentials before using it (elastic#21072) [Filebeat][New Module] Zoom webhook module (elastic#20414) Add support for GMT timezone offset in decode_cef (elastic#20993) Filebeat: Fix random error on harvester close (elastic#21048) Add ingress controller dashboards (elastic#21052) Fix loggers in composable module. (elastic#21047) [Ingest Manager] Increase kibana client timeout to 5 minutes (elastic#21037) Add changelog. (elastic#21041) ...
leweafan
pushed a commit
to leweafan/beats
that referenced
this pull request
Apr 28, 2023
…c#21056) This fixes a race condition when a harvester is closed at the same time that its source file size is being calculated. Before this fix, `Error updating file size` errors are randomly printed, because the file handle becomes closed inside the os.Stat call. (cherry picked from commit 918f17a)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes a race condition when a harvester is closed at the same time that its source file size is being calculated.
Why is it important?
Random
Error updating file size
errors have been reported. Other than that it looks like the bug has no other effect.Checklist
I have made corresponding changes to the documentationI have made corresponding change to the default configuration filesI have added tests that prove my fix is effective or that my feature worksCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
It's easy to trigger this error by removing the Ticker in
monitorFileSize
and busy loop callingh.updateCurrentSize()
, with a configuration that usesclose_eof
and many files.Logs