feat: add time travel experiment #131
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Icesource [email protected]
Describe what this PR does / why we need it
新增Time Travel故障类型,可修改系统时间
时钟偏移可以让节点看到的系统时间出现偏移,验证分布式系统下依赖于时间同步的逻辑是否会由于单点时间异常而出现异常
例如验证Mysql主从复制下,会不会由于从节点时间错误导致数据不一致
或者分布式数据库的时钟一致性能否在节点系统时间异常的情况下正常工作
Describe how you did it
执行date命令修改系统时间,销毁则通过hwclock将硬件时钟同步到系统时间
TODO:date指令仅能粗粒度修改系统时间,之后需要探索实现容器进程维度修改时间的方法
Describe how to verify it
time travel 至 10m30s之后