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

Primary/Secondary choosing querybuilder #33542

Closed
AndyScherzinger opened this issue Aug 15, 2022 · 6 comments · Fixed by #42345 or nextcloud/documentation#11492
Closed

Primary/Secondary choosing querybuilder #33542

AndyScherzinger opened this issue Aug 15, 2022 · 6 comments · Fixed by #42345 or nextcloud/documentation#11492
Assignees
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement performance 🚀 🍀 2024-Spring
Milestone

Comments

@AndyScherzinger
Copy link
Member

AndyScherzinger commented Aug 15, 2022

In case of write operations mark table as dirty and if read request comes in and table is in a "primary-enforced reads after writes list", so primary-forced reads only happen if write happen and table is configured in the static list where this behavior needs to happen.

@CarlSchwan
Copy link
Member

We could use something like this https://github.com/nalgoo/cluster-connection to determine to which nodes to send the DB query

@juliusknorr
Copy link
Member

https://github.com/doctrine/dbal/blob/45941c67dd0505dab2fb970786d93055b7cbd2b6/src/Connections/PrimaryReadReplicaConnection.php could be useful

  • This might only help for performance in cases where the db proxy currently distributes all reads/writes to the master
  • Could still be useful to prevent deadlocks or read after write inconsistency
  • Can help to track casual reads by logging such cases

@juliusknorr juliusknorr moved this to 📄 To do (~10 entries) in 📝 Office team Oct 30, 2023
@juliusknorr
Copy link
Member

juliusknorr commented Nov 2, 2023

@mickenordin
Copy link
Contributor

I think this would be very useful to get high availability with the use of proxysql or similar software proxies in between nextcloud and the database cluser. If I can help out in any way, I will. I have many Galera clusters where Nextcloud is running that I can test stuff out on.

@juliusknorr
Copy link
Member

Thanks for the offer @mickenordin

A first draft to make use of replica connections is in #41998, though I have not dived into how we could perform the primary enforcement on a per table level yet. Currently doctrine DBAL handles this on a per connection level.

@juliusknorr juliusknorr moved this from 📄 To do (~10 entries) to 🏗️ In progress in 📝 Office team Dec 21, 2023
@skjnldsv skjnldsv added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Jan 2, 2024
@ChristophWurst ChristophWurst added 2. developing Work in progress 3. to review Waiting for reviews and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap 2. developing Work in progress labels Jan 3, 2024
@github-project-automation github-project-automation bot moved this from 🏗️ In progress to ☑️ Done in 📝 Office team Jan 12, 2024
@github-project-automation github-project-automation bot moved this from 🏗️ In progress to ☑️ Done in 💌 📅 👥 Groupware team Jan 12, 2024
@ChristophWurst
Copy link
Member

28 port for pre-production testing: #43261

@AndyScherzinger AndyScherzinger moved this to ☑️ Done in 📁 Files team Feb 13, 2024
@AndyScherzinger AndyScherzinger added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment