Cap repair requests timeout (#958)
This commit is contained in:
@ -108,6 +108,14 @@ fn repair_window(
|
|||||||
}
|
}
|
||||||
*last = consumed;
|
*last = consumed;
|
||||||
*times += 1;
|
*times += 1;
|
||||||
|
|
||||||
|
// Experiment with capping repair request duration.
|
||||||
|
// Once nodes are too far behind they can spend many
|
||||||
|
// seconds without asking for repair
|
||||||
|
if *times > 128 {
|
||||||
|
*times = 65;
|
||||||
|
}
|
||||||
|
|
||||||
//if times flips from all 1s 7 -> 8, 15 -> 16, we retry otherwise return Ok
|
//if times flips from all 1s 7 -> 8, 15 -> 16, we retry otherwise return Ok
|
||||||
if *times & (*times - 1) != 0 {
|
if *times & (*times - 1) != 0 {
|
||||||
trace!("repair_window counter {} {} {}", *times, consumed, received);
|
trace!("repair_window counter {} {} {}", *times, consumed, received);
|
||||||
|
Reference in New Issue
Block a user