File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,7 @@ func (s *S3Bucket) Query(q dsq.Query) (dsq.Results, error) {
233233
234234 index := q .Offset
235235 nextValue := func () (dsq.Result , bool ) {
236+ tryAgain:
236237 if q .Limit > 0 && sent >= q .Limit {
237238 return dsq.Result {}, false
238239 }
@@ -262,8 +263,18 @@ func (s *S3Bucket) Query(q dsq.Query) (dsq.Results, error) {
262263 }
263264 if ! q .KeysOnly {
264265 value , err := s .Get (ds .NewKey (entry .Key ))
265- if err != nil {
266- return dsq.Result {Error : err }, false
266+ switch err {
267+ case nil :
268+ case ds .ErrNotFound :
269+ // This just means the value got deleted in the
270+ // mean-time. That's not an error.
271+ //
272+ // We could use a loop instead of a goto, but
273+ // this is one of those rare cases where a goto
274+ // is easier to understand.
275+ goto tryAgain
276+ default :
277+ return dsq.Result {Entry : entry , Error : err }, false
267278 }
268279 entry .Value = value
269280 }
You can’t perform that action at this time.
0 commit comments