-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Add event subscriber for transaction isolation level #18227
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
Add event subscriber for transaction isolation level #18227
Conversation
nickvergessen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐘
|
Master is 19 now. Please merge this early. |
de64574 to
ac6171e
Compare
Signed-off-by: Daniel Kesselberg <[email protected]>
ac6171e to
9e699a8
Compare
ChristophWurst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code makes sense!
|
The documentation https://docs.nextcloud.com/server/latest/admin_manual/installation/system_requirements.html still says to set the installation to read-committed. Please change. Thanks |
|
Which is still what we do 🤷♂️ |
Fix #17947
Tricky one. Take a long running task (e.g. uploading a file). Connection is lost from sql server.
ReconnectWrapperwill handle the disconnect and reconnect. TransactionLevel is correct for the first connection but not for the reconnected one because setTransactionLevel works per connection.This change is probably danger.
setTransactionIsolation(parent::TRANSACTION_READ_COMMITTED);is the same as calling$this->connect()from the constructor.Master: A new
DB\Connectioninstance will connect immediately to the sql server (triggered bysetTransactionIsolation.This PR: Connection to sql server is established on demand.
postConnectwill run before the requested query.Don't have a reliable way to reproduce it yet. Keeping a process open with xdebug and kill the sql connection works sometimes ;)