Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

analyer/aggregate_stats: fix errors check #822

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading