fix(correlation): Keep-Alive time window + orphan timer + TTL purge (v1.1.14)
Bug #1 - processSourceA: utilise bEventHasValidTTL en mode one_to_many au lieu de eventsMatch qui comparait les timestamps originaux. Apres ~10s les requetes A devenaient toutes orphelines alors que la session KA etait active. Bug #4 - checkPendingOrphansForCorrelation: meme correction, cle identique = meme connexion en one_to_many, pas besoin de comparer les timestamps. Bug #3 - cleanNetworkBufferByTTL: expiration B => emission immediate des pending orphans associes (ils ne peuvent plus jamais corréler). Bug #2 - Orchestrateur: goroutine ticker 250ms appelle EmitPendingOrphans() pour drainer les orphans independamment du flux d'evenements entrants. EmitPendingOrphans() expose la methode comme publique thread-safe. Tests: 4 nouveaux tests de non-regression (un par bug). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@ -47,6 +47,11 @@ type CorrelationProcessor interface {
|
||||
// Flush forces emission of remaining buffered events.
|
||||
Flush() []domain.CorrelatedLog
|
||||
|
||||
// EmitPendingOrphans emits orphan A events whose delay has expired.
|
||||
// Called periodically by the Orchestrator ticker so orphans are not blocked
|
||||
// waiting for the next incoming event.
|
||||
EmitPendingOrphans() []domain.CorrelatedLog
|
||||
|
||||
// GetBufferSizes returns the current buffer sizes for monitoring.
|
||||
GetBufferSizes() (int, int)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user