perf(go): skip empty realtime payload snapshots

This commit is contained in:
lingniu
2026-07-03 08:35:14 +08:00
parent 97362e3205
commit c1640b4332
2 changed files with 20 additions and 1 deletions

View File

@@ -321,7 +321,7 @@ func hasRealtimePayload(env envelope.FrameEnvelope) bool {
if len(env.Fields) > 0 {
return true
}
if _, ok := env.Parsed["data_units"]; ok {
if units, ok := env.Parsed["data_units"].([]any); ok && len(units) > 0 {
return true
}
return false