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

Rework interfaces for the geoip processor #113045

Merged
merged 5 commits into from
Sep 17, 2024

Conversation

joegallo
Copy link
Contributor

Renames two of the interfaces used by the geoip processor, and makes them 'String-centric' rather than 'InetAddress-centric'. Additionally, it reworks the implementation of the interface to rely on the lower-level com.maxmind.db.Reader rather than the higher-level com.maxmind.geoip2.DatabaseReader.

This PR is intended as an internal refactoring only, there's not supposed to be any user-facing consequences of this change1.

This is related to some of the work I've been doing on #109655, and which I'm trying to bring to main a bit at a time -- after this PR has been merged I'll be able to merge main into that PR and drop a lot of WIP from my machine.

This PR is finished work, and it's intended to be reviewable and merge-able as is, but I don't want to get overly focused on the precise details of the internal implementation -- some of it is Falsework that will be smoothed out in subsequent PRs. That's not meant to preclude there being discussion about it, though, of course!

Footnotes

  1. Note: actually, though, it results in a ~10% speed up in the cache-hit -heavy case because it puts InetAddress parsing on the cache-miss path (only) rather than on the cache-hit and cache-miss paths.

@joegallo joegallo added :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >refactoring Team:Data Management Meta label for data/management team v8.16.0 v9.0.0 labels Sep 17, 2024
@joegallo joegallo requested a review from masseyke September 17, 2024 18:14
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

Copy link
Member

@masseyke masseyke left a comment

Choose a reason for hiding this comment

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

LGTM

@joegallo joegallo merged commit ea896f9 into elastic:main Sep 17, 2024
15 checks passed
@joegallo joegallo deleted the ingest-geoip-rework-interfaces branch September 17, 2024 19:33
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.x

joegallo added a commit to joegallo/elasticsearch that referenced this pull request Sep 17, 2024
javanna pushed a commit to javanna/elasticsearch that referenced this pull request Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >refactoring Team:Data Management Meta label for data/management team v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants