Skip to content

Commit 9a483c9

Browse files
Enumeration jobs should not consume concurrency slots (#3952)
1 parent 59c6f2d commit 9a483c9

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

pkg/sources/source_manager.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,8 @@ func (s *SourceManager) Enumerate(ctx context.Context, sourceName string, source
181181
}
182182

183183
// Create a JobProgress object for tracking progress.
184-
sem := s.sem
185184
ctx, cancel := context.WithCancelCause(ctx)
186185
progress := NewJobProgress(jobID, sourceID, sourceName, WithHooks(s.hooks...), WithCancel(cancel))
187-
if err := sem.Acquire(ctx, 1); err != nil {
188-
// Context cancelled.
189-
progress.ReportError(Fatal{err})
190-
return progress.Ref(), Fatal{err}
191-
}
192186

193187
// Wrap the passed in reporter so we update the progress information.
194188
reporter = baseUnitReporter{
@@ -200,7 +194,6 @@ func (s *SourceManager) Enumerate(ctx context.Context, sourceName string, source
200194
go func() {
201195
// Call Finish after the semaphore has been released.
202196
defer progress.Finish()
203-
defer sem.Release(1)
204197
defer s.wg.Done()
205198
ctx := context.WithValues(ctx,
206199
"source_manager_worker_id", common.RandomID(5),

0 commit comments

Comments
 (0)