-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Insert filecache data and conflict fallback read in the same transaction #36313
Conversation
In the case of an asynchronous replication database system, the inserted row might not yet be available in the replicated R/O database. Closes #21811 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
@@ -271,7 +276,8 @@ public function put($file, array $data) { | |||
* @param array $data | |||
* | |||
* @return int file id | |||
* @throws \RuntimeException | |||
* @throws Exception |
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.
* @throws Exception | |
* @throws \Exception |
I’m not comfortable enough with the DB code to review that, I never used transactions |
Needs investigation for the PostgreSQL failing tests. |
We are running with a rebased version of this in 27.1.9 now and the getId backtraces disappeared completely. We saw them for years now. Backend is a Galera Cluster with a Maxscale. |
Summary
In the case of an asynchronous replication database system, the inserted row might not yet be available in the replicated R/O database.
This removes d918458 from @icewind1991 which shouldn't be needed anymore.
Best reviewed as https://github.com/nextcloud/server/pull/36313/files?diff=unified&w=1
Checklist