reset rreq time every time we reuse a rreq #618
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
applier_create_req
function will insert rreq tom_repl_key_req_map
at the first time, then it try to allocate local blks, and if failed to allocate blks, the rreq will not be removed until gc. And if we retry to create req again, the rreq will be reused without update for the timer, which may hit the following issue:T1: failed to alloc blk for data while receiving it from data channel
T2: recevied log from raft channel and reuse rreq
T3: gc, the corresponding rreq is removed (raft channel is lower than data channel since there are lots of create/seal shard req)
T4: append process cannot find rreq at
localize_journal_entry_finish
and try to prepare rreq again, so the rreq is new but the entry is old, leading mismatch.So we reset timer for rreq every time we reuse it.