-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Database breaks when multiple features are enabled in a single recipe #16346
Comments
At first I had the feeling this could be caused by #15793, but it actually looks like a STJ problem. The Facebook widgets migration fails:
|
We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues). This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here. |
Turns out the problem is specifically with the data migration in |
Important for repro that you have to visit pages on the frontend. I can't repro just by looking around on the admin, including content editors, but opening the Blog Post of the Blog recipe surfaces it. All the errors in the issue seem like a concurrency issue during recipe import that we recently fixed: #15942. Setting
The Facebook migration issue might be the root cause though, cascading into the the rest. I get this in the logs BTW if I DON'T set
|
I looked into the multi-threading issue, but don't see how that happens, yet. Once the app reaches this faulted state, it stays in it, so every page load throws the exception, so easy to observe, However, one thread supposedly starts around here, and on page reloads, this isn't even called. My hunch is that an |
I think we get this "Two concurrent threads" error when using SQL Server, because OC is trying to re-run the failed migration for every new web request (apparently in a separate thread that's not awaited?), as if the program just started up. |
Ah, that may be it. |
Shouldn't we be more careful to ensure that the database doesn't break in the event of a single failed migration? |
Yep: #16354 |
Describe the bug
Recipe with certain features will crash the database both in SQLite and MS SQL. Happens both with setup and recipe execution. It's not clear yet if the problem is caused by a single recipe's migrations or if enabling multiple recipes in the same step causes a race condition. I will investigate further, but any suggestions are welcome.
Orchard Core version
The current latest preview at the time of writing this (2.0.0-preview-18246), also the current
main
as-is.To Reproduce
Steps to reproduce the behavior:
main
.Recipe JSON to import (these are the features step of the setup recipe of the UI test where I first encountered the problem. I will update this if I can simplify the reproducing recipe):
Note: Also tested this with SQL Server on our own repo
Expected behavior
Site should not break.
Logs and screenshots
After import:
After restarting the server:
The App_Data log:
orchard-log-2024-06-19.log
Error in SQL Server (UI test in a different repo):
The text was updated successfully, but these errors were encountered: