Skip to content

Commit f0de3f9

Browse files
committed
Deviations: Improve reporting ruling out additional possible race
1 parent 8c8c956 commit f0de3f9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/datastore/transaction_rpc.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ func (d *Datastore) LoadAllButRunningIntents(ctx context.Context, root *tree.Roo
163163
case intent, ok := <-IntentChan:
164164
if !ok {
165165
// IntentChan closed due to finish
166-
return intentNames, nil
166+
IntentChan = nil
167+
continue
167168
}
168169
if excludeDeviations && intent.Deviation {
169170
continue
@@ -177,6 +178,9 @@ func (d *Datastore) LoadAllButRunningIntents(ctx context.Context, root *tree.Roo
177178
return nil, err
178179
}
179180
}
181+
if ErrChan == nil && IntentChan == nil {
182+
return intentNames, nil
183+
}
180184
}
181185
}
182186

0 commit comments

Comments
 (0)