Skip to content

Conversation

@nielsbauman
Copy link
Contributor

Backport

This will backport the following commits from main to 9.1:

Questions ?

Please refer to the Backport tool documentation

…4223)

Refactors `EnterpriseGeoIpDownloader` to avoid race conditions between the periodic and on-demand runs. See the discussion on elastic#126124 for more details on the previously existing race condition.

With this new approach, we make a distinction between the periodic and on-demand runs. The periodic runs simply run periodically on the configured poll interval. The on-demand runs are typically triggered by changes in the cluster state to the GeoIP metadata, and require running the downloader immediately to download any GeoIP databases that were just added by a user. By using an `AtomicInteger` to track the number of on-demand runs that were requested concurrently, we can guarantee that a new cluster state will result in the downloader running and avoid the downloader from running concurrently.

While the (non-enterprise) `GeoIpDownloader` has the exact same concurrency implementation, we scope this PR to just the enterprise downloader to focus discussions on the design changes. A follow-up PR will modify the `GeoIpDownloader` to have the same implementation as the enterprise downloader.

Fixes elastic#126124

(cherry picked from commit e946ca8)

# Conflicts:
#	muted-tests.yml
@nielsbauman nielsbauman added auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >bug Team:Data Management Meta label for data/management team labels Oct 23, 2025
@elasticsearchmachine elasticsearchmachine merged commit f6fbafe into elastic:9.1 Oct 23, 2025
35 checks passed
@nielsbauman nielsbauman deleted the backport/9.1/pr-134223 branch October 23, 2025 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP Team:Data Management Meta label for data/management team v9.1.7

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants