Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

tcitworld
Copy link
Member

@tcitworld tcitworld commented Jan 23, 2023

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

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>
@tcitworld tcitworld added this to the Nextcloud 26 milestone Jan 23, 2023
@tcitworld tcitworld requested a review from icewind1991 January 23, 2023 16:58
@szaimen szaimen requested review from a team, ArtificialOwl and come-nc and removed request for a team January 23, 2023 17:20
@@ -271,7 +276,8 @@
* @param array $data
*
* @return int file id
* @throws \RuntimeException
* @throws Exception

Check failure

Code scanning / Psalm

UndefinedDocblockClass

Docblock-defined class, interface or enum named OC\Files\Cache\Exception does not exist
@@ -271,7 +276,8 @@ public function put($file, array $data) {
* @param array $data
*
* @return int file id
* @throws \RuntimeException
* @throws Exception
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @throws Exception
* @throws \Exception

@come-nc
Copy link
Contributor

come-nc commented Jan 24, 2023

I’m not comfortable enough with the DB code to review that, I never used transactions

@tcitworld tcitworld added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Jan 24, 2023
@tcitworld
Copy link
Member Author

Needs investigation for the PostgreSQL failing tests.

@tcitworld tcitworld marked this pull request as draft January 24, 2023 10:43
@blizzz blizzz mentioned this pull request Feb 1, 2023
@skjnldsv skjnldsv mentioned this pull request Feb 23, 2023
@blizzz blizzz mentioned this pull request Mar 7, 2023
@blizzz blizzz modified the milestones: Nextcloud 26, Nextcloud 27 Mar 9, 2023
This was referenced May 3, 2023
@skjnldsv skjnldsv modified the milestones: Nextcloud 27, Nextcloud 28 May 9, 2023
@skjnldsv skjnldsv mentioned this pull request Nov 1, 2023
@blizzz blizzz mentioned this pull request Nov 6, 2023
This was referenced Nov 10, 2023
@blizzz blizzz mentioned this pull request Nov 20, 2023
5 tasks
@blizzz blizzz modified the milestones: Nextcloud 28, Nextcloud 29 Nov 23, 2023
This was referenced Mar 12, 2024
@Altahrim Altahrim mentioned this pull request Mar 20, 2024
@skjnldsv skjnldsv modified the milestones: Nextcloud 29, Nextcloud 30 Mar 28, 2024
@flohoff
Copy link

flohoff commented Jun 21, 2024

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.

@skjnldsv skjnldsv modified the milestones: Nextcloud 30, Nextcloud 31 Aug 14, 2024
@skjnldsv skjnldsv closed this Aug 14, 2024
@skjnldsv skjnldsv removed this from the Nextcloud 31 milestone Aug 14, 2024
@skjnldsv skjnldsv deleted the file-cache-insertion-atomic branch August 30, 2024 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants