Skip to content

Conversation

jonasbardino
Copy link
Contributor

@jonasbardino jonasbardino commented Oct 9, 2025

Add recurring handling of user, resource and vgrid map refresh to janitor service. Effectively centralizes the updates in a single long-running process rather than the fragile concurrent client-initiated refreshes, since they tend to result in clients hammering the site during refresh and may leave cache inconsistent if client hits HTTP time-out in the middle of a refresh (#121).

Runs in the main thread so far, but we may need to consider a background thread/process for the refresh if it turns out to delay other janitor tasks too much.

Removes client-initiated refresh triggers in vgridman and resman backends if janitor is enabled.

Could perhaps use improved user-facing information e.g. about when the current (cached) view was generated on vgridman and resman pages to help clarify when any recent changes are not yet fully processed and showing.

@jonasbardino
Copy link
Contributor Author

Currently fails CI due to the unrelated #353.

@jonasbardino jonasbardino marked this pull request as ready for review October 9, 2025 12:25
@jonasbardino jonasbardino requested a review from a team October 9, 2025 12:27
@jonasbardino
Copy link
Contributor Author

Fundamentally verified in practice on a test site instance, but could use some more testing.

Copy link
Contributor

@Martin-Rehr Martin-Rehr left a comment

Choose a reason for hiding this comment

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

I would prefer to let the get_X functions from 'mig.shared.vgridaccess' handle if the janitor service is enabled.

@jonasbardino
Copy link
Contributor Author

I would prefer to let the get_X functions from 'mig.shared.vgridaccess' handle if the janitor service is enabled.

Thanks for reviewing.

If you mean keep get_X calls unchanged in vgridman and resman when janitor is enabled that will most likely cause the existing cache issues to remain or even grow as the janitor will then only join the thrashing. I've elaborated on the motivation in the PR description.

…itor.

Still pending removal of client initiated refresh triggers in vgridman backend.
…nd resman

backends if janitor is enabled since it takes care of all refresh handling.
@jonasbardino jonasbardino force-pushed the adjust/janitor-to-handle-all-cache-map-maintenance branch from b4c782a to c892ed1 Compare October 10, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Workgroup/VGrid cache corruption

2 participants