Skip to content

Commit

Permalink
Merge pull request #81 from alpacahq/fix/aggtrigger-nil-check
Browse files Browse the repository at this point in the history
after-hours aggtrigger nil checks
  • Loading branch information
rocketbitz authored Jun 19, 2018
2 parents 3be1354 + 203dba5 commit eb953e2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions contrib/ondiskagg/aggtrigger/aggtrigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit eb953e2

Please sign in to comment.