Skip to content

CA-405971: avoid calling DB functions when in emergency mode #6283

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

Merged
merged 2 commits into from
Feb 7, 2025

Conversation

edwintorok
Copy link
Contributor

This breaks emergency mode commands.

@edwintorok
Copy link
Contributor Author

We might need to extend the condition here to avoid making these calls in general if we not on the coordinator, and instead use "baggage" headers to propagate the scheduling bucket, instead of querying it (which would introduce additional latency), but the change here should avoid the bug (and it'll also disable this code unless the feature flag is enabled)

@edwintorok edwintorok force-pushed the pr/fix-emergency-mode branch from 898bbb9 to 7de9d1b Compare February 7, 2025 15:31
@lindig
Copy link
Contributor

lindig commented Feb 7, 2025

You might want to add a comment that motivates the condition

@edwintorok
Copy link
Contributor Author

discussed with @mg12 that it'd be good if we tweaked the buildsystem such that the Db module is not available in the emergency mode dispatch path at all (but that means we can't do the thread classification at all, at least not this early in the call tree). Will look at that separately once the blocker is fixed.

@edwintorok edwintorok force-pushed the pr/fix-emergency-mode branch from 7de9d1b to 4245225 Compare February 7, 2025 15:50
There was a codepath here that ran even with the feature flag disabled.

Signed-off-by: Edwin Török <[email protected]>
This breaks emergency mode commands.

Signed-off-by: Edwin Török <[email protected]>
@edwintorok edwintorok force-pushed the pr/fix-emergency-mode branch from 4245225 to 405bcb5 Compare February 7, 2025 16:12
@edwintorok edwintorok changed the title CA-NNNNN: avoid calling DB functions when in emergency mode CA-405971: avoid calling DB functions when in emergency mode Feb 7, 2025
@edwintorok edwintorok marked this pull request as ready for review February 7, 2025 17:33
@edwintorok
Copy link
Contributor Author

xe pool-emergency-transition-to-master finished successfully now.

@edwintorok edwintorok added this pull request to the merge queue Feb 7, 2025
Merged via the queue into xapi-project:master with commit e67b9fc Feb 7, 2025
15 checks passed
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.

3 participants