Skip to content

Commit

Permalink
fixup! feat(router): avoid worker starvation during job pickup
Browse files Browse the repository at this point in the history
  • Loading branch information
atzoum committed Nov 1, 2022
1 parent ae8332a commit 7af8db7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion router/internal/jobiterator/jobiterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func WithLegacyOrderGroupKey(legacy bool) IteratorOptFn {
}

// Iterator is a job iterator with support for fetching more than the original set of jobs requested,
// if case some of these jobs are discarded, according to the configured discarded percentage tolerance.
// in case some of these jobs get discarded, according to the configured discarded percentage tolerance.
type Iterator struct {
params jobsdb.GetQueryParamsT
maxQueries int
Expand Down
1 change: 0 additions & 1 deletion router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -1807,7 +1807,6 @@ func (rt *HandleT) readAndProcess() int {
time.Sleep(readSleep)
return 0
} else {
rt.logger.Debugf("[%v Router] :: router is enabled", rt.destName)
iteratorStats := iterator.Stats()
stats.Default.NewTaggedStat("router_iterator_stats_query_count", stats.GaugeType, stats.Tags{"destType": rt.destName}).Gauge(iteratorStats.QueryCount)
stats.Default.NewTaggedStat("router_iterator_stats_total_jobs", stats.GaugeType, stats.Tags{"destType": rt.destName}).Gauge(iteratorStats.TotalJobs)
Expand Down

0 comments on commit 7af8db7

Please sign in to comment.