Coder Social home page Coder Social logo

Comments (4)

lynncui00 avatar lynncui00 commented on May 18, 2024

checkpoint id比 instanceid更大,有三种情况。

  1. checkpoint id出错了。
  2. paxos log丢了末尾一段数据。
  3. 从别的机器拉回来的checkpoint。

从你的情况来看,其他机器向这台机器请求同步数据,说明肯定是1这种情况。
checkpoint id和instance id虽然是独立写入,但是checkpoint id必须是比instance id小的,不可能无端端构造出来一个更大的checkpoint id。
出现这种情况整个系统肯定就无法工作了。

from phxpaxos.

xinmingyao avatar xinmingyao commented on May 18, 2024

checkpoint id比 instanceid更大的数据是实时从一台正在运行的机器上拷贝过来的,估计还是磁盘sync的问题,暂时也没想到好的办法,只能先写个工具处理一下

from phxpaxos.

lynncui00 avatar lynncui00 commented on May 18, 2024

不能自己人肉单独拷贝状态机数据,这样会有很多状态不对的。
稳妥的做法应当是先停机,然后将状态机数据+paxos log数据一起拷贝过来。

from phxpaxos.

lynncui00 avatar lynncui00 commented on May 18, 2024

@xinmingyao 您好,刚提交了一个代码,增加了针对你这种情况的Init检查,对于你这种情况会报启动失败,使得你可以更快的发现问题。

相关代码在src/algorithm/instance.cpp ProtectionLogic_IsCheckpointInstanceIDCorrect函数。

from phxpaxos.

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.