Comments (5)
- minchoseninstanceid是记录当前节点保留的最小的instance,以便决定是否要进行Checkpoint的拉取。同时也是重启后Cleaner的起始删除位置。
- 延迟100个设置是为了减少写磁盘的次数。
- 重启的时候会进行minchoseninstanceid的修复(FixMinChosenInstanceID)。
- 不清楚你所说的失败是什么失败?是实际遇到的么?有无日志可以贴上来帮忙定位一下问题。
from phxpaxos.
我设置了保存5个instance,运行到了cur_instance比如18,当前保存的instane 为13-18,
那么遇到的问题是重启之后Cleaner无法启动,查看日志,显示需要从版本0开始学习,但是13以前instance已经都被Delete掉了,min_instanceid由于有100个的版本延迟 一直没有存盘过。
所以我修改了GetMinChosenInstanceID 为当前存在最小instance (eg. 13) 现在工作正常了
from phxpaxos.
Cleaner只会删除CheckpointInstanceID之前的Instance,如果删除到了18,那说明你给的CheckpointInstanceID是18。那么下次启动的时候必须同样给予18,否则违反了正确性,具体麻烦参考WIKI里面的状态机讲解。
from phxpaxos.
我并没有使用自己状态机,而只是使用了选举功能 设置了保存版本数为5。我在看一下运行逻辑。
另外 我测试了一下sample的选举,我设置了SetHoldPaxosLogCount(5)一样会导致第三个节点一旦被错过,就无法再次Lean学到正取的状态。
from phxpaxos.
5这个值可能太小了,设置一个100以上的值试试。拉checkpoint是一个涉及到重启程序的繁重操作。一旦这个过程又落后了,就又陷入了拉checkpoint的循环。实际情况都是建议保留更多的log以避免拉checkpoint。
from phxpaxos.
Related Issues (20)
- checkpoint机制是不是与多个group不好同时采用?因为多个group的话,每个group都有自己的镜像数据,新机器加入的话,难道每个group都要从旧机器接收镜像追赶进度,而每个group学完都会退出进程 HOT 2
- 请问batch propose 2KB 15W,压测条件为单条数据2KB再进行一定量的合并吗? HOT 2
- phxpaxos 如何保证latest read HOT 1
- 头文件找不到 HOT 1
- 构建环境可以简化不?
- TLA model?
- 局域网测试sample失败 HOT 1
- 一个log文件(.f文件)里面存放几个instance?
- 用户写请求,提交了上次选主超时的value,导致主的租约为0,出现失主现象
- 提案通过后,为啥leader节点先执行状态机
- 关于编译手册的疑问
- 切片收发问题 HOT 1
- 在云环境中与libfaketime的使用产生冲突问题
- 请问夺主时,BeforePropose起到什么作用?
- 如果发生master切换,如何保证新 master 的数据是最新的? HOT 2
- 当 输入paxos的value过长时会有问题吗? HOT 1
- CheckpointSender 线程回收问题 HOT 1
- checkpoint 接收新的状态机 paxos_log日志,重建index后, 在下次重启前以及checkpoint文件传输前,propose超时定时器超时,写入llstance到paxos_log HOT 2
- Project status
- sample phxkv 依赖问题 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phxpaxos.