Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4-16 周计划 #281

Closed
dingxiaoshuai123 opened this issue Apr 16, 2024 · 1 comment
Closed

4-16 周计划 #281

dingxiaoshuai123 opened this issue Apr 16, 2024 · 1 comment
Labels
✏️ Feature New feature or request

Comments

@dingxiaoshuai123
Copy link
Collaborator

dingxiaoshuai123 commented Apr 16, 2024

待解决问题 :
1, 一个 Rocksdb 有多个 CF, 每一个 CF 会维护两个变量: Flushed Log Index 和 Applied Log Index. 日志的截断点为当前所有 CF 的 min Flushed Log Index. 当一个 CF 的 Flushed Log Index 一直没有更新, 会导致日志截断点也无法更新.
(有更好方法或者有问题请直接指出.)
a, 设置步长为 1, 通过对比 Flushed Log Index 和 Applied Log Index 可以判断出该 CF 是否有数据.
b, 步长不为 1, 在 Flush completed 时 和 更新 Applied Log Index 时保存精确的 SequenceNumber 判断该 CF 是否有数据.
每次寻找最小 Flushed Log Index 时, 对于有数据的 CF , 找出其中最小的 Flushed Log Index. 对于没有数据的 CF , 更新其 Flushed Log Index 和 Applied Log Index 为找出的最小的 Flushed Log Index.

2,所有 DB 使用同一个 raft 集群, 如何找到回放点
对于多 CF 的情况, 是对所有 CF 回放点进行聚合, 多 RocksDB 的情况也是对多个Rocksdb 回放点进行聚合. 多 DB 暂时可采用相同方法.

3,当 CF 很旧的情况下,保存的 Applied Log Index 明显很小。在互相重启时就会把 Min Applied Log Index 拉得很低,这个值可能就是错的。

@dingxiaoshuai123 dingxiaoshuai123 added the ✏️ Feature New feature or request label Apr 16, 2024
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: 4-16 Weekly Plan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✏️ Feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants