aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchalet <chalet3@yeah.net>2025-06-26 18:21:35 +0800
committerGitHub <noreply@github.com>2025-06-26 03:21:35 -0700
commit877b9b788a49b912958e9e37c7ff8c0ab09bc5c5 (patch)
tree11ac4fb8710d58d7e67eb083d1ae2b9ac4ccb349
parentab49540d2ba0f8c38324247360edd08bb9355b9b (diff)
downloadseaweedfs-877b9b788a49b912958e9e37c7ff8c0ab09bc5c5.tar.xz
seaweedfs-877b9b788a49b912958e9e37c7ff8c0ab09bc5c5.zip
update s3 session cache key (#6923)
-rw-r--r--weed/storage/backend/s3_backend/s3_sessions.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/storage/backend/s3_backend/s3_sessions.go b/weed/storage/backend/s3_backend/s3_sessions.go
index ca3fc62fc..dfb0aa564 100644
--- a/weed/storage/backend/s3_backend/s3_sessions.go
+++ b/weed/storage/backend/s3_backend/s3_sessions.go
@@ -31,7 +31,8 @@ func createSession(awsAccessKeyId, awsSecretAccessKey, region, endpoint string,
sessionsLock.Lock()
defer sessionsLock.Unlock()
- if t, found := s3Sessions[region]; found {
+ cacheKey := fmt.Sprintf("%s|%s", region, endpoint)
+ if t, found := s3Sessions[cacheKey]; found {
return t, nil
}