Skip to content

Commit

Permalink
Don't abort the integrate on 429 for checkpoint (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCutter authored Jul 17, 2024
1 parent 64a40c2 commit 6b425d4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion storage/gcp/gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,15 @@ func (s *Storage) integrate(ctx context.Context, fromSeq uint64, entries []tesse
return fmt.Errorf("newCP: %v", err)
}
if err := s.objStore.setObject(ctx, layout.CheckpointPath, cpRaw, nil); err != nil {
return fmt.Errorf("writeCheckpoint: %v", err)
switch ee := err.(type) {
case *googleapi.Error:
if ee.Code == http.StatusTooManyRequests {
// TODO(al): still need to ensure it does get updated, either by the next integrate or some other mechanism.
klog.Infof("checkpoint write rejected: %v, continuing anyway", err)
}
default:
return fmt.Errorf("writeCheckpoint: %v", err)
}
}
}
return nil
Expand Down

0 comments on commit 6b425d4

Please sign in to comment.