Git Product home page Git Product logo

Comments (7)

vinllen avatar vinllen commented on May 20, 2024
  1. 这个即使忽略,但是同步过程产生的oplog依旧会有乱序的问题。比如把数据从A移到B,那么原来写在A上的数据会写到B上,比如A上执行了x=1,B上后执行x=2,但是如果分开同步,x=1和x=2顺序不能保证的话,将会导致数据错乱。
  2. 关闭balance 如果涉及到数据调整关闭shake,是需要进行全量同步

from mongoshake.

shiftyman avatar shiftyman commented on May 20, 2024

你说的有道理,这块有了解过其他产品的做法吗?比如mongo-connector,它也支持分区集群的同步的。

from mongoshake.

vinllen avatar vinllen commented on May 20, 2024

这块不清楚

from mongoshake.

yunyang1991 avatar yunyang1991 commented on May 20, 2024

翻看了一下shard迁移日志,发现迁移日志是存在标签,是否在工具中过滤该类的日志,这样分片集群是不是就不必关闭Balancer?

from mongoshake.

vinllen avatar vinllen commented on May 20, 2024

shard的主要问题不在于迁移标签,而在于全局id,在两个shard上并发不能保证全局的顺序一致性。也就是说对同一个shard key的操作落在2个shard上,保证不了这些操作的顺序性。

from mongoshake.

yunyang1991 avatar yunyang1991 commented on May 20, 2024

感谢解答,也就是说当shard数在3个以下,过滤日志是可以保证数据一致性的,对吧?

from mongoshake.

vinllen avatar vinllen commented on May 20, 2024

@yunyang1991 shard在3个以下也会触发balance,不能保证一致性。最好的是跟业务配合,hash方式进行分片,关闭balancer进行同步。

from mongoshake.

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.