Rebuild routes immediately when modules are installed

Created on 13 October 2015, over 8 years ago
Updated 26 April 2023, about 1 year ago

Problem/Motivation

We currently try to rebuild the router in kernel.terminate so that it only gets rebuilt once per request. This is an optimization for when multiple modules (or other route rebuilding operations) are triggered in a single request.

However this makes module enabling non-transactional (see related issues) - the state of the installed modules and their routes gets out of sync, which can lead to race conditions and fatal errors.

Additionally, when enabling modules via the UI, it should move into a batch anyway (see related issues), so would get rebuilt every batch request anyway.

Proposed resolution

When enabling a module, just immediately rebuild routes instead of setting rebuildNeeded.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Fixed

Version

8.1 ⚰️

Component
RoutingΒ  β†’

Last updated about 5 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom catch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024