Skip to content

BackgroundTasks 42356: Extend background task DB indexes - #11521

Open
matheuszych wants to merge 1 commit into
ILIAS-eLearning:release_10from
matheuszych:bg/42356
Open

matheuszych wants to merge 1 commit into
ILIAS-eLearning:release_10from
matheuszych:bg/42356

Conversation

@matheuszych

Copy link
Copy Markdown
Contributor

See: https://mantis.ilias.de/view.php?id=42356

The ILIAS 8.0 background-task migration only indexed il_bt_bucket by user_id. Typical lookups filter by bucket state and join tasks or stored values via bucket_id, which stayed unindexed. step_1 now replaces that index with (user_id, state) on il_bt_bucket and adds bucket_id indexes on il_bt_task and il_bt_value_to_task.

/cc @thojou

@mjansenDatabay

Copy link
Copy Markdown
Contributor

@matheuszych I suggest adding a new database update file/class for hotfixes in the ILIAS versions 10 and 11, and a new regular database update step file/class for ILIAS 12/trunk.

@mjansenDatabay mjansenDatabay added bugfix php Pull requests that update Php code labels May 4, 2026
@matheuszych
matheuszych force-pushed the bg/42356 branch 2 times, most recently from be032e2 to 306bd37 Compare May 4, 2026 11:02
See: https://mantis.ilias.de/view.php?id=42356

The standalone `ilBackgroundTasksDB80` class only added a single bucket index. It is removed in favour of `ilBackgroundTasksDBHotfixes10`, whose first step adds the composite `(user_id, state)` bucket index plus `bucket_id` indexes on `il_bt_task` and `il_bt_value_to_task`. The second step cleans orphaned rows, fixes dangling root/current task pointers, and creates matching InnoDB foreign keys (cascade or set-null) across the background-task tables where the engine allows it. `ilBackgroundTasksSetupAgent` delegates install objectives to the update collection (config storage plus these steps) and points metrics collection at the hotfix class.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants