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

Fix data-dir backend race conditions loading or creating ServiceInfos #205

Conversation

groldan
Copy link
Member

@groldan groldan commented Mar 3, 2022

Upstream's DefaultGeoServerLoader has a couple issues when
it comes to multiple instances starting up at the same time:

  • creates the ServiceInfos, but doesn't persist them
  • does not set GeoServer#setGlobal and GeoServer#setLogging
    if they're not persisted
  • there's a race condition where each service instance will end
    up with service infos with different ids for the same service.

The fix involves loading the config while grabbing a lock,
and persisting any newly-created ServiceInfo.

Fixes #104

groldan added 4 commits March 2, 2022 17:17
Upstream's `DefaultGeoServerLoader` has a couple issues when
it comes to multiple instances starting up at the same time:

* creates the ServiceInfos, but doesn't persist them
* does not set GeoServer#setGlobal and GeoServer#setLogging
  if they're not persisted
* there's a race condition where each service instance will end
  up with service infos with different ids for the same service.

The fix involves loading the config while grabbing a lock,
and persisting any newly-created ServiceInfo.
@groldan groldan added the bug Something isn't working label Mar 3, 2022
@groldan groldan merged commit c8a65e3 into geoserver:main Mar 3, 2022
@groldan groldan deleted the bug/empty_catalog_race_condition_creating_services branch March 3, 2022 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data-directory catalog backend does not correctly apply changes to Config objects
1 participant