Skip to content

Conversation

@ehds
Copy link
Contributor

@ehds ehds commented Apr 7, 2024

issue: #421


[ RUN      ] NodeTestWithPipelineReplication/NodeTest.change_peers_chaos_with_snapshot/0
F20240403 18:24:26.618824 18633 log_manager.cpp:321] Can't truncate logs before _applied_id=692, last_log_kept=0

当且仅当具有最小日志 index 的 send entries 的请求不匹配时,才去缩小 _next_index.
当 pipeline 开启,但是 cache 未开启时,具有较大日志的请求如果先被处理,response->success = false, 导致 _next_index 被缩小,如果此时 follower 节点加载了快照,那么 _next_index 有可能会小于快照的 last_log_index, 从而导致后续的复制都失败。

这里限制只有当最小的复制请求的日志不匹配时才有资格缩减 _next_index.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant