Skip to content

Commit d60d4be

Browse files
Copilotbootjp
andauthored
fix: pin readTS in resolveAuth and clarify S3_CREDENTIALS_FILE help text
Agent-Logs-Url: https://github.com/bootjp/elastickv/sessions/e9348f84-723b-4073-aea0-e3e35d47f3d4 Co-authored-by: bootjp <1306365+bootjp@users.noreply.github.com>
1 parent 28940da commit d60d4be

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

adapter/s3.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,11 @@ func (s *S3Server) resolveAuth(r *http.Request, bucket string) *s3AuthError {
372372
}
373373
// Check if the bucket is public-read and the request is read-only.
374374
if isReadOnlyS3Request(r) {
375-
meta, _, err := s.loadBucketMetaAt(r.Context(), bucket, s.readTS())
375+
readTS := s.readTS()
376+
readPin := s.pinReadTS(readTS)
377+
defer readPin.Release()
378+
379+
meta, _, err := s.loadBucketMetaAt(r.Context(), bucket, readTS)
376380
if err == nil && isPublicReadBucket(meta) {
377381
return nil
378382
}

scripts/rolling-update.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ Optional environment:
3535
S3_PORT
3636
S3_REGION
3737
S3_CREDENTIALS_FILE
38+
Path to an S3 credentials file on each target host. This file must already
39+
exist and be readable on every remote node; it will be bind-mounted into
40+
the container at the same path.
3841
S3_PATH_STYLE_ONLY
3942
HEALTH_TIMEOUT_SECONDS
4043
LEADERSHIP_TRANSFER_TIMEOUT_SECONDS

0 commit comments

Comments
 (0)