fix handling of expired groups in ReassemblyState
This commit is contained in:
Родитель
08f823c711
Коммит
e87a3bdd2d
|
@ -64,7 +64,13 @@ namespace DurableTask.Netherite
|
|||
|
||||
if (evt.IsLast)
|
||||
{
|
||||
evt.ReassembledEvent = FragmentationAndReassembly.Reassemble<PartitionEvent>(this.Fragments[group], evt, effects.Partition);
|
||||
if (!this.Fragments.TryGetValue(group, out var list))
|
||||
{
|
||||
effects.EventTraceHelper.TraceEventProcessingDetail($"Discarded fragment ${evt.Fragment} for expired group {group}");
|
||||
return;
|
||||
}
|
||||
|
||||
evt.ReassembledEvent = FragmentationAndReassembly.Reassemble<PartitionEvent>(list, evt, effects.Partition);
|
||||
|
||||
effects.EventDetailTracer?.TraceEventProcessingDetail($"Reassembled {evt.ReassembledEvent}");
|
||||
|
||||
|
@ -102,7 +108,11 @@ namespace DurableTask.Netherite
|
|||
}
|
||||
else
|
||||
{
|
||||
list = this.Fragments[group];
|
||||
if (!this.Fragments.TryGetValue(group, out list))
|
||||
{
|
||||
effects.EventTraceHelper.TraceEventProcessingDetail($"Discarded fragment ${evt.Fragment} for expired group {group}");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
list.Add(evt);
|
||||
|
|
Загрузка…
Ссылка в новой задаче