fix(parser): dedup IDL events by timestamp to stop dropping recurring alarms
ParseIDLLog deduped by eventID|eventType|description, which is identical across every occurrence of a recurring alarm (e.g. the flapping PCIe presence check on Inspur HGX boards). That collapsed every later occurrence into the first one, so applyGPUStatusFromEvents computed GPU health from a stale, truncated event list and marked failed GPUs as OK.
This commit is contained in:
+6
-2
@@ -47,8 +47,12 @@ func ParseIDLLog(content []byte) []models.Event {
|
|||||||
// Clean up description
|
// Clean up description
|
||||||
description = cleanDescription(description)
|
description = cleanDescription(description)
|
||||||
|
|
||||||
// Create unique key for deduplication
|
// Create unique key for deduplication. Must include the timestamp:
|
||||||
eventKey := eventID + "|" + eventType + "|" + description
|
// recurring alarms (e.g. flapping PCIe presence checks) reuse the same
|
||||||
|
// eventID/eventType/description on every occurrence, so deduping without
|
||||||
|
// the timestamp collapses all later occurrences into the first one and
|
||||||
|
// silently drops the most recent (and most relevant) event.
|
||||||
|
eventKey := timestamp + "|" + eventID + "|" + eventType + "|" + description
|
||||||
if seenEvents[eventKey] {
|
if seenEvents[eventKey] {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user