diff --git a/contrib/ondiskagg/aggtrigger/aggtrigger.go b/contrib/ondiskagg/aggtrigger/aggtrigger.go index fb435258c..dc121bdbe 100644 --- a/contrib/ondiskagg/aggtrigger/aggtrigger.go +++ b/contrib/ondiskagg/aggtrigger/aggtrigger.go @@ -145,14 +145,17 @@ func (s *OnDiskAggTrigger) Fire(keyPath string, records []trigger.Record) { Query: csm, err := s.query(tbk, window, head, tail) - if err != nil { + if err != nil || csm == nil { glog.Errorf("query error for %v (%v)", tbk.String(), err) return } cs := (*csm)[*tbk] - s.write(tbk, cs, tail, head, elements) + if cs != nil { + s.write(tbk, cs, tail, head, elements) + } + return }