-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
问题描述:
在基于raft 同步的rocksdb存储中,由于compaction调度时机不一致,导致leader/follower间数据不一致,但人们使用raft一致性算法普遍认为各个副本间数据是一致的,这与我们的直觉相悖。
下图展示了这种不一致发生的时机:

1.leader接受客户端写入x+=10,并将ttl续到20,leader很正常地完成了工作,此时x=11
2.在follower上,由于网络延迟,重启回放,commit->apply的时延,导致x在compaction时因TTL expired删掉了
3.而后apply oplog时,follower中x=10,leader/follower永久不一致了。
在基于主备binlog同步的机制中,也有类似问题,在kvrocks中:

解决方案:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
