簡體   English   中英

這種場景下raft是怎么處理log的?

[英]How does raft deal with log in this scenario?

在此處輸入圖片說明

假設上圖中d被選為leader,它會如何處理索引為11和12的日志。我認為應該刪除這兩個日志,但我在草稿紙中沒有找到任何關於如何處理的線索像上面的場景一樣處理日志。

If (d) is elected leader, then it will replicate its log to the followers, it won't remove the items at index 11 & 12. See section 5.3 on log replication in the raft paper where it says

在 Raft 中,領導者通過強制追隨者的日志復制自己的日志來處理不一致。 這意味着追隨者日志中的沖突條目將被領導者日志中的條目覆蓋。

領導選舉的規則確保這是一個安全的決定。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM