add forwardOnRepair

If not forwarding on receive, nodes can forward when a whole line
is available.

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2024-03-01 15:30:38 +01:00
parent 2ff4bf4825
commit 71394768cc
No known key found for this signature in database
GPG Key ID: 0FE274EE8C95166E
1 changed files with 3 additions and 2 deletions

View File

@ -112,6 +112,7 @@ class Validator:
self.segmentShuffleScheduler = True # send each segment that's worth sending once in shuffled order, then repeat
self.segmentShuffleSchedulerPersist = True # Persist scheduler state between timesteps
self.forwardOnReceive = True # forward segments as soon as received
self.forwardOnRepair = False # forward all segments when full line available (repaired segments are always forwarded)
def logIDs(self):
"""It logs the assigned rows and columns."""
@ -496,7 +497,7 @@ class Validator:
# If operation is based on send queues, segments should
# be queued after successful repair.
for i in range(len(rep)):
if rep[i]:
if rep[i] or self.forwardOnRepair:
self.logger.trace("Rep: %d,%d", id, i, extra=self.format)
self.addToSendQueue(id, i)
# self.statsRepairInSlot += rep.count(1)
@ -514,7 +515,7 @@ class Validator:
# If operation is based on send queues, segments should
# be queued after successful repair.
for i in range(len(rep)):
if rep[i]:
if rep[i] or self.forwardOnRepair:
self.logger.trace("Rep: %d,%d", i, id, extra=self.format)
self.addToSendQueue(i, id)
# self.statsRepairInSlot += rep.count(1)