mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-13 17:48:29 +02:00
s3: read bucket owner and crtime from the entry-free bucket config
The owner index read the raw filer entry off BucketConfig, which no longer carries one. Cache Crtime alongside IdentityId, and pass the owner id rather than the entry through the ListBuckets visibility checks so the scan and granted-bucket paths share one implementation.
This commit is contained in:
1 parent
17af32f3ff
commit
98e49d2d42
3 files changed
+19
-28
No files matched your search
@@ -38,6 +38,7 @@ type BucketConfig struct {
|
||||
ACL []byte
|
||||
Owner string
|
||||
IdentityId string // identity that created the bucket
|
||||
Crtime int64 // bucket creation time, unix seconds
|
||||
IsPublicRead bool // Cached flag to avoid JSON parsing on every request
|
||||
CORS *cors.CORSConfiguration
|
||||
ObjectLockConfig *ObjectLockConfiguration // Cached parsed Object Lock configuration
|
||||
@@ -404,6 +405,10 @@ func (s3a *S3ApiServer) newBucketConfigFromEntry(bucket string, entry *filer_pb.
|
||||
return config
|
||||
}
|
||||
|
||||
if entry.Attributes != nil {
|
||||
config.Crtime = entry.Attributes.Crtime
|
||||
}
|
||||
|
||||
if entry.Extended != nil {
|
||||
if versioning, exists := entry.Extended[s3_constants.ExtVersioningKey]; exists {
|
||||
config.Versioning = string(versioning)
|
||||
|
||||
Reference in new issue
Block a user