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

Use timed.Periodic when running the periodic scans of filestream #24248

Merged

Conversation

kvch
Copy link
Contributor

@kvch kvch commented Feb 25, 2021

What does this PR do?

This PR changes the existing cancellation check to the timed.Periodic function of go-concert to make sure scanning does not ignore cancellation if a scan phase takes longer than the interval configured in prospector.scanner.check_interval.

Why is it important?

We leak a goroutine if cancellation is not detected properly.

Checklist

  • My code follows the style guidelines of this project
    - [ ] 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
    - [ ] I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Feb 25, 2021
@kvch kvch added the Team:Elastic-Agent Label for the Agent team label Feb 25, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Feb 25, 2021
@kvch kvch requested a review from urso February 25, 2021 15:19
@elasticmachine
Copy link
Collaborator

elasticmachine commented Feb 25, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #24248 updated

  • Start Time: 2021-02-25T17:09:05.412+0000

  • Duration: 46 min 15 sec

  • Commit: 678ec77

Test stats 🧪

Test Results
Failed 0
Passed 13059
Skipped 2215
Total 15274

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 13059
Skipped 2215
Total 15274

@kvch kvch force-pushed the fix-filebeat-use-timed-periodic-when-scanning-fs branch from 4854294 to 678ec77 Compare February 25, 2021 17:08
@kvch kvch merged commit fe26537 into elastic:master Mar 2, 2021
kvch added a commit to kvch/beats that referenced this pull request Mar 2, 2021
@kvch kvch added the v7.13.0 label Mar 2, 2021
kvch added a commit that referenced this pull request Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Elastic-Agent Label for the Agent team v7.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants