GithubHelp home page GithubHelp logo

Comments (5)

mmontes11 avatar mmontes11 commented on June 7, 2024 1

Here it is the PR, could you PTAL? 🙏🏻 :

from mariadb-operator.

mmontes11 avatar mmontes11 commented on June 7, 2024

Thanks for reporting this @harunkucuk5 !

Your proposal totally makes sense, FLUSH TABLES WITH READ LOCK; was actually present in the first implementation of replication. We opted to go for a more permissive approach with readonly after facing issues where the operator was struggling to reconcile replication, as it was in an intermediate state where the tables were locked.

I think readonly may be good enough for uses cases where the clients have a restricted amount of permissions, not including SUPER, so they can't actually bypass readonly. That might not be always the case, so I still see the benefit of FLUSH TABLES WITH READ LOCK;

What about exposing this to the user in a new field with propper documentation?:

apiVersion: mariadb.mmontes.io/v1alpha1
kind: MariaDB
metadata:
  name: mariadb-repl
spec:
  ...
  replication:
    enabled: true
    primary:
      podIndex: 0
      automaticFailover: true
      lockStrategy: (ReadOnly | ReadLock)

from mariadb-operator.

harunkucuk5 avatar harunkucuk5 commented on June 7, 2024

Hey @mmontes11, read-only may be enough but on the other hand if there are some application users with SUPER privilege this would cause data loss on the new primary along with the broken replication. Ideally, there should not be any application user with SUPER privilege but, unfortunately, when it comes to real-world cases it is not like that in many cases I have seen. I think the operator should provide a reliable auto-failover mechanism regardless of the user privileges. I was unaware that the FLUSH TABLES WITH READ LOCK was already used and caused some issues. I will check the history. But if we implement this and it works without any issues then there should not be any need for the read-only option. Let me check this and get back to you later on

from mariadb-operator.

mmontes11 avatar mmontes11 commented on June 7, 2024

Hey @harunkucuk5 !

I agree, consistency and relibability is probably the most important thing during switchover/failover, let's bring this change back in!

This was introduced in v0.0.15 via this PR:

I will re-apply it and see how it behaves so we can consider to ship it with v0.0.24.

from mariadb-operator.

mmontes11 avatar mmontes11 commented on June 7, 2024

Supported by this PR:

from mariadb-operator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.