mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-05-28 12:41:15 +00:00
refactor(s3api): drop redundant prefix normalization on read path
encodeBucketLifecycleTTLRules already normalizes rule.Prefix before it hits the filer; matchBucketLifecycleTTLSeconds is on the per-object hot path and shouldn't re-normalize.
This commit is contained in:
@@ -72,7 +72,8 @@ func matchBucketLifecycleTTLSeconds(rules []bucketLifecycleTTLRule, objectKey st
|
||||
var bestPrefix string
|
||||
var ttlSeconds int32
|
||||
for _, rule := range rules {
|
||||
prefix := normalizeLifecycleRulePrefix(rule.Prefix)
|
||||
// rule.Prefix is already normalized at encode time.
|
||||
prefix := rule.Prefix
|
||||
if prefix != "" && !strings.HasPrefix(objectKey, prefix) {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user