Skip to content

Commit

Permalink
Cancel batch sending if there's nothing to send
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Aug 26, 2023
1 parent 5767138 commit f2927db
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions backfill.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,14 @@ func (portal *Portal) backfillSendBatch(ctx context.Context, converted []*Conver
dbMessages = append(dbMessages, dbm)
}
}
if len(dbMessages) == 0 {
log.Warn().
Int("converted_count", len(converted)).
Int("event_count", len(events)).
Int("db_count", len(dbMessages)).
Msg("Didn't get any parts to send from converted messages")
return
}
forward := true
log.Debug().
Int("event_count", len(events)).
Expand Down

0 comments on commit f2927db

Please sign in to comment.