Avoid retry if object is missing

This commit is contained in:
Neeraj Gupta 2024-05-16 12:57:31 +05:30
parent 3f1ee82ec5
commit b53a70cf65

View file

@ -350,6 +350,7 @@ func (c *Controller) getEmbeddingObject(ctx context.Context, objectKey string, d
if s3Err.Code() == s3.ErrCodeNoSuchKey {
if c.derivedStorageDataCenter == c.S3Config.GetHotDataCenter() {
ctxLogger.Error("Object not found: ", s3Err)
return ente.EmbeddingObject{}, stacktrace.Propagate(errors.New("object not found"), "")
} else {
// If derived and hot bucket are different, try to copy from hot bucket
copyEmbeddingObject, err := c.copyEmbeddingObject(ctx, objectKey)