Skip to content

Commit bfa2b6c

Browse files
committed
Fix runner
1 parent c174aba commit bfa2b6c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

pkg/runner/chunk_runner.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,14 @@ func (r *ChunkRunner) unmarkRecord(name string) {
147147
delete(r.record, name)
148148
}
149149

150+
func (r *ChunkRunner) clearRecord() {
151+
r.recordMut.Lock()
152+
defer r.recordMut.Unlock()
153+
if len(r.record) != 0 {
154+
r.record = map[string]struct{}{}
155+
}
156+
}
157+
150158
func (r *ChunkRunner) enqueueChunk() {
151159
select {
152160
case r.signal <- struct{}{}:
@@ -950,6 +958,7 @@ func (r *ChunkRunner) handlePending(ctx context.Context, chunks []*v1alpha1.Chun
950958
}
951959

952960
if size == 0 {
961+
r.clearRecord()
953962
return ErrNoPendingChunk
954963
}
955964

0 commit comments

Comments
 (0)