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

Spawn reload and reset actions to all pods #573

Merged
merged 2 commits into from
Nov 29, 2024

Conversation

groldan
Copy link
Member

@groldan groldan commented Nov 29, 2024

This suggests emitting the newly introduced LifecycleEvent events on reset (ResetEvent) and reload (ReloadEvent) respectively. Connected services will receive these events to reload and/or reset their catalog and configuration.

Care is taken that a chain of events is not triggered while each node reloads the catalog and config.


Supersedes #528

Fixes #518


Authored by: @buehner, @dnlkoch, @groldan

dnlkoch and others added 2 commits November 28, 2024 22:16
Introduce ResetEvent and ReloadEvent to be triggered when a node is
instructed to reset or reload the configuration, respectively, and
publish them as distributed events for all the nodes in the cluster
to react accordingly.

Co-authored-by: Nils Bühner <[email protected]>
…level

* Prevent double event dispatching. Reload implies reset, avoid
  sending both events on reload().

* Revert changes to GeoServerImpl (overloading of resert() and reload()
  with a bolean `silent` argument). It doesn't prevent that once the
  Catalog and/or the GeoServer are reloaded, while the newly loaded
  objects are sync'ed to the in-memory one, CatalogInfoAdded and
  ConfigInfoAdded events are sent to all pods, and these ones in turn
  also do so, resulting in an explosion of events.
  Instead, disable event publishing completely while reload() and
  reset() are being processed:

  * `CatalogApplicationEventPublisher` gets new methods:
    `disable()`, `enable()`, and `enabled():boolean`.
  * `GeoServerLifecycleEventPublisher.beforeReload()` sends the
    `ReloadEvent` and disables event publishing while `reload()` is
    processed locally.
  * `GeoServerLifecycleEventPublisher.reloaded()` re-enables event
    publishing.
@groldan groldan merged commit 2e7016f into geoserver:main Nov 29, 2024
2 of 3 checks passed
@groldan groldan deleted the 518-spawn-reload-reset branch November 29, 2024 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for REST /reset and /reload spawning to all pods
2 participants