|
|
@ -613,7 +613,7 @@ func (s3a *S3ApiServer) PutBucketLifecycleConfigurationHandler(w http.ResponseWr |
|
|
if rule.Expiration.Days == 0 { |
|
|
if rule.Expiration.Days == 0 { |
|
|
continue |
|
|
continue |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
locationPrefix := fmt.Sprintf("%s/%s/%s", s3a.option.BucketsPath, bucket, rulePrefix) |
|
|
locConf := &filer_pb.FilerConf_PathConf{ |
|
|
locConf := &filer_pb.FilerConf_PathConf{ |
|
|
LocationPrefix: fmt.Sprintf("%s/%s/%s", s3a.option.BucketsPath, bucket, rulePrefix), |
|
|
LocationPrefix: fmt.Sprintf("%s/%s/%s", s3a.option.BucketsPath, bucket, rulePrefix), |
|
|
Collection: collectionName, |
|
|
Collection: collectionName, |
|
|
@ -627,9 +627,8 @@ func (s3a *S3ApiServer) PutBucketLifecycleConfigurationHandler(w http.ResponseWr |
|
|
s3err.WriteErrorResponse(w, r, s3err.ErrInternalError) |
|
|
s3err.WriteErrorResponse(w, r, s3err.ErrInternalError) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
parentDirectoryPath := fmt.Sprintf("%s/%s", s3a.option.BucketsPath, bucket) |
|
|
|
|
|
ttlSec := int32((time.Duration(rule.Expiration.Days) * 24 * time.Hour).Seconds()) |
|
|
ttlSec := int32((time.Duration(rule.Expiration.Days) * 24 * time.Hour).Seconds()) |
|
|
if updErr := s3a.updateEntriesTTL(parentDirectoryPath, ttlSec); updErr != nil { |
|
|
|
|
|
|
|
|
if updErr := s3a.updateEntriesTTL(locationPrefix, ttlSec); updErr != nil { |
|
|
glog.Errorf("PutBucketLifecycleConfigurationHandler update: %s", err) |
|
|
glog.Errorf("PutBucketLifecycleConfigurationHandler update: %s", err) |
|
|
} |
|
|
} |
|
|
changed = true |
|
|
changed = true |
|
|
|