You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: replace has_payload with inflight_id presence check
Simplify replication progress tracking by removing the redundant
`has_payload` boolean. The presence of `inflight_id` (Some vs None)
now indicates whether a response requires inflight state update.
`InflightId` identifies whether an AppendEntries RPC carries actual log
data that needs acknowledgment. Not all RPCs have a corresponding
inflight record on the leader. For example, when synchronizing the
committed index, the leader sends an AppendEntries RPC without log
payload - such RPCs have no `InflightId`. However, RPCs that replicate
actual log entries have a corresponding inflight record on the leader,
and these RPCs carry an `InflightId`. This distinction determines
whether a response should update the inflight state.
Changes:
- Remove `has_payload` field from `Notification::ReplicationProgress`
- Change `Inflight::ack()` and `Inflight::conflict()` to require matching `InflightId`
- Restructure `Data::Logs` to include `inflight_id` field
- Move `inflight_id` tracking into `ReplicationCore`
- Update `update_conflicting()` and `update_progress()` signatures
0 commit comments