this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

dont count record stream failures as success

authored by

whyrusleeping and committed by
whyrusleeping
5af80c81 27a83b7d

+7 -3
+7 -3
backfill/backfill.go
··· 417 417 } 418 418 } 419 419 420 - defer r.Close() 421 - 422 420 numRecords := 0 423 421 numRoutines := b.ParallelRecordCreates 424 422 recordQueue := make(chan recordQueueItem, numRoutines) ··· 431 429 } 432 430 433 431 // Producer routine 432 + var streamRecordsError error 434 433 go func() { 434 + defer r.Close() 435 435 defer close(recordQueue) 436 436 err := repo.StreamRepoRecords(ctx, r, b.NSIDFilter, setRev, func(recordPath string, nodeCid cid.Cid, data []byte) error { 437 437 numRecords++ ··· 439 439 return nil 440 440 }) 441 441 if err != nil { 442 - log.Error("failed to iterate records in repo", "err", err) 442 + streamRecordsError = fmt.Errorf("failed to iterate records in repo: %w", err) 443 443 } 444 444 }() 445 445 ··· 480 480 wg.Wait() 481 481 close(recordResults) 482 482 resultWG.Wait() 483 + 484 + if streamRecordsError != nil { 485 + return "failed to stream records", streamRecordsError 486 + } 483 487 484 488 if err := job.SetRev(ctx, rev); err != nil { 485 489 log.Error("failed to update rev after backfilling repo", "err", err)