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

Geoip database management cache invalidation #16222

Merged

Conversation

yaauie
Copy link
Member

@yaauie yaauie commented Jun 18, 2024

Release notes

Resolves a regression from 8.12.0 in GeoIP Database Management in which a new instance of a Geoip Filter can be provided with a stale path for a database that no longer exists on disk, causing its pipeline to crash.

What does this PR do?

Updates the Geoip Filter's x-pack extension to properly invalidate its cached database path when receiving notifications of the database being updated or expired.

Why is it important/What is the impact to the user?

Prevents a situation where a pipeline containing a GeoIP filter cannot be reloaded until the process has been restarted.

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 (and/or docker env variables)
  • I have added tests that prove my fix is effective or that my feature works

Related issues

@yaauie yaauie requested a review from kaisecheng June 18, 2024 21:21
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

Copy link
Member

@robbavey robbavey left a comment

Choose a reason for hiding this comment

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

LGTM

@yaauie yaauie merged commit 801f0f4 into elastic:main Jun 18, 2024
6 checks passed
@yaauie
Copy link
Member Author

yaauie commented Jun 18, 2024

@logstashmachine backport 8.14

@yaauie yaauie deleted the geoip-database-management-cache-invalidation branch June 18, 2024 22:11
github-actions bot pushed a commit that referenced this pull request Jun 18, 2024
* geoip: failing specs demonstrating #16221

* geoip: invalidate cached db state when receiving updates/expiries

(cherry picked from commit 801f0f4)
yaauie added a commit that referenced this pull request Jun 18, 2024
* geoip: failing specs demonstrating #16221

* geoip: invalidate cached db state when receiving updates/expiries

(cherry picked from commit 801f0f4)

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
andsel pushed a commit to andsel/logstash that referenced this pull request Jul 12, 2024
* geoip: failing specs demonstrating elastic#16221

* geoip: invalidate cached db state when receiving updates/expiries
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.

[BUG] starting database-managed geoip filter after db refresh causes pipeline crash
4 participants