Skip to content

Commit

Permalink
analyer/aggregate_stats: fix errors check
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrus committed Dec 9, 2024
1 parent ca4ef6d commit 19702fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Empty file added .changelog/822.trivial.md
Empty file.
6 changes: 3 additions & 3 deletions analyzer/aggregate_stats/aggregate_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,14 @@ func (a *aggregateStatsAnalyzer) aggregateStatsWorker(ctx context.Context) {
switch {
case err == nil:
// Continues below.
case errors.Is(pgx.ErrNoRows, err):
case errors.Is(err, pgx.ErrNoRows):
// No stats yet. Start at the earliest indexed block.
var earliestBlockTs *time.Time
earliestBlockTs, err = a.earliestBlockTs(statCtx, statsComputation.layer)
switch {
case err == nil:
latestComputed = floorWindow(earliestBlockTs)
case errors.Is(pgx.ErrNoRows, err):
case errors.Is(err, pgx.ErrNoRows):
// No data log a debug only log.
logger.Debug("no stats available yet, skipping iteration")
cancel()
Expand All @@ -234,7 +234,7 @@ func (a *aggregateStatsAnalyzer) aggregateStatsWorker(ctx context.Context) {
switch {
case err == nil:
// Continues below.
case errors.Is(pgx.ErrNoRows, err):
case errors.Is(err, pgx.ErrNoRows):
logger.Debug("no stats available yet, skipping iteration")
cancel()
continue
Expand Down

0 comments on commit 19702fa

Please sign in to comment.