Code Monkey home page Code Monkey logo

Comments (4)

healthwaite avatar healthwaite commented on June 25, 2024

After playing around it looks like the correct way to handle this scenario is to:

  1. Enable the advanced statefulset when installing the operator
  2. To remove basic-tikv-2, edit the TidbCluster CR and change tikv.statefulset.replicas to the desired number (5) and set the annotations.tikv.tidb.pingcap.com/delete-slots: '[2]'.

Note the documentation here says to set tikv.replicas to the 5, which doesn't help in this scenario.

Would someone be able to confirm what I've just written? I think it would be useful to update the documentation to detail how to remove a failed pods.

from tidb-operator.

csuzhangxc avatar csuzhangxc commented on June 25, 2024

To remove a failed TiKV, if you don't want to use Advanced StatefulSet, the correct way is:

I can do this by removing the PVC for tikv-2, removing the store using pd-ctl unsafe remove-failed-stores and then restarting basic-tikv-2.

If you want to use Advanced StatefulSet, the correct way is:

Enable the advanced statefulset when installing the operator; set the annotations.tikv.tidb.pingcap.com/delete-slots: '[2]'

There is no need to change the tikv.replicas.


Note the documentation here says to set tikv.replicas to the 5, which doesn't help in this scenario.

Do you have any details about this?

from tidb-operator.

healthwaite avatar healthwaite commented on June 25, 2024

To remove a failed TiKV, if you don't want to use Advanced StatefulSet, the correct way is...:
Apologies! I've just retried this and setting the annotation does seem to do the correct thing. Maybe I didn't wait long enough.

One further question. If I am using TiKV with local storage and I remove a failed TiKV via the Advanced StatefulSet annotation should I also use pd-ctl unsafe remove-failed-stores to remove the store? If so is it better to use remove-failed-store before or after setting the statefulset annotation?

Thanks.

from tidb-operator.

csuzhangxc avatar csuzhangxc commented on June 25, 2024

If I am using TiKV with local storage and I remove a failed TiKV via the Advanced StatefulSet annotation should I also use pd-ctl unsafe remove-failed-stores to remove the store? If so is it better to use remove-failed-store before or after setting the statefulset annotation?

You can use remove-failed-store after setting the statefulset annotation

from tidb-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.