prevote/vote中获取last_log_id()时,为什么需要去触发一下log flush呢,有什么考虑吗?是不是没有必要去做flush呢?
- Dominant language
- C++
- Stars
- 4.2k
- Forks
- 923
- PR merge metrics
- No merged PRs in 30d
Description
[node.cpp:1634](https://github.com/baidu/braft/blob/59c40e5d6b487121af5a1826a654138f489d7155/src/braft/node.cpp#L1634C5-L1634C63)
```
const LogId last_log_id = _log_manager->last_log_id(true);
```
_log_manager->last_log_id(true)传true的话会触发log flush
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at node.cpp:1634 and trace LogManager::last_log_id(true) to understand why the flush is triggered during prevote/vote. Check the surrounding Raft durability assumptions and identify whether the intended outcome is to retain, remove, or document the flush; completion requires a maintainer decision because the issue does not define a concrete change or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- distributed-systems
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100