fix(kv): Prevent infinite loop condition when listing tasks by org.
In the event that findTaskByIDWithAuth cannot find the task ID contained in the bucket, the outer loop will never terminate. This ensures that we are calling Next() along-side any calls to continue while using a Cursor.pull/16249/head
parent
213cdf58a9
commit
6b544919a3
|
@ -399,6 +399,7 @@ func (s *Service) findTasksByOrg(ctx context.Context, tx Tx, filter influxdb.Tas
|
|||
if err != nil {
|
||||
if err == influxdb.ErrTaskNotFound {
|
||||
// we might have some crufty index's
|
||||
k, v = c.Next()
|
||||
continue
|
||||
}
|
||||
return nil, 0, err
|
||||
|
|
Loading…
Reference in New Issue