Open jixuan1989 opened 3 years ago
Thanks for point out the issue, I agree with solution 2, but I think the issue happens because we do not have one rollback mechanism, if some error happens during the commitTo
, we rollback all the previous operations to make the committedEntries
、unCommittedEntries
、stableEntries
consist with each other, the issue would be resoleved?
Thanks for point out the issue, I agree with solution 2, but I think the issue happens because we do not have one rollback mechanism, if some error happens during the
commitTo
, we rollback all the previous operations to make thecommittedEntries
、unCommittedEntries
、stableEntries
consist with each other, the issue would be resoleved?
Yes, if we can rollback the operation, then the issue is resolved. In etcd, Raft only takes charge of maintain the consistency between raft logs, the apply or log persistence logic is left for Raft client. The raft client need to consider how to handle these state machine errors when apply or persist log.
Discussed in https://github.com/apache/iotdb/discussions/3833