GithubHelp home page GithubHelp logo

Comments (3)

svenpecher avatar svenpecher commented on June 10, 2024

Actually my issue here seems to pretty much the same as the unsolved but closed issue #141

from mariadb-operator.

svenpecher avatar svenpecher commented on June 10, 2024

As I understand the ResetSlavePos happens during ConfigureReplica which seems to be executed during the following procedures:

  1. reconcilePodReady
  2. reconcileReplicas
  3. connectReplicasToNewPrimary
  4. changeCurrentPrimaryToReplica

For 3. and 4. it seems right to reset gtid_slave_pos.

For 1. and 2. this is a bit unexpected: I would assume that here each replica has a certain replication state (gtid_slave_pos), which gets lost here. From my understanding here it rather makes sense to keep the current position without overwriting it.

@mmontes11 what do you think about that?

from mariadb-operator.

mmontes11 avatar mmontes11 commented on June 10, 2024

Hey there @svenpecher ! Thanks for bringing this up and your detailed analysis.

This is indeed related to the following issue:

We will be implementing some replication enhancements in this release, which include choosing the furthest advanced replica in the primary switchover, see:

Ideally, I would like to avoid resetting gtid_slave_pos where possible to minimize this kind of situations like the one you report. Your suggestion makes sense, it's like a middleground, so I will have it in mind by the time I'm implementing this.

To give you some context, this reset with timeout was introduced because we've faced situations where the replication was stucked waiting for replicas be synced. In this step specifically:

reconcile: r.waitForReplicaSync,

Switching to the furthest advanced replica might help with this? Maybe we don't need to wait for the furthest advanced replica to be sync with primary?

Anyway avoid the reset it in the steps 1. and 2. does sound sensible.

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.