Giter Club home page Giter Club logo

Comments (5)

lynncui00 avatar lynncui00 commented on May 22, 2024
  1. minchoseninstanceid是记录当前节点保留的最小的instance,以便决定是否要进行Checkpoint的拉取。同时也是重启后Cleaner的起始删除位置。
  2. 延迟100个设置是为了减少写磁盘的次数。
  3. 重启的时候会进行minchoseninstanceid的修复(FixMinChosenInstanceID)。
  4. 不清楚你所说的失败是什么失败?是实际遇到的么?有无日志可以贴上来帮忙定位一下问题。

from phxpaxos.

weylan avatar weylan commented on May 22, 2024

我设置了保存5个instance,运行到了cur_instance比如18,当前保存的instane 为13-18,
那么遇到的问题是重启之后Cleaner无法启动,查看日志,显示需要从版本0开始学习,但是13以前instance已经都被Delete掉了,min_instanceid由于有100个的版本延迟 一直没有存盘过。

所以我修改了GetMinChosenInstanceID 为当前存在最小instance (eg. 13) 现在工作正常了

from phxpaxos.

lynncui00 avatar lynncui00 commented on May 22, 2024

Cleaner只会删除CheckpointInstanceID之前的Instance,如果删除到了18,那说明你给的CheckpointInstanceID是18。那么下次启动的时候必须同样给予18,否则违反了正确性,具体麻烦参考WIKI里面的状态机讲解。

from phxpaxos.

weylan avatar weylan commented on May 22, 2024

我并没有使用自己状态机,而只是使用了选举功能 设置了保存版本数为5。我在看一下运行逻辑。

另外 我测试了一下sample的选举,我设置了SetHoldPaxosLogCount(5)一样会导致第三个节点一旦被错过,就无法再次Lean学到正取的状态。

from phxpaxos.

lynncui00 avatar lynncui00 commented on May 22, 2024

5这个值可能太小了,设置一个100以上的值试试。拉checkpoint是一个涉及到重启程序的繁重操作。一旦这个过程又落后了,就又陷入了拉checkpoint的循环。实际情况都是建议保留更多的log以避免拉checkpoint。

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.