Comments (5)
Here it is the PR, could you PTAL? 🙏🏻 :
from mariadb-operator.
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.
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.
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.
Supported by this PR:
from mariadb-operator.
Related Issues (20)
- [Bug] Repeated log messages of "Deleted Master_info file" HOT 3
- [Bug] cannot use database CR on galera clusters HOT 3
- [Bug] Unable to Start Maxscale Pod After add StorageClassName in MaxScale Config HOT 2
- [Bug] caPath value not used when cert-manager is enabled HOT 3
- [Bug] `mariadb-dump` warning attempting to read defaults HOT 1
- [Feature] Better support for updates
- [Question] Database divergence after multiple isolated failures. HOT 1
- [Question] Can I change image repository of a object backup which use mariadb-operator to deploy its pod
- [Feature] Improve `User` reconciliation. Password rotation
- [Feature] Delete PersistentVolumeClaims
- `v0.0.29` HOT 1
- [Bug] Unable to scale to 0
- [Bug] Resource Limits not correct set
- [Bug] manifests yaml was deleted after automatic upgrade
- Support for successfuljobshistorylimit and failedjobshistorylimit in backups.k8s.mariadb.com
- [Bug]
- [Feature] Protect ressources to prevent accidential deletion/data loss HOT 1
- [Feature] Backup encryption
- [Feature] UBI9 support for all system Docker images HOT 1
- [Feature] IBM Power Docker images
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mariadb-operator.