mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-27 22:57:04 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de34a1a87c | ||
|
|
c01fe1493d | ||
|
|
d1f503181b | ||
|
|
a5e8254ffd | ||
|
|
ab79d1f680 | ||
|
|
e8020910db | ||
|
|
c2b47967bd | ||
|
|
f09bc14165 | ||
|
|
69aa6d7adc | ||
|
|
5269d93fa8 | ||
|
|
7063b3e14c | ||
|
|
44e546a933 | ||
|
|
7d6c83b126 | ||
|
|
03388c4beb | ||
|
|
aceab0802e | ||
|
|
4b12af036c |
No files matched your search
@@ -38,7 +38,22 @@ jobs:
|
||||
working-directory: test/s3/versioning
|
||||
run: |
|
||||
set -x
|
||||
make test-with-server TEST_PATTERN="TestVersioningCompleteMultipartUploadIsIdempotent|TestVersioningSelfCopyMetadataReplaceCreatesNewVersion|TestVersioningSelfCopyMetadataReplaceSuspendedKeepsNullVersion|TestSuspendedDeleteCreatesDeleteMarker"
|
||||
# Run every versioning test, so a regression test lands covered instead
|
||||
# of waiting for someone to remember this file. Name a test in EXCLUDE,
|
||||
# with the reason, to keep it out.
|
||||
#
|
||||
# TestVersioningPagination*: opt-in stress tests that build 1500+
|
||||
# versions. They self-skip without ENABLE_STRESS_TESTS and have their
|
||||
# own make target, so this gate should not carry them.
|
||||
EXCLUDE='TestVersioningPagination.*'
|
||||
tests=$(go test . -list '.*' | grep '^Test' | sort -u)
|
||||
# An empty list would make -run match nothing and pass this job vacuously.
|
||||
[ -n "$tests" ] || { echo "listed no versioning tests"; exit 1; }
|
||||
selected=$(echo "$tests" | grep -vE "^($EXCLUDE)$")
|
||||
[ -n "$selected" ] || { echo "EXCLUDE matched every test"; exit 1; }
|
||||
echo "running $(echo "$selected" | wc -l) of $(echo "$tests" | wc -l) versioning tests"
|
||||
# make swallows a lone trailing $, taking the anchor with it, so escape it.
|
||||
make test-with-server TEST_PATTERN="^($(echo "$selected" | paste -sd'|' -))"'$$'
|
||||
|
||||
- name: Show server logs on failure
|
||||
if: failure()
|
||||
|
||||
@@ -694,10 +694,12 @@ jobs:
|
||||
export WEED_DATA_DIR="/tmp/seaweedfs-copy-test-$(date +%s)"
|
||||
mkdir -p "$WEED_DATA_DIR"
|
||||
set -x
|
||||
# Each test bucket is its own collection and grows 7 volumes; the suite runs
|
||||
# faster than the heartbeat that returns slots from the deleted collections.
|
||||
weed -v 0 server -filer -filer.maxMB=64 -s3 -ip.bind 0.0.0.0 \
|
||||
-dir="$WEED_DATA_DIR" \
|
||||
-master.raftHashicorp -master.electionTimeout 1s -master.volumeSizeLimitMB=100 \
|
||||
-volume.max=100 -volume.preStopSeconds=1 \
|
||||
-volume.max=300 -volume.preStopSeconds=1 \
|
||||
-master.port=9336 -volume.port=8083 -filer.port=8891 -s3.port=8003 -metricsPort=9327 \
|
||||
-s3.allowDeleteBucketNotEmpty=true -s3.config="$GITHUB_WORKSPACE/docker/compose/s3.json" -master.peers=none &
|
||||
pid=$!
|
||||
|
||||
@@ -49,8 +49,8 @@ require (
|
||||
github.com/klauspost/reedsolomon v1.14.1
|
||||
github.com/kurin/blazer v0.5.3
|
||||
github.com/linxGnu/grocksdb v1.10.8
|
||||
github.com/mailru/easyjson v0.9.1 // indirect
|
||||
github.com/mattn/go-isatty v0.0.22 // indirect
|
||||
github.com/mailru/easyjson v0.9.2 // indirect
|
||||
github.com/mattn/go-isatty v0.0.23 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/olivere/elastic/v7 v7.0.32
|
||||
@@ -92,17 +92,17 @@ require (
|
||||
gocloud.dev/pubsub/natspubsub v0.46.0
|
||||
gocloud.dev/pubsub/rabbitpubsub v0.46.0
|
||||
golang.org/x/crypto v0.54.0
|
||||
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f
|
||||
golang.org/x/image v0.43.0
|
||||
golang.org/x/exp v0.0.0-20260709172345-9ea1abe57597
|
||||
golang.org/x/image v0.44.0
|
||||
golang.org/x/net v0.57.0
|
||||
golang.org/x/oauth2 v0.36.0
|
||||
golang.org/x/sys v0.47.0
|
||||
golang.org/x/text v0.40.0 // indirect
|
||||
golang.org/x/tools v0.47.0 // indirect
|
||||
golang.org/x/tools v0.48.0 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
|
||||
google.golang.org/api v0.289.0
|
||||
google.golang.org/genproto v0.0.0-20260519071638-aa98bba5eb94 // indirect
|
||||
google.golang.org/grpc v1.82.1
|
||||
google.golang.org/grpc v1.84.0-dev.0.20260723093437-b6eac429d7b6
|
||||
google.golang.org/protobuf v1.36.11
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
modernc.org/b v1.0.0 // indirect
|
||||
@@ -126,7 +126,7 @@ require (
|
||||
github.com/aws/aws-sdk-go-v2 v1.43.2
|
||||
github.com/aws/aws-sdk-go-v2/config v1.32.33
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.19.32
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.102.2
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.105.2
|
||||
github.com/cognusion/imaging v1.0.4
|
||||
github.com/fluent/fluent-logger-golang v1.10.1
|
||||
github.com/getsentry/sentry-go v0.44.1
|
||||
@@ -144,7 +144,7 @@ require (
|
||||
github.com/parquet-go/parquet-go v0.30.1
|
||||
github.com/pkg/sftp v1.13.11
|
||||
github.com/rabbitmq/amqp091-go v1.11.0
|
||||
github.com/rclone/rclone v1.74.3
|
||||
github.com/rclone/rclone v1.75.0
|
||||
github.com/rdleal/intervalst v1.5.0
|
||||
github.com/redis/go-redis/v9 v9.21.0
|
||||
github.com/schollz/progressbar/v3 v3.19.1
|
||||
@@ -176,19 +176,20 @@ require (
|
||||
github.com/Azure/azure-sdk-for-go/sdk/keyvault/internal v0.7.1 // indirect
|
||||
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
|
||||
github.com/FilenCloudDienste/filen-sdk-go v0.0.39 // indirect
|
||||
github.com/ProtonMail/gopenpgp/v3 v3.4.1 // indirect
|
||||
github.com/a1ex3/zstd-seekable-format-go/pkg v0.10.0 // indirect
|
||||
github.com/adrg/xdg v0.5.3 // indirect
|
||||
github.com/anchore/go-lzo v0.1.0 // indirect
|
||||
github.com/anchore/go-lzo v0.1.1 // indirect
|
||||
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
|
||||
github.com/apache/arrow-go/v18 v18.6.0 // indirect
|
||||
github.com/apache/thrift v0.23.0 // indirect
|
||||
github.com/apache/arrow-go/v18 v18.7.0 // indirect
|
||||
github.com/apache/thrift v0.24.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/signin v1.5.2 // indirect
|
||||
github.com/bahlo/generic-list-go v0.2.0 // indirect
|
||||
github.com/bazelbuild/rules_go v0.46.0 // indirect
|
||||
github.com/biogo/store v0.0.0-20201120204734-aad293a2328f // indirect
|
||||
github.com/blevesearch/snowballstem v0.9.0 // indirect
|
||||
github.com/boombuler/barcode v1.1.0 // indirect
|
||||
github.com/buger/jsonparser v1.1.2 // indirect
|
||||
github.com/buger/jsonparser v1.2.0 // indirect
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
|
||||
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
|
||||
github.com/cockroachdb/apd/v3 v3.2.1 // indirect
|
||||
@@ -203,7 +204,7 @@ require (
|
||||
github.com/containerd/platforms v1.0.0-rc.4 // indirect
|
||||
github.com/cpuguy83/dockercfg v0.3.2 // indirect
|
||||
github.com/dave/dst v0.27.2 // indirect
|
||||
github.com/diskfs/go-diskfs v1.7.0 // indirect
|
||||
github.com/diskfs/go-diskfs v1.9.4 // indirect
|
||||
github.com/distribution/reference v0.6.0 // indirect
|
||||
github.com/docker/go-connections v0.6.0 // indirect
|
||||
github.com/docker/go-units v0.5.0 // indirect
|
||||
@@ -222,7 +223,7 @@ require (
|
||||
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect
|
||||
github.com/hashicorp/go-sockaddr v1.0.7 // indirect
|
||||
github.com/hashicorp/hcl v1.0.1-vault-7 // indirect
|
||||
github.com/internxt/rclone-adapter v0.0.0-20260331173834-036f908d0160 // indirect
|
||||
github.com/internxt/rclone-adapter v0.0.0-20260708165336-dd6561bacfa2 // indirect
|
||||
github.com/jackc/pgpassfile v1.0.0 // indirect
|
||||
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
|
||||
github.com/jackc/puddle/v2 v2.2.2 // indirect
|
||||
@@ -234,6 +235,7 @@ require (
|
||||
github.com/lib/pq v1.12.0 // indirect
|
||||
github.com/lithammer/fuzzysearch v1.1.8 // indirect
|
||||
github.com/lithammer/shortuuid/v3 v3.0.7 // indirect
|
||||
github.com/lpar/calendar v0.2.0 // indirect
|
||||
github.com/magiconair/properties v1.8.10 // indirect
|
||||
github.com/moby/docker-image-spec v1.3.1 // indirect
|
||||
github.com/moby/go-archive v0.2.0 // indirect
|
||||
@@ -244,6 +246,7 @@ require (
|
||||
github.com/moby/sys/user v0.4.0 // indirect
|
||||
github.com/moby/sys/userns v0.1.0 // indirect
|
||||
github.com/moby/term v0.5.2 // indirect
|
||||
github.com/oklog/ulid/v2 v2.1.1 // indirect
|
||||
github.com/opencontainers/go-digest v1.0.0 // indirect
|
||||
github.com/opencontainers/image-spec v1.1.1 // indirect
|
||||
github.com/openzipkin/zipkin-go v0.4.3 // indirect
|
||||
@@ -254,15 +257,16 @@ require (
|
||||
github.com/pquerna/otp v1.5.0 // indirect
|
||||
github.com/pterm/pterm v0.12.83 // indirect
|
||||
github.com/quic-go/qpack v0.6.0 // indirect
|
||||
github.com/rclone/Proton-API-Bridge v1.0.3 // indirect
|
||||
github.com/rclone/go-proton-api v1.0.2 // indirect
|
||||
github.com/rogpeppe/go-internal v1.14.1 // indirect
|
||||
github.com/rclone/Proton-API-Bridge v1.0.4 // indirect
|
||||
github.com/rclone/go-proton-api v1.0.3 // indirect
|
||||
github.com/rogpeppe/go-internal v1.15.0 // indirect
|
||||
github.com/ryanuber/go-glob v1.0.0 // indirect
|
||||
github.com/sasha-s/go-deadlock v0.3.1 // indirect
|
||||
github.com/smarty/assertions v1.15.0 // indirect
|
||||
github.com/sony/gobreaker/v2 v2.4.0 // indirect
|
||||
github.com/stretchr/objx v0.5.3 // indirect
|
||||
github.com/substrait-io/substrait v0.87.0 // indirect
|
||||
github.com/substrait-io/substrait-go/v8 v8.1.0 // indirect
|
||||
github.com/substrait-io/substrait-go/v8 v8.1.1 // indirect
|
||||
github.com/substrait-io/substrait-protobuf/go v0.85.0 // indirect
|
||||
github.com/twmb/avro v1.7.2 // indirect
|
||||
github.com/twpayne/go-geom v1.6.1 // indirect
|
||||
@@ -281,12 +285,12 @@ require (
|
||||
go.uber.org/mock v0.5.2 // indirect
|
||||
go.yaml.in/yaml/v2 v2.4.4 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||
golang.org/x/mod v0.37.0 // indirect
|
||||
golang.org/x/mod v0.38.0 // indirect
|
||||
gonum.org/v1/gonum v0.17.0 // indirect
|
||||
)
|
||||
|
||||
require (
|
||||
cel.dev/expr v0.25.1 // indirect
|
||||
cel.dev/expr v0.25.2 // indirect
|
||||
cloud.google.com/go/auth v0.20.0 // indirect
|
||||
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
|
||||
cloud.google.com/go/compute/metadata v0.9.0 // indirect
|
||||
@@ -297,38 +301,36 @@ require (
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.14.0
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.12.0 // indirect
|
||||
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.8.0
|
||||
github.com/Azure/azure-sdk-for-go/sdk/storage/azfile v1.5.4 // indirect
|
||||
github.com/Azure/azure-sdk-for-go/sdk/storage/azfile v1.7.0 // indirect
|
||||
github.com/Azure/go-ntlmssp v0.1.1 // indirect
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.7.2 // indirect
|
||||
github.com/Files-com/files-sdk-go/v3 v3.3.82 // indirect
|
||||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.32.0 // indirect
|
||||
github.com/Files-com/files-sdk-go/v3 v3.3.194 // indirect
|
||||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.34.0 // indirect
|
||||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.57.0 // indirect
|
||||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.57.0 // indirect
|
||||
github.com/IBM/go-sdk-core/v5 v5.21.2 // indirect
|
||||
github.com/IBM/go-sdk-core/v5 v5.23.1 // indirect
|
||||
github.com/Max-Sum/base32768 v0.0.0-20230304063302-18e6ce5945fd // indirect
|
||||
github.com/Microsoft/go-winio v0.6.2 // indirect
|
||||
github.com/ProtonMail/bcrypt v0.0.0-20211005172633-e235017c1baf // indirect
|
||||
github.com/ProtonMail/gluon v0.17.1-0.20230724134000-308be39be96e // indirect
|
||||
github.com/ProtonMail/go-crypto v1.4.1 // indirect
|
||||
github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f // indirect
|
||||
github.com/ProtonMail/go-srp v0.0.7 // indirect
|
||||
github.com/ProtonMail/gopenpgp/v2 v2.9.0 // indirect
|
||||
github.com/PuerkitoBio/goquery v1.11.0 // indirect
|
||||
github.com/PuerkitoBio/goquery v1.12.0 // indirect
|
||||
github.com/abbot/go-http-auth v0.4.0 // indirect
|
||||
github.com/andybalholm/brotli v1.2.1 // indirect
|
||||
github.com/andybalholm/cascadia v1.3.3 // indirect
|
||||
github.com/andybalholm/brotli v1.2.2 // indirect
|
||||
github.com/andybalholm/cascadia v1.3.4 // indirect
|
||||
github.com/appscode/go-querystring v0.0.0-20170504095604-0126cfb3f1dc // indirect
|
||||
github.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e // indirect
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.11 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.14 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.33 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.22.13 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.22.34 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.33 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.33 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.34 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.14 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.18 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.23 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.33 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.25 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.31 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sns v1.39.14 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sqs v1.42.24 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.33.2 // indirect
|
||||
@@ -337,13 +339,12 @@ require (
|
||||
github.com/aws/smithy-go v1.27.5
|
||||
github.com/boltdb/bolt v1.3.1 // indirect
|
||||
github.com/bradenaw/juniper v0.15.3 // indirect
|
||||
github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 // indirect
|
||||
github.com/buengese/sgzip v0.1.1 // indirect
|
||||
github.com/calebcase/tmpfile v1.0.3 // indirect
|
||||
github.com/chilts/sid v0.0.0-20190607042430-660e94789ec9 // indirect
|
||||
github.com/cloudflare/circl v1.6.3 // indirect
|
||||
github.com/cloudinary/cloudinary-go/v2 v2.15.0 // indirect
|
||||
github.com/cloudsoda/go-smb2 v0.0.0-20250228001242-d4c70e6251cc // indirect
|
||||
github.com/cloudflare/circl v1.6.4 // indirect
|
||||
github.com/cloudinary/cloudinary-go/v2 v2.16.0 // indirect
|
||||
github.com/cloudsoda/go-smb2 v0.0.0-20260701064823-d8c5600d73b8 // indirect
|
||||
github.com/cloudsoda/sddl v0.0.0-20250224235906-926454e91efc // indirect
|
||||
github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2 // indirect
|
||||
github.com/colinmarc/hdfs/v2 v2.4.0 // indirect
|
||||
@@ -352,29 +353,29 @@ require (
|
||||
github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect
|
||||
github.com/d4l3k/messagediff v1.2.1 // indirect
|
||||
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
|
||||
github.com/dropbox/dropbox-sdk-go-unofficial/v6 v6.0.5 // indirect
|
||||
github.com/ebitengine/purego v0.10.0 // indirect
|
||||
github.com/dropbox/dropbox-sdk-go-unofficial/v6 v6.4.0 // indirect
|
||||
github.com/ebitengine/purego v0.10.1 // indirect
|
||||
github.com/elastic/gosigar v0.14.3 // indirect
|
||||
github.com/emersion/go-message v0.18.2 // indirect
|
||||
github.com/emersion/go-vcard v0.0.0-20241024213814-c9703dde27ff // indirect
|
||||
github.com/emersion/go-vcard v0.0.0-20260618161152-d854b7e0e2d3 // indirect
|
||||
github.com/envoyproxy/go-control-plane/envoy v1.37.0 // indirect
|
||||
github.com/envoyproxy/protoc-gen-validate v1.3.3 // indirect
|
||||
github.com/fatih/color v1.18.0 // indirect
|
||||
github.com/felixge/httpsnoop v1.0.4 // indirect
|
||||
github.com/felixge/httpsnoop v1.1.0 // indirect
|
||||
github.com/flynn/noise v1.1.0 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.13 // indirect
|
||||
github.com/geoffgarside/ber v1.2.0 // indirect
|
||||
github.com/go-chi/chi/v5 v5.2.5 // indirect
|
||||
github.com/go-chi/chi/v5 v5.3.1 // indirect
|
||||
github.com/go-darwin/apfs v0.0.0-20211011131704-f84b94dbf348 // indirect
|
||||
github.com/go-jose/go-jose/v4 v4.1.4 // indirect
|
||||
github.com/go-logr/logr v1.4.3 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-ole/go-ole v1.3.0 // indirect
|
||||
github.com/go-openapi/errors v0.22.6 // indirect
|
||||
github.com/go-openapi/strfmt v0.25.0 // indirect
|
||||
github.com/go-openapi/errors v0.22.8 // indirect
|
||||
github.com/go-openapi/strfmt v0.27.0 // indirect
|
||||
github.com/go-playground/locales v0.14.1 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||
github.com/go-playground/validator/v10 v10.30.1 // indirect
|
||||
github.com/go-playground/validator/v10 v10.30.3 // indirect
|
||||
github.com/go-resty/resty/v2 v2.17.2 // indirect
|
||||
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
|
||||
github.com/goccy/go-json v0.10.6 // indirect
|
||||
@@ -405,17 +406,16 @@ require (
|
||||
github.com/jtolio/noiseconn v0.0.0-20231127013910-f6d9ecbf1de7 // indirect
|
||||
github.com/jzelinskie/whirlpool v0.0.0-20201016144138-0675e54bb004 // indirect
|
||||
github.com/k0kubun/pp v3.0.1+incompatible
|
||||
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.4.0 // indirect
|
||||
github.com/koofr/go-httpclient v0.0.0-20240520111329-e20f8f203988 // indirect
|
||||
github.com/koofr/go-koofrclient v0.0.0-20221207135200-cbd7fc9ad6a6 // indirect
|
||||
github.com/kr/fs v0.1.0 // indirect
|
||||
github.com/kylelemons/godebug v1.1.0 // indirect
|
||||
github.com/lanrat/extsort v1.4.2 // indirect
|
||||
github.com/leodido/go-urn v1.4.0 // indirect
|
||||
github.com/lpar/date v1.0.0 // indirect
|
||||
github.com/lufia/plan9stats v0.0.0-20260216142805-b3301c5f2a88 // indirect
|
||||
github.com/mattn/go-colorable v0.1.14 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.22 // indirect
|
||||
github.com/lufia/plan9stats v0.0.0-20260627054121-477a66015f15 // indirect
|
||||
github.com/mattn/go-colorable v0.1.15 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.24 // indirect
|
||||
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
|
||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4
|
||||
@@ -430,8 +430,8 @@ require (
|
||||
github.com/oklog/ulid v1.3.1 // indirect
|
||||
github.com/onsi/ginkgo/v2 v2.23.3 // indirect
|
||||
github.com/opentracing/opentracing-go v1.2.0 // indirect
|
||||
github.com/oracle/oci-go-sdk/v65 v65.111.0 // indirect
|
||||
github.com/panjf2000/ants/v2 v2.11.5 // indirect
|
||||
github.com/oracle/oci-go-sdk/v65 v65.121.0 // indirect
|
||||
github.com/panjf2000/ants/v2 v2.12.1 // indirect
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
|
||||
github.com/pengsrc/go-shared v0.2.1-0.20190131101655-1999055a4a14 // indirect
|
||||
@@ -451,22 +451,22 @@ require (
|
||||
github.com/rivo/uniseg v0.4.7 // indirect
|
||||
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect
|
||||
github.com/sagikazarmark/locafero v0.11.0 // indirect
|
||||
github.com/samber/lo v1.52.0 // indirect
|
||||
github.com/samber/lo v1.53.0 // indirect
|
||||
github.com/seaweedfs/cockroachdb-parser v0.0.0-20260225204133-2f342c5ea564
|
||||
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect
|
||||
github.com/sony/gobreaker v1.0.0 // indirect
|
||||
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
|
||||
github.com/spacemonkeygo/monkit/v3 v3.0.25-0.20251022131615-eb24eb109368 // indirect
|
||||
github.com/spf13/pflag v1.0.10 // indirect
|
||||
github.com/spiffe/go-spiffe/v2 v2.6.0 // indirect
|
||||
github.com/spiffe/go-spiffe/v2 v2.8.1 // indirect
|
||||
github.com/subosito/gotenv v1.6.0 // indirect
|
||||
github.com/t3rm1n4l/go-mega v0.0.0-20251120131202-6845944c051c // indirect
|
||||
github.com/t3rm1n4l/go-mega v0.0.0-20260717075258-c6acd6a5bd04 // indirect
|
||||
github.com/tarantool/go-iproto v1.1.0 // indirect
|
||||
github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a // indirect
|
||||
github.com/tikv/pd/client v0.0.0-20230329114254-1948c247c2b1 // indirect
|
||||
github.com/tinylib/msgp v1.6.3 // indirect
|
||||
github.com/tklauser/go-sysconf v0.3.16 // indirect
|
||||
github.com/tklauser/numcpus v0.11.0 // indirect
|
||||
github.com/tinylib/msgp v1.6.4 // indirect
|
||||
github.com/tklauser/go-sysconf v0.4.0 // indirect
|
||||
github.com/tklauser/numcpus v0.12.0 // indirect
|
||||
github.com/twmb/murmur3 v1.1.8 // indirect
|
||||
github.com/unknwon/goconfig v1.0.0 // indirect
|
||||
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
|
||||
@@ -481,12 +481,12 @@ require (
|
||||
github.com/yusufpapurcu/wmi v1.2.4 // indirect
|
||||
github.com/zeebo/blake3 v0.2.4 // indirect
|
||||
github.com/zeebo/errs v1.4.0 // indirect
|
||||
go.etcd.io/bbolt v1.4.3 // indirect
|
||||
go.etcd.io/bbolt v1.5.0 // indirect
|
||||
go.etcd.io/etcd/api/v3 v3.6.12 // indirect
|
||||
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
|
||||
go.opentelemetry.io/contrib/detectors/gcp v1.43.0 // indirect
|
||||
go.opentelemetry.io/contrib/detectors/gcp v1.44.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0 // indirect
|
||||
go.opentelemetry.io/otel v1.44.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.44.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.44.0 // indirect
|
||||
@@ -496,8 +496,8 @@ require (
|
||||
go.uber.org/zap v1.27.1 // indirect
|
||||
golang.org/x/term v0.45.0
|
||||
golang.org/x/time v0.15.0
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260630182238-925bb5da69e7 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260706201446-f0a921348800 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260706201446-f0a921348800 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260715232425-e75dac1f907d // indirect
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
|
||||
gopkg.in/validator.v2 v2.0.1 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
@@ -505,12 +505,12 @@ require (
|
||||
modernc.org/libc v1.73.4 // indirect
|
||||
moul.io/http2curl/v2 v2.3.0 // indirect
|
||||
sigs.k8s.io/yaml v1.6.0 // indirect
|
||||
storj.io/common v0.0.0-20260225132117-99155641c30a // indirect
|
||||
storj.io/drpc v0.0.35-0.20250513201419-f7819ea69b55 // indirect
|
||||
storj.io/eventkit v0.0.0-20250410172343-61f26d3de156 // indirect
|
||||
storj.io/common v0.0.0-20260629224719-ba1bff0a7846 // indirect
|
||||
storj.io/drpc v1.0.0 // indirect
|
||||
storj.io/eventkit v0.0.0-20260716074419-6861a92e2aa5 // indirect
|
||||
storj.io/infectious v0.0.2 // indirect
|
||||
storj.io/picobuf v0.0.4 // indirect
|
||||
storj.io/uplink v1.14.0 // indirect
|
||||
storj.io/uplink v1.14.3 // indirect
|
||||
)
|
||||
|
||||
// replace github.com/seaweedfs/raft => /Users/chrislu/go/src/github.com/seaweedfs/raft
|
||||
|
||||
@@ -6,8 +6,8 @@ atomicgo.dev/keyboard v0.2.9 h1:tOsIid3nlPLZ3lwgG8KZMp/SFmr7P0ssEN5JUsm78K8=
|
||||
atomicgo.dev/keyboard v0.2.9/go.mod h1:BC4w9g00XkxH/f1HXhW2sXmJFOCWbKn9xrOunSFtExQ=
|
||||
atomicgo.dev/schedule v0.1.0 h1:nTthAbhZS5YZmgYbb2+DH8uQIZcTlIrd4eYr3UQxEjs=
|
||||
atomicgo.dev/schedule v0.1.0/go.mod h1:xeUa3oAkiuHYh8bKiQBRojqAMq3PXXbJujjb0hw8pEU=
|
||||
cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4=
|
||||
cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4=
|
||||
cel.dev/expr v0.25.2 h1:K6j46C81hXtZQfuX60cVWQFBJahKSE2gfRbNuvr5bFs=
|
||||
cel.dev/expr v0.25.2/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4=
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
|
||||
@@ -569,8 +569,8 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.8.1
|
||||
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.8.1/go.mod h1:Ng3urmn6dYe8gnbCMoHHVl5APYz2txho3koEkV2o2HA=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.8.0 h1:irsmOWwkp0KCTTNS5e2hdFeIvSQClQo2No3IaNmL3Vw=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.8.0/go.mod h1:GWcBkQj3MqN7ozHKLaCCAuNLiXoIGv2RtanfAwSjY/Y=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/storage/azfile v1.5.4 h1:tZh20RjgfMxKBxJiIS75iTVAKIUxrST5X2dVHMTptL4=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/storage/azfile v1.5.4/go.mod h1:vGYAk36rhMVCfTP7v+RVruCR0zmPe6S+36KRpDCLySw=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/storage/azfile v1.7.0 h1:cuiKf1UVyWHu+XSQghPZR/qEF43JIcuk2CDqMlPiT6M=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/storage/azfile v1.7.0/go.mod h1:9JSyvgXLPAOC4jfhgZg58XeU2FJHsGmxuYSclCFQ4ZY=
|
||||
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg=
|
||||
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
|
||||
github.com/Azure/go-ntlmssp v0.1.1 h1:l+FM/EEMb0U9QZE7mKNEDw5Mu3mFiaa2GKOoTSsNDPw=
|
||||
@@ -591,18 +591,18 @@ github.com/DefangLabs/secret-detector v0.0.0-20250403165618-22662109213e h1:rd4b
|
||||
github.com/DefangLabs/secret-detector v0.0.0-20250403165618-22662109213e/go.mod h1:blbwPQh4DTlCZEfk1BLU4oMIhLda2U+A840Uag9DsZw=
|
||||
github.com/FilenCloudDienste/filen-sdk-go v0.0.39 h1:tgV5jYL6dsXop9TpDTIQU6UwJjws122HrwskaEE/igY=
|
||||
github.com/FilenCloudDienste/filen-sdk-go v0.0.39/go.mod h1:0cBhKXQg49XbKZZfk5TCDa3sVLP+xMxZTWL+7KY0XR0=
|
||||
github.com/Files-com/files-sdk-go/v3 v3.3.82 h1:2RfP0d2QgkFH64BjZSWd59aMsc28IyWsUuHqU0txBtY=
|
||||
github.com/Files-com/files-sdk-go/v3 v3.3.82/go.mod h1:IPk80dOmc7VFC0DJ85xMTPmre+8xoXX6kGHAkf5jRRw=
|
||||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.32.0 h1:rIkQfkCOVKc1OiRCNcSDD8ml5RJlZbH/Xsq7lbpynwc=
|
||||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.32.0/go.mod h1:RD2SsorTmYhF6HkTmDw7KmPYQk8OBYwTkuasChwv7R4=
|
||||
github.com/Files-com/files-sdk-go/v3 v3.3.194 h1:dtOFxSTWWRpkmvXa6ycNiw8dVDu1wkgzcXyVV1VafNc=
|
||||
github.com/Files-com/files-sdk-go/v3 v3.3.194/go.mod h1:rl0WumSN9gSo775DgvQv+wMQ8rlb0ES/1hU5jkMtLXg=
|
||||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.34.0 h1:yzIYdwuro811Z27D3T80Wkd3rqZzb0K43nner7Eh1yE=
|
||||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.34.0/go.mod h1:pJTkW8hEUIIi3Pf65lPZOnn4Y81yCllX6IWk2jNXdkM=
|
||||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.57.0 h1:jLdiS1vO+XJFyDSWRHBx56r4s/NNtcl5J6KyCcWUX/w=
|
||||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.57.0/go.mod h1:8lmpHY+1VRoteiOwyrQMDt1YGXOrFKCz+1wJW7n3ODY=
|
||||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.57.0 h1:cSjUzZ7KU8hicTgzaSv9NmSyM9fTVK3y5lsBUl3wOis=
|
||||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.57.0/go.mod h1:dzcEjy1WJ0Q4u9twNR3LcLhNoYMRCrMCMafpxa0TjPQ=
|
||||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.57.0 h1:RoO5+d7uCmDqovLrHCr2/BuViUXvdcrNxyNM1pN9dDQ=
|
||||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.57.0/go.mod h1:YqwkQPrWSC7+byyc1VlKbWLBF5JsW5IoL6xUkemYSXk=
|
||||
github.com/IBM/go-sdk-core/v5 v5.21.2 h1:mJ5QbLPOm4g5qhZiVB6wbSllfpeUExftGoyPek2hk4M=
|
||||
github.com/IBM/go-sdk-core/v5 v5.21.2/go.mod h1:ngpMgwkjur1VNUjqn11LPk3o5eCyOCRbcfg/0YAY7Hc=
|
||||
github.com/IBM/go-sdk-core/v5 v5.23.1 h1:fxLusCG+GlGY1SM7BYAAiiSFhzKUs5zqs0P8knDqeFU=
|
||||
github.com/IBM/go-sdk-core/v5 v5.23.1/go.mod h1:yO+OQpByKDLTvpEcsFFexgzpeR8eRfCFWAYzxkAu4bk=
|
||||
github.com/Jille/raft-grpc-transport v1.6.1 h1:gN3sjapb+fVbiebS7AfQQgbV2ecTOI7ur7NPPC7Mhoc=
|
||||
github.com/Jille/raft-grpc-transport v1.6.1/go.mod h1:HbOjEdu/yzCJ/mjTF6wEOJNbAUpHfU2UOA2hVD4CNFg=
|
||||
github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk=
|
||||
@@ -631,14 +631,12 @@ github.com/ProtonMail/gluon v0.17.1-0.20230724134000-308be39be96e/go.mod h1:Og5/
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230321155629-9a39f2531310/go.mod h1:8TI4H3IbrackdNgv+92dI+rhpCaLqM0IfpgCgenFvRE=
|
||||
github.com/ProtonMail/go-crypto v1.4.1 h1:9RfcZHqEQUvP8RzecWEUafnZVtEvrBVL9BiF67IQOfM=
|
||||
github.com/ProtonMail/go-crypto v1.4.1/go.mod h1:e1OaTyu5SYVrO9gKOEhTc+5UcXtTUa+P3uLudwcgPqo=
|
||||
github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f h1:tCbYj7/299ekTTXpdwKYF8eBlsYsDVoggDAuAjoK66k=
|
||||
github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f/go.mod h1:gcr0kNtGBqin9zDW9GOHcVntrwnjrK+qdJ06mWYBybw=
|
||||
github.com/ProtonMail/go-srp v0.0.7 h1:Sos3Qk+th4tQR64vsxGIxYpN3rdnG9Wf9K4ZloC1JrI=
|
||||
github.com/ProtonMail/go-srp v0.0.7/go.mod h1:giCp+7qRnMIcCvI6V6U3S1lDDXDQYx2ewJ6F/9wdlJk=
|
||||
github.com/ProtonMail/gopenpgp/v2 v2.9.0 h1:ruLzBmwe4dR1hdnrsEJ/S7psSBmV15gFttFUPP/+/kE=
|
||||
github.com/ProtonMail/gopenpgp/v2 v2.9.0/go.mod h1:IldDyh9Hv1ZCCYatTuuEt1XZJ0OPjxLpTarDfglih7s=
|
||||
github.com/PuerkitoBio/goquery v1.11.0 h1:jZ7pwMQXIITcUXNH83LLk+txlaEy6NVOfTuP43xxfqw=
|
||||
github.com/PuerkitoBio/goquery v1.11.0/go.mod h1:wQHgxUOU3JGuj3oD/QFfxUdlzW6xPHfqyHre6VMY4DQ=
|
||||
github.com/ProtonMail/gopenpgp/v3 v3.4.1 h1:K7uUhSHSJxORZ+RuHpilTT6S4MA2whCRlXNwLqd0+ys=
|
||||
github.com/ProtonMail/gopenpgp/v3 v3.4.1/go.mod h1:bGdV9f6edhmd581wzXsQCTKdH8bXBbyhkgDKPjwPc6U=
|
||||
github.com/PuerkitoBio/goquery v1.12.0 h1:pAcL4g3WRXekcB9AU/y1mbKez2dbY2AajVhtkO8RIBo=
|
||||
github.com/PuerkitoBio/goquery v1.12.0/go.mod h1:802ej+gV2y7bbIhOIoPY5sT183ZW0YFofScC4q/hIpQ=
|
||||
github.com/Sereal/Sereal/Go/sereal v0.0.0-20231009093132-b9187f1a92c6/go.mod h1:JwrycNnC8+sZPDyzM3MQ86LvaGzSpfxg885KOOwFRW4=
|
||||
github.com/Shopify/sarama v1.38.1 h1:lqqPUPQZ7zPqYlWpTh+LQ9bhYNu2xJL6k1SJN4WVe2A=
|
||||
github.com/Shopify/sarama v1.38.1/go.mod h1:iwv9a67Ha8VNa+TifujYoWGxWnu2kNVAQdSdZ4X2o5g=
|
||||
@@ -675,20 +673,20 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF
|
||||
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
|
||||
github.com/alexbrainman/sspi v0.0.0-20250919150558-7d374ff0d59e h1:4dAU9FXIyQktpoUAgOJK3OTFc/xug0PCXYCqU0FgDKI=
|
||||
github.com/alexbrainman/sspi v0.0.0-20250919150558-7d374ff0d59e/go.mod h1:cEWa1LVoE5KvSD9ONXsZrj0z6KqySlCCNKHlLzbqAt4=
|
||||
github.com/anchore/go-lzo v0.1.0 h1:NgAacnzqPeGH49Ky19QKLBZEuFRqtTG9cdaucc3Vncs=
|
||||
github.com/anchore/go-lzo v0.1.0/go.mod h1:3kLx0bve2oN1iDwgM1U5zGku1Tfbdb0No5qp1eL1fIk=
|
||||
github.com/anchore/go-lzo v0.1.1 h1:IwL/fvkdtlIrYIXck6WxZ3nb8WjjHziYYmGxlooyOnM=
|
||||
github.com/anchore/go-lzo v0.1.1/go.mod h1:3kLx0bve2oN1iDwgM1U5zGku1Tfbdb0No5qp1eL1fIk=
|
||||
github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
|
||||
github.com/andybalholm/brotli v1.2.1 h1:R+f5xP285VArJDRgowrfb9DqL18yVK0gKAW/F+eTWro=
|
||||
github.com/andybalholm/brotli v1.2.1/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY=
|
||||
github.com/andybalholm/cascadia v1.3.3 h1:AG2YHrzJIm4BZ19iwJ/DAua6Btl3IwJX+VI4kktS1LM=
|
||||
github.com/andybalholm/cascadia v1.3.3/go.mod h1:xNd9bqTn98Ln4DwST8/nG+H0yuB8Hmgu1YHNnWw0GeA=
|
||||
github.com/andybalholm/brotli v1.2.2 h1:HzTuoo2ErYQqf5qvcJInB8uvqSVxRttzkFexPWtnceM=
|
||||
github.com/andybalholm/brotli v1.2.2/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY=
|
||||
github.com/andybalholm/cascadia v1.3.4 h1:vM2lgh0Vru9Vwyfm4cQqWP2HHMW0u0+2PAW7Q38Qufg=
|
||||
github.com/andybalholm/cascadia v1.3.4/go.mod h1:BLRmbRjpEtNKieZOCCvYj4RqN+KRA41GBe/5O+G93kM=
|
||||
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
||||
github.com/antithesishq/antithesis-sdk-go v0.6.0-default-no-op h1:kpBdlEPbRvff0mDD1gk7o9BhI16b9p5yYAXRlidpqJE=
|
||||
github.com/antithesishq/antithesis-sdk-go v0.6.0-default-no-op/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl3v2yvUZjmKncl7U91fup7E=
|
||||
github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ=
|
||||
github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw=
|
||||
github.com/apache/arrow-go/v18 v18.6.0 h1:GX/Jyd3R7mCLiECAwY9FWbbaYblie2WXBSz4Sw8fNpM=
|
||||
github.com/apache/arrow-go/v18 v18.6.0/go.mod h1:gm3MiPpY82fLYK5VKPB3WoJbsiLVDfT7flD5/vHReKw=
|
||||
github.com/apache/arrow-go/v18 v18.7.0 h1:Vw/i+cJyebUofT7JlqFpe65LrmwxULn166jjwStM4HY=
|
||||
github.com/apache/arrow-go/v18 v18.7.0/go.mod h1:PM6IigLJkdMwIpeHXnymo+xZ52f42a9EYiLtRel4p/A=
|
||||
github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0=
|
||||
github.com/apache/cassandra-gocql-driver/v2 v2.1.2 h1:lu/p0Db2av18enHJvWJQoChLssI0P+AR06STq4VdvCc=
|
||||
github.com/apache/cassandra-gocql-driver/v2 v2.1.2/go.mod h1:QH/asJjB3mHvY6Dot6ZKMMpTcOrWJ8i9GhsvG1g0PK4=
|
||||
@@ -711,16 +709,16 @@ github.com/aws/aws-sdk-go v1.55.8 h1:JRmEUbU52aJQZ2AjX4q4Wu7t4uZjOu71uyNmaWlUkJQ
|
||||
github.com/aws/aws-sdk-go v1.55.8/go.mod h1:ZkViS9AqA6otK+JBBNH2++sx1sgxrPKcSzPPvQkUtXk=
|
||||
github.com/aws/aws-sdk-go-v2 v1.43.2 h1:cl+IXwWb3qazClUcm08tGSsB6OiuV83JVJO9B0jQcPc=
|
||||
github.com/aws/aws-sdk-go-v2 v1.43.2/go.mod h1:WEzLKBh/mEjXvx1FtQMWgSxMSTVqxQzjkRtk5fa3wkg=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.11 h1:h5+3VT69KUBK24grGuuA5saDJTj2IIjLb9au668Fo5I=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.11/go.mod h1:dnakxebH6UwFvcvujL0LVggYQ8nEvBGjU4G/V79Nv94=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.14 h1:3IZY0XAJquT3aHzbkHfPzy4ACPcEjVG0x87KOwtpqGY=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.14/go.mod h1:zwM6veDkhGgQFqkBy+uT28AAYpLu+uFMlPl+rCg/73E=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.32.33 h1:M1m/Q6f0OKDEDGwhiNOqx1OjTdrewe3v+GDbHmKczWk=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.32.33/go.mod h1:fGj1iQj2QpIZzp7jE4aQQ+71TE8cd4z9K4+xCd6EqmE=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.19.32 h1:eNE0JnIblBo1NCvd3tqEYuZz9XDefn69R74CHd3nT7U=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.19.32/go.mod h1:yYJu+6tqKUYZuJSYcpSGjz/6sV/SUaAaKIufnWKx2OU=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.33 h1:MobhiR6KIerWxmO74Zit5I3379+mSc2DOdZ3DeRFB9w=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.33/go.mod h1:xu02847OdZfNr/jAfZpHtyRk0b3v4d0kaoxNHxZGG/w=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.22.13 h1:uMC4oL6G3MNhodo358QEqSDjrgvzV3TUQ58nyQSGq2E=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.22.13/go.mod h1:Cer86AE2686DvVUe57LPve3jUBmbujuaonSX8pNzGgw=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.22.34 h1:Pn7OsMwBLbkZ6OnCxWHAjf0L/22H8cnhxZC0uPwtMtg=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.22.34/go.mod h1:eToXR/Gk1uqpn04eSmdgVXwfS0WvH8aG4eBFr8ygbpU=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager v0.2.3 h1:w5OoDiMN6x53ROmiIImGzmVcxXv2q1GXY+aKV4WAJYM=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager v0.2.3/go.mod h1:dAhgYp776bX3LuWvnSCFwQEjNs6fuFg7YXIy5PXcP3Q=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.33 h1:HAp1wLFZzch054uh3FK7rcVYg4v7J2FxVf3h3IGNZas=
|
||||
@@ -731,14 +729,14 @@ github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.34 h1:HQYnjFnXpX8EbPW5M1QT8mXzesR
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.34/go.mod h1:tGzj56niKYZBbDIRhwPGDqrULzmWv5b6uBQGqyNaFZw=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.14 h1:SA43nfaY7+1jjMNIc2ywu99JLJLButtIdLP6j+bT870=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.14/go.mod h1:Du3llKcwbQvHsTXSLzTOGQz0DTDBMEzdg7DAGu7inrY=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.18 h1:W/EyPFl9A5rXrtoilfwHYEvzHER+K4SpBPtMXi24Mos=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.18/go.mod h1:UG50K+pvd/uy6xExbobg0rjqFBFZe6I3l75EPDZw4tg=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.23 h1:9Fjh6fi/U5JEStVZijmaMpUwE/gvBJj7x2B/PjbO9To=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.23/go.mod h1:iMoT2f1tClxrWAAnKCXjZQ6LOmfLrMG14wmnWpM+F14=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.33 h1:mqI7OrxN/DUH85F5OqVn3cIfuZ3+HVcebUm2N8mLlgQ=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.33/go.mod h1:eZ5jdEpvaaOU8nWWE4cTAJETSEA5FZoWxvNRao4piHY=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.25 h1:2pQEbwf+/6EDbiit/GcBE2K4IUpMZymaA0kOz3xK978=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.25/go.mod h1:KvT6NCcQ0EZ+ZkVRrlBMt04Po3ok23YELEp7WimhLhM=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.102.2 h1:ie4ElCmUKS26pzrZcIk/lmt4yWjAqLLcawstyQCh298=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.102.2/go.mod h1:zjsomFeX5duj+4PlMB+o4JoWTIx+G0XMyzjYrUbQkN0=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.31 h1:uao4A3QZ5UmB326V6KF+qRpv9Tjz7IlnlnTbbANntlU=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.31/go.mod h1:I/1+z0VwL1GhQyLgkoHDlygpUZ+iTAwOQ/NsftiUL2I=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.105.2 h1:5C00eQYpTrgQXnp6V3P6P7zPElna3AXvlukbANE6nJI=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.105.2/go.mod h1:zdmCoFO/dSI7GlrwsPqFJI+WlFnSU4Tc8TJnlXrM1Do=
|
||||
github.com/aws/aws-sdk-go-v2/service/signin v1.5.2 h1:EjI1CZzDcBxPkTa3j1BdtIrUDbqnOGssFMeyUS+6W0I=
|
||||
github.com/aws/aws-sdk-go-v2/service/signin v1.5.2/go.mod h1:vN3eb5H8MEAZ4dx0F5Wc9LT8eb3eW7bZZ5BjGJdbw9k=
|
||||
github.com/aws/aws-sdk-go-v2/service/sns v1.39.14 h1:p8WdWDh5AwSZdp19Haa3XMyPCICi9Z375a/Nu3IIEZY=
|
||||
@@ -775,8 +773,6 @@ github.com/boombuler/barcode v1.1.0 h1:ChaYjBR63fr4LFyGn8E8nt7dBSt3MiU3zMOZqFvVk
|
||||
github.com/boombuler/barcode v1.1.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
|
||||
github.com/bradenaw/juniper v0.15.3 h1:RHIAMEDTpvmzV1wg1jMAHGOoI2oJUSPx3lxRldXnFGo=
|
||||
github.com/bradenaw/juniper v0.15.3/go.mod h1:UX4FX57kVSaDp4TPqvSjkAAewmRFAfXf27BOs5z9dq8=
|
||||
github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 h1:GKTyiRCL6zVf5wWaqKnf+7Qs6GbEPfd4iMOitWzXJx8=
|
||||
github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8/go.mod h1:spo1JLcs67NmW1aVLEgtA8Yy1elc+X8y5SRW1sFW4Og=
|
||||
github.com/broady/gogeohash v0.0.0-20120525094510-7b2c40d64042 h1:iEdmkrNMLXbM7ecffOAtZJQOQUTE4iMonxrb5opUgE4=
|
||||
github.com/broady/gogeohash v0.0.0-20120525094510-7b2c40d64042/go.mod h1:f1L9YvXvlt9JTa+A17trQjSMM6bV40f+tHjB+Pi+Fqk=
|
||||
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
|
||||
@@ -789,8 +785,8 @@ github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/
|
||||
github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c=
|
||||
github.com/buger/goterm v1.0.4 h1:Z9YvGmOih81P0FbVtEYTFF6YsSgxSUKEhf/f9bTMXbY=
|
||||
github.com/buger/goterm v1.0.4/go.mod h1:HiFWV3xnkolgrBV3mY8m0X0Pumt4zg4QhbdOzQtB8tE=
|
||||
github.com/buger/jsonparser v1.1.2 h1:frqHqw7otoVbk5M8LlE/L7HTnIq2v9RX6EJ48i9AxJk=
|
||||
github.com/buger/jsonparser v1.1.2/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
|
||||
github.com/buger/jsonparser v1.2.0 h1:4EFcvK1kD4jyj6YqNK6skK6w+y7FHHBR+XBCtxwu/6g=
|
||||
github.com/buger/jsonparser v1.2.0/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
|
||||
github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
|
||||
github.com/bwmarrin/snowflake v0.3.0 h1:xm67bEhkKh6ij1790JB83OujPR5CzNe8QuQqAgISZN0=
|
||||
github.com/bwmarrin/snowflake v0.3.0/go.mod h1:NdZxfVWX+oR6y2K0o6qAYv6gIOP9rjG0/E9WsDpxqwE=
|
||||
@@ -825,12 +821,12 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
|
||||
github.com/clipperhouse/uax29/v2 v2.7.0 h1:+gs4oBZ2gPfVrKPthwbMzWZDaAFPGYK72F0NJv2v7Vk=
|
||||
github.com/clipperhouse/uax29/v2 v2.7.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM=
|
||||
github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I=
|
||||
github.com/cloudflare/circl v1.6.3 h1:9GPOhQGF9MCYUeXyMYlqTR6a5gTrgR/fBLXvUgtVcg8=
|
||||
github.com/cloudflare/circl v1.6.3/go.mod h1:2eXP6Qfat4O/Yhh8BznvKnJ+uzEoTQ6jVKJRn81BiS4=
|
||||
github.com/cloudinary/cloudinary-go/v2 v2.15.0 h1:iLoIwb7BJECHTbNcmIhYDsQhoZiACWGNvEpyqQy97Dk=
|
||||
github.com/cloudinary/cloudinary-go/v2 v2.15.0/go.mod h1:ireC4gqVetsjVhYlwjUJwKTbZuWjEIynbR9zQTlqsvo=
|
||||
github.com/cloudsoda/go-smb2 v0.0.0-20250228001242-d4c70e6251cc h1:t8YjNUCt1DimB4HCIXBztwWMhgxr5yG5/YaRl9Afdfg=
|
||||
github.com/cloudsoda/go-smb2 v0.0.0-20250228001242-d4c70e6251cc/go.mod h1:CgWpFCFWzzEA5hVkhAc6DZZzGd3czx+BblvOzjmg6KA=
|
||||
github.com/cloudflare/circl v1.6.4 h1:pOXuDTCEYyzydgUpQ0CQz3LsinKjiSk6nNP5Lt5K64U=
|
||||
github.com/cloudflare/circl v1.6.4/go.mod h1:YxarevkLlbaHuWsxG6vmYNWBEsSp4pnp7j+4VljMavY=
|
||||
github.com/cloudinary/cloudinary-go/v2 v2.16.0 h1:0irPbKwRB6V6sdP9+a4P4D5sRUYHXriG5GfTjVq4YBI=
|
||||
github.com/cloudinary/cloudinary-go/v2 v2.16.0/go.mod h1:ireC4gqVetsjVhYlwjUJwKTbZuWjEIynbR9zQTlqsvo=
|
||||
github.com/cloudsoda/go-smb2 v0.0.0-20260701064823-d8c5600d73b8 h1:+KC2I+emnT6ccWmo7IHbtchGc/vFqAxUuovo2eUgMuM=
|
||||
github.com/cloudsoda/go-smb2 v0.0.0-20260701064823-d8c5600d73b8/go.mod h1:1pQXB0vAlzRlqcY7LYKOOZMw0wKfJPFxTLsJRF2Gswo=
|
||||
github.com/cloudsoda/sddl v0.0.0-20250224235906-926454e91efc h1:0xCWmFKBmarCqqqLeM7jFBSw/Or81UEElFqO8MY+GDs=
|
||||
github.com/cloudsoda/sddl v0.0.0-20250224235906-926454e91efc/go.mod h1:uvR42Hb/t52HQd7x5/ZLzZEK8oihrFpgnodIJ1vte2E=
|
||||
github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M=
|
||||
@@ -922,8 +918,8 @@ github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WA
|
||||
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/diskfs/go-diskfs v1.7.0 h1:vonWmt5CMowXwUc79jWyGrf2DIMeoOjkLlMnQYGVOs8=
|
||||
github.com/diskfs/go-diskfs v1.7.0/go.mod h1:LhQyXqOugWFRahYUSw47NyZJPezFzB9UELwhpszLP/k=
|
||||
github.com/diskfs/go-diskfs v1.9.4 h1:0j2d7eG4IjyxL6+ChWbDPocdBCF6HQ4HBWU2WDYWVnc=
|
||||
github.com/diskfs/go-diskfs v1.9.4/go.mod h1:TePJORO83Adh5pb2SqsxAwaP0fofFxKLkxctiS/9OQc=
|
||||
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
|
||||
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
|
||||
github.com/djherbis/times v1.6.0 h1:w2ctJ92J8fBvWPxugmXIv7Nz7Q3iDMKNx9v5ocVH20c=
|
||||
@@ -947,8 +943,8 @@ github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD
|
||||
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
|
||||
github.com/dromara/dongle v1.0.1 h1:si/7UP/EXxnFVZok1cNos70GiMGxInAYMilHQFP5dJs=
|
||||
github.com/dromara/dongle v1.0.1/go.mod h1:ebFhTaDgxaDIKppycENTWlBsxz8mWCPWOLnsEgDpMv4=
|
||||
github.com/dropbox/dropbox-sdk-go-unofficial/v6 v6.0.5 h1:FT+t0UEDykcor4y3dMVKXIiWJETBpRgERYTGlmMd7HU=
|
||||
github.com/dropbox/dropbox-sdk-go-unofficial/v6 v6.0.5/go.mod h1:rSS3kM9XMzSQ6pw91Qgd6yB5jdt70N4OdtrAf74As5M=
|
||||
github.com/dropbox/dropbox-sdk-go-unofficial/v6 v6.4.0 h1:OYMx56y2as2FIM6QuS5HGXC2AYtf5xv/2n6INaluF4Y=
|
||||
github.com/dropbox/dropbox-sdk-go-unofficial/v6 v6.4.0/go.mod h1:gDXhl0OElhzYoDsYWHr1RXjpxjGeLzEvjYzH7sZV73k=
|
||||
github.com/dsnet/try v0.0.3 h1:ptR59SsrcFUYbT/FhAbKTV6iLkeD6O18qfIWRml2fqI=
|
||||
github.com/dsnet/try v0.0.3/go.mod h1:WBM8tRpUmnXXhY1U6/S8dt6UWdHTQ7y8A5YSkRCkq40=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
@@ -960,18 +956,18 @@ github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 h1:Oy0F4A
|
||||
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3/go.mod h1:YvSRo5mw33fLEx1+DlK6L2VV43tJt5Eyel9n9XBcR+0=
|
||||
github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc=
|
||||
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
|
||||
github.com/ebitengine/purego v0.10.0 h1:QIw4xfpWT6GWTzaW5XEKy3HXoqrJGx1ijYHzTF0/ISU=
|
||||
github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
|
||||
github.com/ebitengine/purego v0.10.1 h1:dewVBCBT2GaMu1SrNTYxQhgQBethzfhiwvZiLGP/qyY=
|
||||
github.com/ebitengine/purego v0.10.1/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
|
||||
github.com/eiannone/keyboard v0.0.0-20220611211555-0d226195f203 h1:XBBHcIb256gUJtLmY22n99HaZTz+r2Z51xUPi01m3wg=
|
||||
github.com/eiannone/keyboard v0.0.0-20220611211555-0d226195f203/go.mod h1:E1jcSv8FaEny+OP/5k9UxZVw9YFWGj7eI4KR/iOBqCg=
|
||||
github.com/elastic/gosigar v0.14.3 h1:xwkKwPia+hSfg9GqrCUKYdId102m9qTJIIr7egmK/uo=
|
||||
github.com/elastic/gosigar v0.14.3/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs=
|
||||
github.com/elliotwutingfeng/asciiset v0.0.0-20230602022725-51bbb787efab h1:h1UgjJdAAhj+uPL68n7XASS6bU+07ZX1WJvVS2eyoeY=
|
||||
github.com/elliotwutingfeng/asciiset v0.0.0-20230602022725-51bbb787efab/go.mod h1:GLo/8fDswSAniFG+BFIaiSPcK610jyzgEhWYPQwuQdw=
|
||||
github.com/elliotwutingfeng/asciiset v0.0.0-20260129054604-cfde2086bc57 h1:x5yxNrq8XffV/OoNUeFPM6hxHVi5OTspSTBxr/9pemg=
|
||||
github.com/elliotwutingfeng/asciiset v0.0.0-20260129054604-cfde2086bc57/go.mod h1:GLo/8fDswSAniFG+BFIaiSPcK610jyzgEhWYPQwuQdw=
|
||||
github.com/emersion/go-message v0.18.2 h1:rl55SQdjd9oJcIoQNhubD2Acs1E6IzlZISRTK7x/Lpg=
|
||||
github.com/emersion/go-message v0.18.2/go.mod h1:XpJyL70LwRvq2a8rVbHXikPgKj8+aI0kGdHlg16ibYA=
|
||||
github.com/emersion/go-vcard v0.0.0-20241024213814-c9703dde27ff h1:4N8wnS3f1hNHSmFD5zgFkWCyA4L1kCDkImPAtK7D6tg=
|
||||
github.com/emersion/go-vcard v0.0.0-20241024213814-c9703dde27ff/go.mod h1:HMJKR5wlh/ziNp+sHEDV2ltblO4JD2+IdDOWtGcQBTM=
|
||||
github.com/emersion/go-vcard v0.0.0-20260618161152-d854b7e0e2d3 h1:B9YK+Tck5mTccyDhtxBzWyqGYcFxLyB6+noMNW4/VgI=
|
||||
github.com/emersion/go-vcard v0.0.0-20260618161152-d854b7e0e2d3/go.mod h1:HMJKR5wlh/ziNp+sHEDV2ltblO4JD2+IdDOWtGcQBTM=
|
||||
github.com/emmansun/gmsm v0.15.5/go.mod h1:2m4jygryohSWkaSduFErgCwQKab5BNjURoFrn2DNwyU=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
@@ -1011,8 +1007,8 @@ github.com/fanixk/geohash v0.0.0-20150324002647-c1f9b5fa157a/go.mod h1:UgNw+PTmm
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
|
||||
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
|
||||
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
|
||||
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||
github.com/felixge/httpsnoop v1.1.0 h1:3YtUj32ZZkqZtt3sZZsClsymw/QDuVfpNhoA31zeORc=
|
||||
github.com/felixge/httpsnoop v1.1.0/go.mod h1:Zqxgdd+1Rkcz8euOqdr7lqgCRJztwr5hp9vDSi5UZCE=
|
||||
github.com/fluent/fluent-logger-golang v1.10.1 h1:wu54iN1O2afll5oQrtTjhgZRwWcfOeFFzwRsEkABfFQ=
|
||||
github.com/fluent/fluent-logger-golang v1.10.1/go.mod h1:qOuXG4ZMrXaSTk12ua+uAb21xfNYOzn0roAtp7mfGAE=
|
||||
github.com/flynn/noise v1.1.0 h1:KjPQoQCEFdZDiP03phOvGi11+SVVhBG2wOWAorLsstg=
|
||||
@@ -1044,8 +1040,8 @@ github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk=
|
||||
github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls=
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667 h1:BP4M0CvQ4S3TGls2FvczZtj5Re/2ZzkV9VwqPHH/3Bo=
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
|
||||
github.com/go-chi/chi/v5 v5.2.5 h1:Eg4myHZBjyvJmAFjFvWgrqDTXFyOzjj7YIm3L3mu6Ug=
|
||||
github.com/go-chi/chi/v5 v5.2.5/go.mod h1:X7Gx4mteadT3eDOMTsXzmI4/rwUpOwBHLpAfupzFJP0=
|
||||
github.com/go-chi/chi/v5 v5.3.1 h1:3j4HZLGZQ3JpMCrPJF/Jl3mYJfWLKBfNJ6quurUGCf8=
|
||||
github.com/go-chi/chi/v5 v5.3.1/go.mod h1:R+tYY2hNuVUUjxoPtqUdgBqevM9s9njzkTLutVsOCto=
|
||||
github.com/go-darwin/apfs v0.0.0-20211011131704-f84b94dbf348 h1:JnrjqG5iR07/8k7NqrLNilRsl3s1EPRQEGvbPyOce68=
|
||||
github.com/go-darwin/apfs v0.0.0-20211011131704-f84b94dbf348/go.mod h1:Czxo/d1g948LtrALAZdL04TL/HnkopquAjxYUuI02bo=
|
||||
github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk=
|
||||
@@ -1080,12 +1076,12 @@ github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre
|
||||
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
||||
github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
|
||||
github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
|
||||
github.com/go-openapi/errors v0.22.6 h1:eDxcf89O8odEnohIXwEjY1IB4ph5vmbUsBMsFNwXWPo=
|
||||
github.com/go-openapi/errors v0.22.6/go.mod h1:z9S8ASTUqx7+CP1Q8dD8ewGH/1JWFFLX/2PmAYNQLgk=
|
||||
github.com/go-openapi/strfmt v0.25.0 h1:7R0RX7mbKLa9EYCTHRcCuIPcaqlyQiWNPTXwClK0saQ=
|
||||
github.com/go-openapi/strfmt v0.25.0/go.mod h1:nNXct7OzbwrMY9+5tLX4I21pzcmE6ccMGXl3jFdPfn8=
|
||||
github.com/go-openapi/testify/v2 v2.0.2 h1:X999g3jeLcoY8qctY/c/Z8iBHTbwLz7R2WXd6Ub6wls=
|
||||
github.com/go-openapi/testify/v2 v2.0.2/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54=
|
||||
github.com/go-openapi/errors v0.22.8 h1:oP7sW7TWc3wFFjrzzj0nI83H2qMBkNjNfSd+XRejk/I=
|
||||
github.com/go-openapi/errors v0.22.8/go.mod h1:BuUoHcYrU6E7V9gfj1I5wLQqgtIHnup/alXZ8KdgQ0w=
|
||||
github.com/go-openapi/strfmt v0.27.0 h1:kbcTeaD9TXuXD0hhMXzuYa1sdTo6+dWGvwjW93E80IM=
|
||||
github.com/go-openapi/strfmt v0.27.0/go.mod h1:s/qhDqfY72irigXUGJmtgid2Rm+3tnz3k8hZaRmvWYc=
|
||||
github.com/go-openapi/testify/v2 v2.6.0 h1:5PKH2HE7YJ/LuRPQGvSxBRlFXNQhSetBLlGAgUEu3ug=
|
||||
github.com/go-openapi/testify/v2 v2.6.0/go.mod h1:SgsVHtfooshd0tublTtJ50FPKhujf47YRqauXXOUxfw=
|
||||
github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M=
|
||||
github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M=
|
||||
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
|
||||
@@ -1094,8 +1090,8 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o
|
||||
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
|
||||
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
|
||||
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
||||
github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w=
|
||||
github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM=
|
||||
github.com/go-playground/validator/v10 v10.30.3 h1:4MU6YkEwx7GbcPJOZxrtbu+QfF3pJLJuaYTeAH0DYy8=
|
||||
github.com/go-playground/validator/v10 v10.30.3/go.mod h1:4Axh7oCNGcoGkqLoE4YWt6n20mcEIsPRlB7vPk3lpyc=
|
||||
github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg=
|
||||
github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
|
||||
github.com/go-redis/redis/v7 v7.4.1 h1:PASvf36gyUpr2zdOUS/9Zqc80GbM+9BDyiJSJDDOrTI=
|
||||
@@ -1206,7 +1202,6 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||
github.com/google/go-replayers/grpcreplay v1.3.0 h1:1Keyy0m1sIpqstQmgz307zhiJ1pV4uIlFds5weTmxbo=
|
||||
@@ -1373,8 +1368,8 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2
|
||||
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
|
||||
github.com/inhies/go-bytesize v0.0.0-20220417184213-4913239db9cf h1:FtEj8sfIcaaBfAKrE1Cwb61YDtYq9JxChK1c7AKce7s=
|
||||
github.com/inhies/go-bytesize v0.0.0-20220417184213-4913239db9cf/go.mod h1:yrqSXGoD/4EKfF26AOGzscPOgTTJcyAwM2rpixWT+t4=
|
||||
github.com/internxt/rclone-adapter v0.0.0-20260331173834-036f908d0160 h1:PV6ipOJN0JIek4dqPqsTtenQmjI1SZntCUgPzhfk9gM=
|
||||
github.com/internxt/rclone-adapter v0.0.0-20260331173834-036f908d0160/go.mod h1:yRuPDnHgGmsbvopF0amMqXxr4n32GynzX5GTwFYDHaw=
|
||||
github.com/internxt/rclone-adapter v0.0.0-20260708165336-dd6561bacfa2 h1:ZeebPK9Bnpy40uTuneEeVMYaMMerol3qsmIvzD0EIAk=
|
||||
github.com/internxt/rclone-adapter v0.0.0-20260708165336-dd6561bacfa2/go.mod h1:4jGLEnNHyWOVSGn89IeWUVqlKCEitOM3D32/XypGy/o=
|
||||
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
|
||||
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
|
||||
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo=
|
||||
@@ -1456,8 +1451,8 @@ github.com/klauspost/compress v1.19.1/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl
|
||||
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||
github.com/klauspost/cpuid/v2 v2.0.10/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
|
||||
github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
|
||||
github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y=
|
||||
github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
|
||||
github.com/klauspost/cpuid/v2 v2.4.0 h1:S6Hrbc7+ywsr0r+RLapfGBHfyefhCTwEh3A0tV913Dw=
|
||||
github.com/klauspost/cpuid/v2 v2.4.0/go.mod h1:19jmZ9mjzoF//ddRSUsv0zfBTJWh3QJh9FNxZTMrGxU=
|
||||
github.com/klauspost/reedsolomon v1.14.1 h1:swE9kzyWXD/wVG+l5Pe8bWnQ0giIY7D1GjCBKk3kG2U=
|
||||
github.com/klauspost/reedsolomon v1.14.1/go.mod h1:yjqqjgMTQkBUHSG97/rm4zipffCNbCiZcB3kTqr++sQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
@@ -1497,31 +1492,31 @@ github.com/lithammer/fuzzysearch v1.1.8 h1:/HIuJnjHuXS8bKaiTMeeDlW2/AyIWk2brx1V8
|
||||
github.com/lithammer/fuzzysearch v1.1.8/go.mod h1:IdqeyBClc3FFqSzYq/MXESsS4S0FsZ5ajtkr5xPLts4=
|
||||
github.com/lithammer/shortuuid/v3 v3.0.7 h1:trX0KTHy4Pbwo/6ia8fscyHoGA+mf1jWbPJVuvyJQQ8=
|
||||
github.com/lithammer/shortuuid/v3 v3.0.7/go.mod h1:vMk8ke37EmiewwolSO1NLW8vP4ZaKlRuDIi8tWWmAts=
|
||||
github.com/lpar/date v1.0.0 h1:bq/zVqFTUmsxvd/CylidY4Udqpr9BOFrParoP6p0x/I=
|
||||
github.com/lpar/date v1.0.0/go.mod h1:KjYe0dDyMQTgpqcUz4LEIeM5VZwhggjVx/V2dtc8NSo=
|
||||
github.com/lufia/plan9stats v0.0.0-20260216142805-b3301c5f2a88 h1:PTw+yKnXcOFCR6+8hHTyWBeQ/P4Nb7dd4/0ohEcWQuM=
|
||||
github.com/lufia/plan9stats v0.0.0-20260216142805-b3301c5f2a88/go.mod h1:autxFIvghDt3jPTLoqZ9OZ7s9qTGNAWmYCjVFWPX/zg=
|
||||
github.com/lpar/calendar v0.2.0 h1:A1kxv6sbvBHFUkd2XotanIRqEXQGreQOeuGhkJqIaRA=
|
||||
github.com/lpar/calendar v0.2.0/go.mod h1:fsVJa4o2NvXYzaCE5RXMadqbZzWEhNCGOUPVHTIZdjc=
|
||||
github.com/lufia/plan9stats v0.0.0-20260627054121-477a66015f15 h1:YkjVPl/YH5XlJ+/NiwzJtPYXXKRcyjmEUhsDci6YK3c=
|
||||
github.com/lufia/plan9stats v0.0.0-20260627054121-477a66015f15/go.mod h1:autxFIvghDt3jPTLoqZ9OZ7s9qTGNAWmYCjVFWPX/zg=
|
||||
github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA=
|
||||
github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA=
|
||||
github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o=
|
||||
github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE=
|
||||
github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
|
||||
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
|
||||
github.com/mailru/easyjson v0.9.1 h1:LbtsOm5WAswyWbvTEOqhypdPeZzHavpZx96/n553mR8=
|
||||
github.com/mailru/easyjson v0.9.1/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU=
|
||||
github.com/mailru/easyjson v0.9.2 h1:dX8U45hQsZpxd80nLvDGihsQ/OxlvTkVUXH2r/8cb2M=
|
||||
github.com/mailru/easyjson v0.9.2/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU=
|
||||
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
|
||||
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
|
||||
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
|
||||
github.com/mattn/go-colorable v0.1.15 h1:+u9SLTRGnXv73cEsnsmoZBom+dMU88B2M0aDcWy0/jY=
|
||||
github.com/mattn/go-colorable v0.1.15/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-isatty v0.0.22 h1:j8l17JJ9i6VGPUFUYoTUKPSgKe/83EYU2zBC7YNKMw4=
|
||||
github.com/mattn/go-isatty v0.0.22/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4=
|
||||
github.com/mattn/go-isatty v0.0.23 h1:cYwCQTQf3HB6xUC+BtyCLZNr7IzbOmoZbmssVNzSyiQ=
|
||||
github.com/mattn/go-isatty v0.0.23/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A=
|
||||
github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||
github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||
github.com/mattn/go-runewidth v0.0.22 h1:76lXsPn6FyHtTY+jt2fTTvsMUCZq1k0qwRsAMuxzKAk=
|
||||
github.com/mattn/go-runewidth v0.0.22/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
|
||||
github.com/mattn/go-runewidth v0.0.24 h1:cpokDiIn0MGnhdHwuWnJBITySJ20QyNGnY2kR/ay2DU=
|
||||
github.com/mattn/go-runewidth v0.0.24/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
|
||||
github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk=
|
||||
github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
|
||||
github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||
@@ -1609,6 +1604,8 @@ github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY=
|
||||
github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc=
|
||||
github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=
|
||||
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
|
||||
github.com/oklog/ulid/v2 v2.1.1 h1:suPZ4ARWLOJLegGFiZZ1dFAkqzhMjL3J1TzI+5wHz8s=
|
||||
github.com/oklog/ulid/v2 v2.1.1/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ=
|
||||
github.com/olivere/elastic/v7 v7.0.32 h1:R7CXvbu8Eq+WlsLgxmKVKPox0oOwAE/2T9Si5BnvK6E=
|
||||
github.com/olivere/elastic/v7 v7.0.32/go.mod h1:c7PVmLe3Fxq77PIfY/bZmxY/TAamBhCzZ8xDOE09a9k=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
@@ -1629,12 +1626,12 @@ github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+
|
||||
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
|
||||
github.com/openzipkin/zipkin-go v0.4.3 h1:9EGwpqkgnwdEIJ+Od7QVSEIH+ocmm5nPat0G7sjsSdg=
|
||||
github.com/openzipkin/zipkin-go v0.4.3/go.mod h1:M9wCJZFWCo2RiY+o1eBCEMe0Dp2S5LDHcMZmk3RmK7c=
|
||||
github.com/oracle/oci-go-sdk/v65 v65.111.0 h1:eDkWg6ZN0uKwWzSekoFcQJhR+C+F/aVdTwr+lGHU9Qk=
|
||||
github.com/oracle/oci-go-sdk/v65 v65.111.0/go.mod h1:8ZzvzuEG/cFLFZhxg/Mg1w19KqyXBKO3c17QIc5PkGs=
|
||||
github.com/oracle/oci-go-sdk/v65 v65.121.0 h1:1J+5ARgrodrx8kzFy/hxznaoUzz43jr0EestCzEaOHw=
|
||||
github.com/oracle/oci-go-sdk/v65 v65.121.0/go.mod h1:Pzy+BpgkDesvGZXEHgslwhIYobHCPHg6wRta1mWnlqQ=
|
||||
github.com/orcaman/concurrent-map/v2 v2.0.1 h1:jOJ5Pg2w1oeB6PeDurIYf6k9PQ+aTITr/6lP/L/zp6c=
|
||||
github.com/orcaman/concurrent-map/v2 v2.0.1/go.mod h1:9Eq3TG2oBe5FirmYWQfYO5iH1q0Jv47PLaNK++uCdOM=
|
||||
github.com/panjf2000/ants/v2 v2.11.5 h1:a7LMnMEeux/ebqTux140tRiaqcFTV0q2bEHF03nl6Rg=
|
||||
github.com/panjf2000/ants/v2 v2.11.5/go.mod h1:8u92CYMUc6gyvTIw8Ru7Mt7+/ESnJahz5EVtqfrilek=
|
||||
github.com/panjf2000/ants/v2 v2.12.1 h1:BWvU2wHpyXWxhhNXsGB6JXLCNbshyLd1QxvoAmZnu10=
|
||||
github.com/panjf2000/ants/v2 v2.12.1/go.mod h1:tSQuaNQ6r6NRhPt+IZVUevvDyFMTs+eS4ztZc52uJTY=
|
||||
github.com/parquet-go/bitpack v1.0.0 h1:AUqzlKzPPXf2bCdjfj4sTeacrUwsT7NlcYDMUQxPcQA=
|
||||
github.com/parquet-go/bitpack v1.0.0/go.mod h1:XnVk9TH+O40eOOmvpAVZ7K2ocQFrQwysLMnc6M/8lgs=
|
||||
github.com/parquet-go/jsonlite v1.0.0 h1:87QNdi56wOfsE5bdgas0vRzHPxfJgzrXGml1zZdd7VU=
|
||||
@@ -1645,6 +1642,7 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw
|
||||
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
|
||||
github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o=
|
||||
github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
|
||||
github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
|
||||
github.com/pengsrc/go-shared v0.2.1-0.20190131101655-1999055a4a14 h1:XeOYlK9W1uCmhjJSsY78Mcuh7MVkNjTzmHx1yBzizSU=
|
||||
@@ -1753,12 +1751,12 @@ github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SA
|
||||
github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU=
|
||||
github.com/rabbitmq/amqp091-go v1.11.0 h1:HxIctVm9Gid/Vtn706necmZ7Wj6pgGI2eqplRbEY8O8=
|
||||
github.com/rabbitmq/amqp091-go v1.11.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o=
|
||||
github.com/rclone/Proton-API-Bridge v1.0.3 h1:Bs7RC4xCFSN0BPIYVda/BNxp0qo3NV0gB2VZqx2KIew=
|
||||
github.com/rclone/Proton-API-Bridge v1.0.3/go.mod h1:26RAest751Ofk+F/d8xtl4UyWXrZvMQwn39U8rm/WKM=
|
||||
github.com/rclone/go-proton-api v1.0.2 h1:cJtJUab0MGJ3C6q5kiEJs3pbyhSLnOKMyYOQehA0PBc=
|
||||
github.com/rclone/go-proton-api v1.0.2/go.mod h1:LB2kCEaZMzNn3ocdz+qYfxXmuLxxN0ka62KJd2x53Bc=
|
||||
github.com/rclone/rclone v1.74.3 h1:a2wln7pvEa0tS1WIZJKulEkVjxgC1DkCoyxYydkdiSY=
|
||||
github.com/rclone/rclone v1.74.3/go.mod h1:t5Mh86PO49DD7xlPt0trnK/aNf2Z3M0uip4l1Jqwiv8=
|
||||
github.com/rclone/Proton-API-Bridge v1.0.4 h1:uGQJRjQC1hVLd5kqLsXc6CWO6oqrVeLoKQYoHapEZDg=
|
||||
github.com/rclone/Proton-API-Bridge v1.0.4/go.mod h1:VTPBYZotKAeDLlAzxU2O/s14NXk9FxUt9hn1jhH2iY8=
|
||||
github.com/rclone/go-proton-api v1.0.3 h1:3gBTzR+j0dYiTwtj9yKIdN/aV3W2a8KIPKp0GArojyQ=
|
||||
github.com/rclone/go-proton-api v1.0.3/go.mod h1:QAlkFfswzrBuxvCORWV8rZdddg52hahMN98CFWoFW1E=
|
||||
github.com/rclone/rclone v1.75.0 h1:3ARHem4jXWltvl+b0PvDAG8s6J/inHd5BRzfwMRb3W8=
|
||||
github.com/rclone/rclone v1.75.0/go.mod h1:PGLJUW/WSIJCysALqUcxmaCFyfMXUevf8CbuoOwsAdU=
|
||||
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM=
|
||||
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
|
||||
github.com/rdleal/intervalst v1.5.0 h1:SEB9bCFz5IqD1yhfH1Wv8IBnY/JQxDplwkxHjT6hamU=
|
||||
@@ -1786,8 +1784,8 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
|
||||
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
|
||||
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
|
||||
github.com/rogpeppe/go-internal v1.15.0 h1:D0RCU5rMAp+SpgkiNdrjfJ+LX4J1M32V2NeCY7EJ6hc=
|
||||
github.com/rogpeppe/go-internal v1.15.0/go.mod h1:DrUVZyrJU+txYW5/1kwtXQSMFio52ZOxX7yM1VHvnxs=
|
||||
github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY=
|
||||
github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ=
|
||||
github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w=
|
||||
@@ -1798,8 +1796,8 @@ github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDj
|
||||
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
|
||||
github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc=
|
||||
github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik=
|
||||
github.com/samber/lo v1.52.0 h1:Rvi+3BFHES3A8meP33VPAxiBZX/Aws5RxrschYGjomw=
|
||||
github.com/samber/lo v1.52.0/go.mod h1:4+MXEGsJzbKGaUEQFKBq2xtfuznW9oz/WrgyzMzRoM0=
|
||||
github.com/samber/lo v1.53.0 h1:t975lj2py4kJPQ6haz1QMgtId2gtmfktACxIXArw3HM=
|
||||
github.com/samber/lo v1.53.0/go.mod h1:4+MXEGsJzbKGaUEQFKBq2xtfuznW9oz/WrgyzMzRoM0=
|
||||
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1 h1:PKK9DyHxif4LZo+uQSgXNqs0jj5+xZwwfKHgph2lxBw=
|
||||
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU=
|
||||
github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0=
|
||||
@@ -1845,6 +1843,8 @@ github.com/snabb/httpreaderat v1.0.1 h1:whlb+vuZmyjqVop8x1EKOg05l2NE4z9lsMMXjmSU
|
||||
github.com/snabb/httpreaderat v1.0.1/go.mod h1:lpbGrKDWF37yvRbtRvQsbesS6Ty5c83t8ztannPoMsA=
|
||||
github.com/sony/gobreaker v1.0.0 h1:feX5fGGXSl3dYd4aHZItw+FpHLvvoaqkawKjVNiFMNQ=
|
||||
github.com/sony/gobreaker v1.0.0/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
|
||||
github.com/sony/gobreaker/v2 v2.4.0 h1:g2KJRW1Ubty3+ZOcSEUN7K+REQJdN6yo6XvaML+jptg=
|
||||
github.com/sony/gobreaker/v2 v2.4.0/go.mod h1:pTyFJgcZ3h2tdQVLZZruK2C0eoFL1fb/G83wK1ZQl+s=
|
||||
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw=
|
||||
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U=
|
||||
github.com/spacemonkeygo/monkit/v3 v3.0.25-0.20251022131615-eb24eb109368 h1:GyYC5Ntqk/yy9lEIGE7chdIvt4zP44taycwd9YDSGdc=
|
||||
@@ -1863,8 +1863,8 @@ github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
|
||||
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU=
|
||||
github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY=
|
||||
github.com/spiffe/go-spiffe/v2 v2.6.0 h1:l+DolpxNWYgruGQVV0xsfeya3CsC7m8iBzDnMpsbLuo=
|
||||
github.com/spiffe/go-spiffe/v2 v2.6.0/go.mod h1:gm2SeUoMZEtpnzPNs2Csc0D/gX33k1xIx7lEzqblHEs=
|
||||
github.com/spiffe/go-spiffe/v2 v2.8.1 h1:eXZMLsu+3MLEPJyGJkolqtVrteZfQdUpOWj6LTiDl/E=
|
||||
github.com/spiffe/go-spiffe/v2 v2.8.1/go.mod h1:47Q0Q9/AqGha8QLHp+kxpH4Wca7X7EnOtlIJy3mxZ3U=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
@@ -1894,14 +1894,14 @@ github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8
|
||||
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
|
||||
github.com/substrait-io/substrait v0.87.0 h1:40rP4LejyK6SNQlWz7NX6kQELf8cmScWMBGruWhN4io=
|
||||
github.com/substrait-io/substrait v0.87.0/go.mod h1:MPFNw6sToJgpD5Z2rj0rQrdP/Oq8HG7Z2t3CAEHtkHw=
|
||||
github.com/substrait-io/substrait-go/v8 v8.1.0 h1:58nSM6Qsctke4DIHU2y4aR8FN5YC7syo1mk4zFKAo4U=
|
||||
github.com/substrait-io/substrait-go/v8 v8.1.0/go.mod h1:6GLz9k21udB64g4lLKq8632TKfQCRAVfhuU3NSXtZWY=
|
||||
github.com/substrait-io/substrait-go/v8 v8.1.1 h1:XL7CqVVOQkXP9FRSIm2ylJCjqRASg1yBRcn5nRCRwss=
|
||||
github.com/substrait-io/substrait-go/v8 v8.1.1/go.mod h1:6GLz9k21udB64g4lLKq8632TKfQCRAVfhuU3NSXtZWY=
|
||||
github.com/substrait-io/substrait-protobuf/go v0.85.0 h1:zk6MtNWLtDSl8a7qCZRFH0+EIIXVrrd/hsgYK/SQTgM=
|
||||
github.com/substrait-io/substrait-protobuf/go v0.85.0/go.mod h1:hn+Szm1NmZZc91FwWK9EXD/lmuGBSRTJ5IvHhlG1YnQ=
|
||||
github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965 h1:1oFLiOyVl+W7bnBzGhf7BbIv9loSFQcieWWYIjLqcAw=
|
||||
github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA=
|
||||
github.com/t3rm1n4l/go-mega v0.0.0-20251120131202-6845944c051c h1:dtcOwRimeiBFrlutmF6K94l0rxYFARNFMA+lSQ41C+M=
|
||||
github.com/t3rm1n4l/go-mega v0.0.0-20251120131202-6845944c051c/go.mod h1:BF/l2jNyK+2h/BJZ7VLMAz6m/IWjA2F67gTjV1C/+Bo=
|
||||
github.com/t3rm1n4l/go-mega v0.0.0-20260717075258-c6acd6a5bd04 h1:s30A8dMuZ55lUOi5xUTh1hlfLqHpVBsRMfpk2iKCayk=
|
||||
github.com/t3rm1n4l/go-mega v0.0.0-20260717075258-c6acd6a5bd04/go.mod h1:BF/l2jNyK+2h/BJZ7VLMAz6m/IWjA2F67gTjV1C/+Bo=
|
||||
github.com/tailscale/depaware v0.0.0-20210622194025-720c4b409502/go.mod h1:p9lPsd+cx33L3H9nNoecRRxPssFKUwwI50I3pZ0yT+8=
|
||||
github.com/tarantool/go-iproto v1.1.0 h1:HULVOIHsiehI+FnHfM7wMDntuzUddO09DKqu2WnFQ5A=
|
||||
github.com/tarantool/go-iproto v1.1.0/go.mod h1:LNCtdyZxojUed8SbOiYHoc3v9NvaZTB7p96hUySMlIo=
|
||||
@@ -1931,12 +1931,12 @@ github.com/tikv/pd/client v0.0.0-20230329114254-1948c247c2b1/go.mod h1:3cTcfo8GR
|
||||
github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375 h1:QB54BJwA6x8QU9nHY3xJSZR2kX9bgpZekRKGkLTmEXA=
|
||||
github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375/go.mod h1:xRroudyp5iVtxKqZCrA6n2TLFRBf8bmnjr1UD4x+z7g=
|
||||
github.com/tinylib/msgp v1.1.8/go.mod h1:qkpG+2ldGg4xRFmx+jfTvZPxfGFhi64BcnL9vkCm/Tw=
|
||||
github.com/tinylib/msgp v1.6.3 h1:bCSxiTz386UTgyT1i0MSCvdbWjVW+8sG3PjkGsZQt4s=
|
||||
github.com/tinylib/msgp v1.6.3/go.mod h1:RSp0LW9oSxFut3KzESt5Voq4GVWyS+PSulT77roAqEA=
|
||||
github.com/tklauser/go-sysconf v0.3.16 h1:frioLaCQSsF5Cy1jgRBrzr6t502KIIwQ0MArYICU0nA=
|
||||
github.com/tklauser/go-sysconf v0.3.16/go.mod h1:/qNL9xxDhc7tx3HSRsLWNnuzbVfh3e7gh/BmM179nYI=
|
||||
github.com/tklauser/numcpus v0.11.0 h1:nSTwhKH5e1dMNsCdVBukSZrURJRoHbSEQjdEbY+9RXw=
|
||||
github.com/tklauser/numcpus v0.11.0/go.mod h1:z+LwcLq54uWZTX0u/bGobaV34u6V7KNlTZejzM6/3MQ=
|
||||
github.com/tinylib/msgp v1.6.4 h1:mOwYbyYDLPj35mkA2BjjYejgJk9BuHxDdvRnb6v2ZcQ=
|
||||
github.com/tinylib/msgp v1.6.4/go.mod h1:RSp0LW9oSxFut3KzESt5Voq4GVWyS+PSulT77roAqEA=
|
||||
github.com/tklauser/go-sysconf v0.4.0 h1:7H0uAN+7RkwWRaxhYXDLqa5V3LPrJeV8wmD9dRUgPQU=
|
||||
github.com/tklauser/go-sysconf v0.4.0/go.mod h1:8mTNWyog7H+MpKijp4VmKJAd2bbYQ2zuUwkYRbUArPI=
|
||||
github.com/tklauser/numcpus v0.12.0 h1:NR85qdvHA9pFse3x3weVZ0r0ST8R6l5RHbZrlRaqob4=
|
||||
github.com/tklauser/numcpus v0.12.0/go.mod h1:ABHeXzJnr/qqwguhClkZKT1/8VABcYrsyUiUGobwWJg=
|
||||
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo=
|
||||
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs=
|
||||
github.com/tonistiigi/dchapes-mode v0.0.0-20250318174251-73d941a28323 h1:r0p7fK56l8WPequOaR3i9LBqfPtEdXIQbUTzT55iqT4=
|
||||
@@ -2071,8 +2071,8 @@ github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs=
|
||||
github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s=
|
||||
go.einride.tech/aip v0.83.0 h1:TI21IdeOnLTwZEJ3BxtImIZk6bsN2Q+sd0x99SLiQ+M=
|
||||
go.einride.tech/aip v0.83.0/go.mod h1:E8+wdTApA70odnpFzJgsGogHozC2JCIhFJBKPr8bVig=
|
||||
go.etcd.io/bbolt v1.4.3 h1:dEadXpI6G79deX5prL3QRNP6JB8UxVkqo4UPnHaNXJo=
|
||||
go.etcd.io/bbolt v1.4.3/go.mod h1:tKQlpPaYCVFctUIgFKFnAlvbmB3tpy1vkTnDWohtc0E=
|
||||
go.etcd.io/bbolt v1.5.0 h1:S7GAl7Fxv12yohbwFfIbQCGDWbQbtDGPET4P/bD4lxU=
|
||||
go.etcd.io/bbolt v1.5.0/go.mod h1:mkltfYE5aUHQxUct9N9V+Kp7aSjFqjgrhcXIS70Lrdk=
|
||||
go.etcd.io/etcd/api/v3 v3.6.12 h1:OLOZUKEuAA36TR48F0cIaa8FdzrWygjyfrJxXg4iDgs=
|
||||
go.etcd.io/etcd/api/v3 v3.6.12/go.mod h1:p14EIQXHbuOQbVvL/WEes5uqKnxP9AgKJgpjbMVvzvE=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.6.12 h1:36zzB+pQOdHbhN+kH2iJz/K8bJn0ZLtLfPPO7jozTDo=
|
||||
@@ -2092,14 +2092,14 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
|
||||
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
|
||||
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
|
||||
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
|
||||
go.opentelemetry.io/contrib/detectors/gcp v1.43.0 h1:62yY3dT7/ShwOxzA0RsKRgshBmfElKI4d/Myu2OxDFU=
|
||||
go.opentelemetry.io/contrib/detectors/gcp v1.43.0/go.mod h1:RyaZMFY7yi1kAs45S6mbFGz8O8rqB0dTY14uzvG4LCs=
|
||||
go.opentelemetry.io/contrib/detectors/gcp v1.44.0 h1:NmLfL734pJhM0JKaYd2Y28+nY9dPRWYAAbxhRCrKXPw=
|
||||
go.opentelemetry.io/contrib/detectors/gcp v1.44.0/go.mod h1:tNAsgd8avTGke1+MndXlU5Cru4PQ9Ai/cCNWQv/ZJ/s=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0 h1:0Qx7VGBacMm9ZENQ7TnNObTYI4ShC+lHI16seduaxZo=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0/go.mod h1:Sje3i3MjSPKTSPvVWCaL8ugBzJwik3u4smCjUeuupqg=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0 h1:2pn7OzMewmYRiNtv1doZnLo3gONcnMHlFnmOR8Vgt+8=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0/go.mod h1:rjbQTDEPQymPE0YnRQp9/NuPwwtL0sesz/fnqRW/v84=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0 h1:OyrsyzuttWTSur2qN/Lm0m2a8yqyIjUVBZcxFPuXq2o=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0/go.mod h1:C2NGBr+kAB4bk3xtMXfZ94gqFDtg/GkI7e9zqGh5Beg=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0 h1:8tvICD4vSTOOsNrsI4Ljf6C+6UKvpTEH5XY3JMoyPoo=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0/go.mod h1:z9+yiacE0IHRqM4qFfkbt/JYlmYXgss8GY/jXoNuPJI=
|
||||
go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU=
|
||||
go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.42.0 h1:MdKucPl/HbzckWWEisiNqMPhRrAOQX8r4jTuGr636gk=
|
||||
@@ -2182,9 +2182,6 @@ golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58
|
||||
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
|
||||
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
|
||||
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
|
||||
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
|
||||
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
|
||||
golang.org/x/crypto v0.54.0 h1:YLIA59K4fiNzHzjnZt2tUJQjQtUWfWbeHBqKtk3eScw=
|
||||
golang.org/x/crypto v0.54.0/go.mod h1:KWL8ny2AZdGR2cWmzeHrp2azQPGogOv+HeQaVEXC2dk=
|
||||
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
@@ -2202,8 +2199,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0
|
||||
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
|
||||
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
|
||||
golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
|
||||
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f h1:W3F4c+6OLc6H2lb//N1q4WpJkhzJCK5J6kUi1NTVXfM=
|
||||
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f/go.mod h1:J1xhfL/vlindoeF/aINzNzt2Bket5bjo9sdOYzOsU80=
|
||||
golang.org/x/exp v0.0.0-20260709172345-9ea1abe57597 h1:qLvzZeaANDgyVOA8pyHCOStGlXn0rseXma+GQjeuv2g=
|
||||
golang.org/x/exp v0.0.0-20260709172345-9ea1abe57597/go.mod h1:EdfpwwqSu+0Li0mzskwHU6FWDV3t9Q+RZDo3QMUtL3Q=
|
||||
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
@@ -2217,8 +2214,8 @@ golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9/go.mod h1:023OzeP/+EPmXeap
|
||||
golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
|
||||
golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
|
||||
golang.org/x/image v0.0.0-20220302094943-723b81ca9867/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
|
||||
golang.org/x/image v0.43.0 h1:FLxcP4ec2350nTfOC8ysKtqYSIFbk/QGjw1ZHNP4tsY=
|
||||
golang.org/x/image v0.43.0/go.mod h1:rrpelvGFt+kLPAjPM4HeWPgrl0FtafueU//e5N0qk/Q=
|
||||
golang.org/x/image v0.44.0 h1:+tDekMZED9+LrtB3G5xzRggpVh9CARjZqROla3R3R+I=
|
||||
golang.org/x/image v0.44.0/go.mod h1:V8K3KE9KKKE+pLpQDOeN18w9oacNSvy1tDOirTu4xtY=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
@@ -2250,10 +2247,8 @@ golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/mod v0.37.0 h1:vF1DjpVEshcIqoEaauuHebaLk1O1forxjxBaVn884JQ=
|
||||
golang.org/x/mod v0.37.0/go.mod h1:m8S8VeM9r4dzDwjrKO0a1sZP3YjeMamRRlD+fmR2Q/0=
|
||||
golang.org/x/mod v0.38.0 h1:MECBjubtXD7yj4HrhIUcywNaGeNVUdfVnxmPajOk4yk=
|
||||
golang.org/x/mod v0.38.0/go.mod h1:V6Xz0pq8TQ3dGqVQ1FVHuelZpAL0uNhSkk9ogYP3c40=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
@@ -2318,9 +2313,6 @@ golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
|
||||
golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
|
||||
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
|
||||
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
|
||||
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
|
||||
golang.org/x/net v0.57.0 h1:K5+3DljvIuDG9/Jv9rvyMywYNFCQ9RSUY6OOTTkT+tE=
|
||||
golang.org/x/net v0.57.0/go.mod h1:KpXc8iv+r3XplLAG/f7Jsf9RPszJzdR0f58q9vGOuEU=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
@@ -2371,9 +2363,6 @@ golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||
golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek=
|
||||
golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
||||
golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@@ -2477,12 +2466,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
|
||||
golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
@@ -2495,9 +2480,6 @@ golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
|
||||
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
|
||||
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
|
||||
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
|
||||
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
|
||||
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
|
||||
golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=
|
||||
golang.org/x/term v0.45.0 h1:NwWyBmoJCbfTHpxrWoZ9C6/VxOf7ic219I8xZZFdrf0=
|
||||
golang.org/x/term v0.45.0/go.mod h1:9aqxs0blBcrm/n0L9QW0aRVD+ktan8ssZromtqJC43w=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
@@ -2518,8 +2500,6 @@ golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
|
||||
golang.org/x/text v0.40.0 h1:Ub2Z6/xjgF1WrYQz2nuITOEegKFtiIy+rieRJ5lHZKs=
|
||||
golang.org/x/text v0.40.0/go.mod h1:hpnzDAfGV753zIKo+wk3u1bVKCGPbrnF7+7LBF/UHVY=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
@@ -2598,9 +2578,8 @@ golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s=
|
||||
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
|
||||
golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg=
|
||||
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
|
||||
golang.org/x/tools v0.47.0 h1:7Kn5x/d1svx/PzryTsqeoZN4TZwqeH5pGWjefhLi/1Q=
|
||||
golang.org/x/tools v0.47.0/go.mod h1:dFHnyTvFWY212G+h7ZY4Vsp/K3U4/7W9TyVaAul8uCA=
|
||||
golang.org/x/tools v0.48.0 h1:3+hClM1aLL5mjMKm5ovokw9epgRXPuu2tILgismM6RE=
|
||||
golang.org/x/tools v0.48.0/go.mod h1:08xX0orndb/F7jJxGDicx061tyd5pcMto75YMAXr6lk=
|
||||
golang.org/x/tools/godoc v0.1.0-deprecated h1:o+aZ1BOj6Hsx/GBdJO/s815sqftjSnrZZwyYTHODvtk=
|
||||
golang.org/x/tools/godoc v0.1.0-deprecated/go.mod h1:qM63CriJ961IHWmnWa9CjZnBndniPt4a3CK0PVB9bIg=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
@@ -2815,10 +2794,10 @@ google.golang.org/genproto v0.0.0-20230222225845-10f96fb3dbec/go.mod h1:3Dl5ZL0q
|
||||
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s=
|
||||
google.golang.org/genproto v0.0.0-20260519071638-aa98bba5eb94 h1:YJjbgu+dkp5kUJLfpMyCLfBIWZb/FcJyuLeo1gVBOuo=
|
||||
google.golang.org/genproto v0.0.0-20260519071638-aa98bba5eb94/go.mod h1:RRHjglSYABVCWpQ7USCpdfhcd9t4PkajvVwyynZizTc=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260630182238-925bb5da69e7 h1:jQ9p21COKWjP3VwuFrNRiiOTMh3mPpN45R7SLrH/HUU=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260630182238-925bb5da69e7/go.mod h1:KqHwBx2upmfa1XSi1WuRvC+2VGCLtooKkfmyvRbUmqA=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260706201446-f0a921348800 h1:qEHAMpSaUhtD0p3NbEEI83HwNGFxEwaSJ1G9PLnCBZE=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260706201446-f0a921348800/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260706201446-f0a921348800 h1:admdQBe8jR3VWhBsUrAOaF2Qw6K/+p5pSm1GN8+6Fw4=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260706201446-f0a921348800/go.mod h1:FPk7EXUKMtImne7AmknoYjT4QXqKIzzRbeQIXzLk6fQ=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260715232425-e75dac1f907d h1:Jkpk39hlTZOIp3RbfvNX9R8Hv+Sw0X89nlU/xFOErsc=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260715232425-e75dac1f907d/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||
@@ -2859,8 +2838,8 @@ google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsA
|
||||
google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY=
|
||||
google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw=
|
||||
google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8=
|
||||
google.golang.org/grpc v1.82.1 h1:NnAxzGRA0677vCa4BUkOAnO5+FfQqVl9iUXeD0IqcGE=
|
||||
google.golang.org/grpc v1.82.1/go.mod h1:yzTZ1TB1Z3SG+LIYaI+WiE8D5+PZ3ArnrSp8zF3+/ZA=
|
||||
google.golang.org/grpc v1.84.0-dev.0.20260723093437-b6eac429d7b6 h1:HfjjkdGIa8u9sP9EW5WCygy0kQDuTI/Tax4j//t24Fo=
|
||||
google.golang.org/grpc v1.84.0-dev.0.20260723093437-b6eac429d7b6/go.mod h1:ljCht0DrxQrXBDRTZp52Qxh3Ffk8CdYm2sj4O2QN2C0=
|
||||
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
|
||||
google.golang.org/grpc/examples v0.0.0-20250407062114-b368379ef8f6 h1:ExN12ndbJ608cboPYflpTny6mXSzPrDLh0iTaVrRrds=
|
||||
google.golang.org/grpc/examples v0.0.0-20250407062114-b368379ef8f6/go.mod h1:6ytKWczdvnpnO+m+JiG9NjEDzR1FJfsnmJdG7B8QVZ8=
|
||||
@@ -2894,8 +2873,8 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
|
||||
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/ini.v1 v1.67.3 h1:iM9Lhz5MRSGhHVGGwCuzG9KO8PoirCXj/m/qTmOJJQw=
|
||||
gopkg.in/ini.v1 v1.67.3/go.mod h1:x/cyOwCgZqOkJoDIJ3c1KNHMo10+nLGAhh+kn3Zizss=
|
||||
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc=
|
||||
@@ -3005,17 +2984,17 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||
sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs=
|
||||
sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4=
|
||||
storj.io/common v0.0.0-20260225132117-99155641c30a h1:7gSBQY3vhQMIqi3vfaEXR7mreRjcBLfVsYY0rHIN7P0=
|
||||
storj.io/common v0.0.0-20260225132117-99155641c30a/go.mod h1:kyxwKwlfH4paBZCZt/szvRB770ieAIJF73iDy2DpEHw=
|
||||
storj.io/drpc v0.0.35-0.20250513201419-f7819ea69b55 h1:8OE12DvUnB9lfZcHe7IDGsuhjrY9GBAr964PVHmhsro=
|
||||
storj.io/drpc v0.0.35-0.20250513201419-f7819ea69b55/go.mod h1:Y9LZaa8esL1PW2IDMqJE7CFSNq7d5bQ3RI7mGPtmKMg=
|
||||
storj.io/eventkit v0.0.0-20250410172343-61f26d3de156 h1:5MZ0CyMbG6Pi0rRzUWVG6dvpXjbBYEX2oyXuj+tT+sk=
|
||||
storj.io/eventkit v0.0.0-20250410172343-61f26d3de156/go.mod h1:CpnM6kfZV58dcq3lpbo/IQ4/KoutarnTSHY0GYVwnYw=
|
||||
storj.io/common v0.0.0-20260629224719-ba1bff0a7846 h1:TRtVGWm/Y4KAi4coWMxVpydPvBQKYVhkKMar7wu9Zow=
|
||||
storj.io/common v0.0.0-20260629224719-ba1bff0a7846/go.mod h1:1GZnCZNGbzBzaqhG0cUypQeLfNhNIeNY9JVMMiCF14M=
|
||||
storj.io/drpc v1.0.0 h1:1Xf1KCXXbV1viIfN56eqdJ3cNwpAL7OKwQkpS6ksing=
|
||||
storj.io/drpc v1.0.0/go.mod h1:Y9LZaa8esL1PW2IDMqJE7CFSNq7d5bQ3RI7mGPtmKMg=
|
||||
storj.io/eventkit v0.0.0-20260716074419-6861a92e2aa5 h1:JPguPTktHaha9TBEHvuxZmB+mCkiMPgEMOLfosDoE9o=
|
||||
storj.io/eventkit v0.0.0-20260716074419-6861a92e2aa5/go.mod h1:RdWvp249AGm9FZnVKP88y3hFa7vlx9Jf3Cy1P+4EXIU=
|
||||
storj.io/infectious v0.0.2 h1:rGIdDC/6gNYAStsxsZU79D/MqFjNyJc1tsyyj9sTl7Q=
|
||||
storj.io/infectious v0.0.2/go.mod h1:QEjKKww28Sjl1x8iDsjBpOM4r1Yp8RsowNcItsZJ1Vs=
|
||||
storj.io/picobuf v0.0.4 h1:qswHDla+YZ2TovGtMnU4astjvrADSIz84FXRn0qgP6o=
|
||||
storj.io/picobuf v0.0.4/go.mod h1:hSMxmZc58MS/2qSLy1I0idovlO7+6K47wIGUyRZa6mg=
|
||||
storj.io/uplink v1.14.0 h1:J1yXlt0aRr6kgLTHWXOWosNCFVfbamlcyd+CSxyIczo=
|
||||
storj.io/uplink v1.14.0/go.mod h1:2ysmjzd/1Xtz4VKoErNcSqBQz3UC9WKTVuLMV1cNu6E=
|
||||
storj.io/uplink v1.14.3 h1:b89nziD1JgiF6oya+kDSBsqWp9Dzp5ADCUdhA2e2zvs=
|
||||
storj.io/uplink v1.14.3/go.mod h1:jAe47qR+gRnHW2+3THe4cWJBAj8ARZv4P9mguJRo7C4=
|
||||
tags.cncf.io/container-device-interface v1.1.0 h1:RnxNhxF1JOu6CJUVpetTYvrXHdxw9j9jFYgZpI+anSY=
|
||||
tags.cncf.io/container-device-interface v1.1.0/go.mod h1:76Oj0Yqp9FwTx/pySDc8Bxjpg+VqXfDb50cKAXVJ34Q=
|
||||
@@ -1,6 +1,6 @@
|
||||
apiVersion: v1
|
||||
description: SeaweedFS
|
||||
name: seaweedfs
|
||||
appVersion: "4.40"
|
||||
appVersion: "4.41"
|
||||
# Dev note: Trigger a helm chart release by `git tag -a helm-<version>`
|
||||
version: 4.40.0
|
||||
version: 4.41.0
|
||||
@@ -0,0 +1,93 @@
|
||||
package acl
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func createOwnershipTestBucket(t *testing.T, client *s3.Client) string {
|
||||
bucketName := "test-ownership-" + strings.ToLower(strings.ReplaceAll(time.Now().Format("2006-01-02-15-04-05.000"), ":", "-"))
|
||||
_, err := client.CreateBucket(context.TODO(), &s3.CreateBucketInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
return bucketName
|
||||
}
|
||||
|
||||
func getObjectOwnership(t *testing.T, client *s3.Client, bucketName string) types.ObjectOwnership {
|
||||
t.Helper()
|
||||
resp, err := client.GetBucketOwnershipControls(context.TODO(), &s3.GetBucketOwnershipControlsInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, resp.OwnershipControls)
|
||||
require.Len(t, resp.OwnershipControls.Rules, 1)
|
||||
return resp.OwnershipControls.Rules[0].ObjectOwnership
|
||||
}
|
||||
|
||||
func putObjectOwnership(t *testing.T, client *s3.Client, bucketName string, ownership types.ObjectOwnership) {
|
||||
t.Helper()
|
||||
_, err := client.PutBucketOwnershipControls(context.TODO(), &s3.PutBucketOwnershipControlsInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
OwnershipControls: &types.OwnershipControls{
|
||||
Rules: []types.OwnershipControlsRule{{ObjectOwnership: ownership}},
|
||||
},
|
||||
})
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestGetBucketOwnershipControlsDefault(t *testing.T) {
|
||||
client := getS3Client(t)
|
||||
bucketName := createOwnershipTestBucket(t, client)
|
||||
defer cleanupTestBucket(t, client, bucketName)
|
||||
|
||||
assert.Equal(t, types.ObjectOwnershipBucketOwnerEnforced, getObjectOwnership(t, client, bucketName))
|
||||
}
|
||||
|
||||
func TestBucketOwnershipControlsLifecycle(t *testing.T) {
|
||||
client := getS3Client(t)
|
||||
bucketName := createOwnershipTestBucket(t, client)
|
||||
defer cleanupTestBucket(t, client, bucketName)
|
||||
|
||||
putObjectOwnership(t, client, bucketName, types.ObjectOwnershipObjectWriter)
|
||||
assert.Equal(t, types.ObjectOwnershipObjectWriter, getObjectOwnership(t, client, bucketName))
|
||||
|
||||
putObjectOwnership(t, client, bucketName, types.ObjectOwnershipBucketOwnerEnforced)
|
||||
assert.Equal(t, types.ObjectOwnershipBucketOwnerEnforced, getObjectOwnership(t, client, bucketName))
|
||||
|
||||
_, err := client.DeleteBucketOwnershipControls(context.TODO(), &s3.DeleteBucketOwnershipControlsInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
assert.Equal(t, types.ObjectOwnershipBucketOwnerEnforced, getObjectOwnership(t, client, bucketName))
|
||||
}
|
||||
|
||||
// A bucket with nothing stored already reports BucketOwnerEnforced, so this put has
|
||||
// to persist anyway or the delete below finds nothing to remove.
|
||||
func TestPutBucketOwnershipControlsDefaultOnNewBucket(t *testing.T) {
|
||||
client := getS3Client(t)
|
||||
bucketName := createOwnershipTestBucket(t, client)
|
||||
defer cleanupTestBucket(t, client, bucketName)
|
||||
|
||||
putObjectOwnership(t, client, bucketName, types.ObjectOwnershipBucketOwnerEnforced)
|
||||
|
||||
_, err := client.DeleteBucketOwnershipControls(context.TODO(), &s3.DeleteBucketOwnershipControlsInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
_, err = client.DeleteBucketOwnershipControls(context.TODO(), &s3.DeleteBucketOwnershipControlsInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
})
|
||||
require.Error(t, err)
|
||||
assert.Contains(t, err.Error(), "OwnershipControlsNotFound")
|
||||
}
|
||||
@@ -36,12 +36,65 @@ func TestLifecycleAdminDispatchSucceedsWithCustomFilerGrpcPort(t *testing.T) {
|
||||
|
||||
waitForLifecycleWorkerReady(t, adminEndpoint)
|
||||
|
||||
// Lifecycle is a long-running batch; the run endpoint cancels it at
|
||||
// this timeout, which converts a healthy run into canceled_count=1.
|
||||
const runTimeoutSeconds = 30
|
||||
body, err := json.Marshal(map[string]any{
|
||||
"timeout_seconds": runTimeoutSeconds,
|
||||
})
|
||||
payload := runLifecycleJob(t, adminEndpoint, 30)
|
||||
|
||||
require.GreaterOrEqual(t, jsonNumber(t, payload, "detected_count"), 1)
|
||||
require.Equal(t, 0, jsonNumber(t, payload, "error_count"),
|
||||
"dispatched job errored — likely filer_grpc_address was raw host:httpPort.grpcPort")
|
||||
|
||||
require.Eventuallyf(t, func() bool {
|
||||
_, err := c.HeadObject(context.Background(), &s3.HeadObjectInput{
|
||||
Bucket: aws.String(bucket), Key: aws.String(oldKey),
|
||||
})
|
||||
return err != nil
|
||||
}, 30*time.Second, 500*time.Millisecond,
|
||||
"expected %s/%s to be deleted after admin-dispatched lifecycle run", bucket, oldKey)
|
||||
}
|
||||
|
||||
// A worker-dispatched pass with rules in place but nothing due: the
|
||||
// invariant is that a pass returns on its own, so the admin never has to
|
||||
// cancel it and the executor slot is free for the next one.
|
||||
//
|
||||
// Not a regression test for the wedge this scenario comes from. Before
|
||||
// the subscription was bounded a pass ended only when some write landed
|
||||
// past its boundary, and on a shared test cluster something usually
|
||||
// does — verified: the whole suite passes on the unfixed build. The
|
||||
// deterministic guards are the dailyrun unit tests. This covers the
|
||||
// worker path end-to-end and would catch a pass that hangs
|
||||
// unconditionally.
|
||||
func TestLifecycleAdminDispatchCompletesWithNothingDue(t *testing.T) {
|
||||
adminEndpoint := envOr("ADMIN_ENDPOINT", defaultAdminEndpoint)
|
||||
|
||||
c := s3Client(t)
|
||||
bucket := uniqueBucket("admin-idle")
|
||||
mustCreateBucket(t, c, bucket)
|
||||
putExpirationLifecycle(t, c, bucket, "expire/", 1)
|
||||
// Deliberately not backdated: the rule matches the prefix but nothing
|
||||
// is due, so the pass dispatches nothing.
|
||||
putObject(t, c, bucket, "expire/fresh.txt", "fresh")
|
||||
|
||||
waitForLifecycleWorkerReady(t, adminEndpoint)
|
||||
|
||||
// Let the writes above settle below the pass boundary, or one of them
|
||||
// ends the pass and the wedge is masked.
|
||||
time.Sleep(2 * time.Second)
|
||||
|
||||
payload := runLifecycleJob(t, adminEndpoint, 30)
|
||||
|
||||
require.Equal(t, 0, jsonNumber(t, payload, "canceled_count"),
|
||||
"pass did not return on its own; the admin cancelled it at the run timeout")
|
||||
require.GreaterOrEqual(t, jsonNumber(t, payload, "success_count"), 1,
|
||||
"expected the dispatched pass to complete")
|
||||
require.Equal(t, 0, jsonNumber(t, payload, "skipped_active_count"),
|
||||
"a previous pass still held the executor slot")
|
||||
}
|
||||
|
||||
// runLifecycleJob drives the admin's run endpoint and returns its decoded
|
||||
// response. timeoutSeconds bounds the run admin-side: a pass that never
|
||||
// returns comes back as canceled_count=1 after that long.
|
||||
func runLifecycleJob(t *testing.T, adminEndpoint string, timeoutSeconds int) map[string]any {
|
||||
t.Helper()
|
||||
body, err := json.Marshal(map[string]any{"timeout_seconds": timeoutSeconds})
|
||||
require.NoError(t, err)
|
||||
req, err := http.NewRequestWithContext(
|
||||
context.Background(), http.MethodPost,
|
||||
@@ -59,18 +112,7 @@ func TestLifecycleAdminDispatchSucceedsWithCustomFilerGrpcPort(t *testing.T) {
|
||||
require.NoError(t, json.NewDecoder(resp.Body).Decode(&payload))
|
||||
t.Logf("admin /api/plugin/job-types/s3_lifecycle/run response: %v", payload)
|
||||
require.Equal(t, http.StatusOK, resp.StatusCode, "admin run endpoint failed: %v", payload)
|
||||
|
||||
require.GreaterOrEqual(t, jsonNumber(t, payload, "detected_count"), 1)
|
||||
require.Equal(t, 0, jsonNumber(t, payload, "error_count"),
|
||||
"dispatched job errored — likely filer_grpc_address was raw host:httpPort.grpcPort")
|
||||
|
||||
require.Eventuallyf(t, func() bool {
|
||||
_, err := c.HeadObject(context.Background(), &s3.HeadObjectInput{
|
||||
Bucket: aws.String(bucket), Key: aws.String(oldKey),
|
||||
})
|
||||
return err != nil
|
||||
}, 30*time.Second, 500*time.Millisecond,
|
||||
"expected %s/%s to be deleted after admin-dispatched lifecycle run", bucket, oldKey)
|
||||
return payload
|
||||
}
|
||||
|
||||
func jsonNumber(t *testing.T, payload map[string]any, key string) int {
|
||||
|
||||
@@ -6,8 +6,11 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3"
|
||||
@@ -31,6 +34,152 @@ func suspendVersioning(t *testing.T, client *s3.Client, bucketName string) {
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
// vacuumVolumes asks the master to compact away the needles a delete tombstoned.
|
||||
// Tests that assert a surviving object still has its data need this: deleting an
|
||||
// entry only tombstones the needles it points at, so a shared chunk list reads
|
||||
// fine right up until the vacuum makes the loss permanent. A vacuum that does not
|
||||
// run leaves those tests asserting nothing, so treat every failure as fatal.
|
||||
func vacuumVolumes(t *testing.T) {
|
||||
t.Helper()
|
||||
require.NotEmpty(t, defaultConfig.MasterEndpoint, "vacuum needs a master endpoint; set MASTER_ENDPOINT")
|
||||
endpoint := strings.TrimRight(defaultConfig.MasterEndpoint, "/") + "/vol/vacuum?garbageThreshold=0.001"
|
||||
httpClient := &http.Client{Timeout: 30 * time.Second}
|
||||
resp, err := httpClient.Get(endpoint)
|
||||
require.NoError(t, err, "vacuum request to %s", endpoint)
|
||||
defer resp.Body.Close()
|
||||
_, err = io.Copy(io.Discard, resp.Body)
|
||||
require.NoError(t, err, "reading the vacuum response")
|
||||
require.Equal(t, http.StatusOK, resp.StatusCode, "vacuum request to %s", endpoint)
|
||||
}
|
||||
|
||||
func requireVersionBody(t *testing.T, client *s3.Client, bucketName, objectKey, versionId string, want []byte, msg string) {
|
||||
t.Helper()
|
||||
getResp, err := client.GetObject(context.TODO(), &s3.GetObjectInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Key: aws.String(objectKey),
|
||||
VersionId: aws.String(versionId),
|
||||
})
|
||||
require.NoError(t, err, msg)
|
||||
defer getResp.Body.Close()
|
||||
body, err := io.ReadAll(getResp.Body)
|
||||
require.NoError(t, err, msg)
|
||||
require.Equal(t, len(want), len(body), msg)
|
||||
require.True(t, bytes.Equal(want, body), msg)
|
||||
}
|
||||
|
||||
// chunkedTestContent returns a body large enough to land in volume needles rather
|
||||
// than inline in the filer entry, so a copy that reuses the source fids is visible
|
||||
// once those needles are freed.
|
||||
func chunkedTestContent(size int) []byte {
|
||||
content := make([]byte, size)
|
||||
for i := range content {
|
||||
content[i] = byte(i * 31 % 251)
|
||||
}
|
||||
return content
|
||||
}
|
||||
|
||||
// TestVersioningSelfCopyMetadataReplaceKeepsChunksIndependent covers the copy that
|
||||
// only rewrites metadata: it used to hand the source version's chunk fids to the
|
||||
// new version, so nothing owned those needles and deleting either version freed
|
||||
// the survivor's data (silently, once a vacuum ran).
|
||||
func TestVersioningSelfCopyMetadataReplaceKeepsChunksIndependent(t *testing.T) {
|
||||
client := getS3Client(t)
|
||||
bucketName := getNewBucketName()
|
||||
|
||||
createBucket(t, client, bucketName)
|
||||
defer deleteBucket(t, client, bucketName)
|
||||
|
||||
enableVersioning(t, client, bucketName)
|
||||
|
||||
objectKey := "self-copy-chunk-ownership.bin"
|
||||
content := chunkedTestContent(6 << 20)
|
||||
|
||||
putResp, err := client.PutObject(context.TODO(), &s3.PutObjectInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Key: aws.String(objectKey),
|
||||
Body: bytes.NewReader(content),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, putResp.VersionId)
|
||||
|
||||
copyResp, err := client.CopyObject(context.TODO(), &s3.CopyObjectInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Key: aws.String(objectKey),
|
||||
CopySource: aws.String(versioningCopySource(bucketName, objectKey)),
|
||||
Metadata: map[string]string{"mtime": "1653465360"},
|
||||
MetadataDirective: types.MetadataDirectiveReplace,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, copyResp.VersionId)
|
||||
require.NotEqual(t, *putResp.VersionId, *copyResp.VersionId)
|
||||
|
||||
_, err = client.DeleteObject(context.TODO(), &s3.DeleteObjectInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Key: aws.String(objectKey),
|
||||
VersionId: putResp.VersionId,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
// The filer frees a deleted entry's chunks asynchronously, so re-check across
|
||||
// a few vacuum rounds instead of racing a single one.
|
||||
for round := 0; round < 4; round++ {
|
||||
time.Sleep(time.Second)
|
||||
vacuumVolumes(t)
|
||||
requireVersionBody(t, client, bucketName, objectKey, *copyResp.VersionId, content,
|
||||
"the surviving version must keep its own data after the other version is deleted")
|
||||
}
|
||||
}
|
||||
|
||||
// TestSuspendedSelfCopyMetadataReplaceKeepsChunksIndependent is the same defect on
|
||||
// a suspended bucket: the null version the copy writes sits beside a .versions/
|
||||
// entry that stays live, so the two must not share needles either.
|
||||
func TestSuspendedSelfCopyMetadataReplaceKeepsChunksIndependent(t *testing.T) {
|
||||
client := getS3Client(t)
|
||||
bucketName := getNewBucketName()
|
||||
|
||||
createBucket(t, client, bucketName)
|
||||
defer deleteBucket(t, client, bucketName)
|
||||
|
||||
enableVersioning(t, client, bucketName)
|
||||
|
||||
objectKey := "suspended-self-copy-chunk-ownership.bin"
|
||||
content := chunkedTestContent(6 << 20)
|
||||
|
||||
putResp, err := client.PutObject(context.TODO(), &s3.PutObjectInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Key: aws.String(objectKey),
|
||||
Body: bytes.NewReader(content),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, putResp.VersionId)
|
||||
|
||||
suspendVersioning(t, client, bucketName)
|
||||
|
||||
_, err = client.CopyObject(context.TODO(), &s3.CopyObjectInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Key: aws.String(objectKey),
|
||||
CopySource: aws.String(versioningCopySource(bucketName, objectKey)),
|
||||
Metadata: map[string]string{"mtime": "1653465360"},
|
||||
MetadataDirective: types.MetadataDirectiveReplace,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
// Drop the version the copy read from; the null version it wrote must survive.
|
||||
_, err = client.DeleteObject(context.TODO(), &s3.DeleteObjectInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Key: aws.String(objectKey),
|
||||
VersionId: putResp.VersionId,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
for round := 0; round < 4; round++ {
|
||||
time.Sleep(time.Second)
|
||||
vacuumVolumes(t)
|
||||
requireVersionBody(t, client, bucketName, objectKey, "null", content,
|
||||
"the null version must keep its own data after the version it was copied from is deleted")
|
||||
}
|
||||
}
|
||||
|
||||
func TestVersioningSelfCopyMetadataReplaceCreatesNewVersion(t *testing.T) {
|
||||
client := getS3Client(t)
|
||||
bucketName := getNewBucketName()
|
||||
@@ -250,3 +399,59 @@ func TestSelfCopyWithSuspendedVersioningIsRejected(t *testing.T) {
|
||||
assert.Equal(t, "InvalidRequest", apiErr.ErrorCode())
|
||||
}
|
||||
}
|
||||
|
||||
// A suspended-versioning CopyObject writes the null version at the regular path, so
|
||||
// like PutObject and multipart completion it has to retire the null delete marker a
|
||||
// preceding DELETE left in .versions. While the regular-path object owns the null
|
||||
// slot the leftover marker is shadowed, but it resurfaces as a phantom delete the
|
||||
// moment that null version goes away.
|
||||
func TestSuspendedCopyRetiresDeleteMarker(t *testing.T) {
|
||||
client := getS3Client(t)
|
||||
bucketName := getNewBucketName()
|
||||
|
||||
createBucket(t, client, bucketName)
|
||||
defer deleteBucket(t, client, bucketName)
|
||||
|
||||
sourceKey := "suspended-copy-source.txt"
|
||||
objectKey := "suspended-copy-dest.txt"
|
||||
|
||||
enableVersioning(t, client, bucketName)
|
||||
putObject(t, client, bucketName, objectKey, "pre-suspension-content")
|
||||
suspendVersioning(t, client, bucketName)
|
||||
|
||||
putObject(t, client, bucketName, sourceKey, "source-content")
|
||||
putObject(t, client, bucketName, objectKey, "null-version-content")
|
||||
deleteKey(t, client, bucketName, objectKey)
|
||||
|
||||
_, err := client.CopyObject(context.TODO(), &s3.CopyObjectInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Key: aws.String(objectKey),
|
||||
CopySource: aws.String(versioningCopySource(bucketName, sourceKey)),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
getResp, err := client.GetObject(context.TODO(), &s3.GetObjectInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Key: aws.String(objectKey),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
defer getResp.Body.Close()
|
||||
body, err := io.ReadAll(getResp.Body)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "source-content", string(body))
|
||||
|
||||
// Drop the null version the copy just wrote; a retired marker leaves nothing behind.
|
||||
_, err = client.DeleteObject(context.TODO(), &s3.DeleteObjectInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Key: aws.String(objectKey),
|
||||
VersionId: aws.String("null"),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
listResp, err := client.ListObjectVersions(context.TODO(), &s3.ListObjectVersionsInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Prefix: aws.String(objectKey),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
assert.Empty(t, listResp.DeleteMarkers, "the copy should have retired the null delete marker")
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package s3api
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"testing"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
@@ -12,8 +13,8 @@ import (
|
||||
)
|
||||
|
||||
// TestDeletedDirectoryMarkerDisappears covers the rclone directory_markers flow: a key
|
||||
// created with PutObject on "m2/" is deleted, and every current-version surface has to
|
||||
// agree it is gone even though the filer directory that carries it survives.
|
||||
// created with PutObject on "m2/" is deleted, and stops being a key everywhere. The
|
||||
// directory that carried it goes with it once nothing is left underneath.
|
||||
func TestDeletedDirectoryMarkerDisappears(t *testing.T) {
|
||||
client := getS3Client(t)
|
||||
bucketName := getNewBucketName()
|
||||
@@ -24,7 +25,6 @@ func TestDeletedDirectoryMarkerDisappears(t *testing.T) {
|
||||
|
||||
putObject(t, client, bucketName, "m2/", "")
|
||||
putObject(t, client, bucketName, "m2/f.txt", "hi")
|
||||
|
||||
assert.Equal(t, []string{"m2/", "m2/f.txt"}, listKeys(t, client, bucketName, ""))
|
||||
|
||||
deleteKey(t, client, bucketName, "m2/f.txt")
|
||||
@@ -32,39 +32,22 @@ func TestDeletedDirectoryMarkerDisappears(t *testing.T) {
|
||||
|
||||
assert.Empty(t, listKeys(t, client, bucketName, ""), "the deleted marker is not a key")
|
||||
assert.Empty(t, listPrefixes(t, client, bucketName, ""), "and it names no prefix")
|
||||
assert.Empty(t, listKeys(t, client, bucketName, "m2/"), "prefix=m2/ answers empty")
|
||||
|
||||
_, err := client.HeadObject(context.TODO(), &s3.HeadObjectInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Key: aws.String("m2/"),
|
||||
})
|
||||
require.Error(t, err, "HEAD on a deleted directory marker must not answer 200")
|
||||
_, err = client.GetObject(context.TODO(), &s3.GetObjectInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Key: aws.String("m2/"),
|
||||
})
|
||||
requireAPIError(t, err, "NoSuchKey")
|
||||
|
||||
// The key appears once in the version listing, as its delete marker.
|
||||
// The file's own version history is untouched by deleting the directory key.
|
||||
versions, err := client.ListObjectVersions(context.TODO(), &s3.ListObjectVersionsInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Prefix: aws.String("m2/"),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
latest := 0
|
||||
for _, v := range versions.Versions {
|
||||
if *v.Key == "m2/" && *v.IsLatest {
|
||||
latest++
|
||||
}
|
||||
assert.NotEqual(t, "m2/", *v.Key, "a directory marker is not a versioned object")
|
||||
}
|
||||
for _, m := range versions.DeleteMarkers {
|
||||
if *m.Key == "m2/" && *m.IsLatest {
|
||||
latest++
|
||||
}
|
||||
assert.NotEqual(t, "m2/", *m.Key, "deleting one writes no delete marker")
|
||||
}
|
||||
assert.Equal(t, 1, latest, "exactly one version of m2/ is the latest")
|
||||
assert.Len(t, versions.Versions, 1, "m2/f.txt keeps its version")
|
||||
assert.Len(t, versions.DeleteMarkers, 1, "and its delete marker")
|
||||
|
||||
// Re-creating the marker retires the delete marker and keeps the history.
|
||||
// Re-creating the marker brings the key back.
|
||||
putObject(t, client, bucketName, "m2/", "")
|
||||
assert.Equal(t, []string{"m2/"}, listKeys(t, client, bucketName, ""))
|
||||
_, err = client.HeadObject(context.TODO(), &s3.HeadObjectInput{
|
||||
@@ -72,18 +55,6 @@ func TestDeletedDirectoryMarkerDisappears(t *testing.T) {
|
||||
Key: aws.String("m2/"),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
versions, err = client.ListObjectVersions(context.TODO(), &s3.ListObjectVersionsInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Prefix: aws.String("m2/"),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
assert.NotEmpty(t, versions.DeleteMarkers, "the delete marker stays in the history")
|
||||
for _, m := range versions.DeleteMarkers {
|
||||
if *m.Key == "m2/" {
|
||||
assert.False(t, *m.IsLatest, "the delete marker is no longer current")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TestDeletedDirectoryMarkerKeepsItsSubtree pins the boundary: deleting the key "m2/"
|
||||
@@ -101,29 +72,102 @@ func TestDeletedDirectoryMarkerKeepsItsSubtree(t *testing.T) {
|
||||
|
||||
deleteKey(t, client, bucketName, "m2/")
|
||||
|
||||
assert.Equal(t, []string{"m2/keep.txt"}, listKeys(t, client, bucketName, ""))
|
||||
assert.Equal(t, []string{"m2/keep.txt"}, listKeys(t, client, bucketName, ""), "the marker key is gone")
|
||||
assert.Equal(t, []string{"m2/"}, listPrefixes(t, client, bucketName, ""),
|
||||
"a live child keeps the prefix even though the marker key is gone")
|
||||
"a live child keeps the prefix")
|
||||
assert.Equal(t, []string{"m2/keep.txt"}, listKeys(t, client, bucketName, "m2/"))
|
||||
|
||||
// The surviving object is still readable through the prefix that no longer has a key.
|
||||
got, err := client.GetObject(context.TODO(), &s3.GetObjectInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Key: aws.String("m2/keep.txt"),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, got.Body.Close())
|
||||
}
|
||||
|
||||
// TestDirectoryMarkerSurvivesWithoutVersioning guards the unversioned path, which has no
|
||||
// history to consult and must keep answering as before.
|
||||
func TestDirectoryMarkerSurvivesWithoutVersioning(t *testing.T) {
|
||||
// TestDeletedDirectoryMarkerIsGoneFromReads checks the read surfaces once nothing is
|
||||
// left under the deleted key: the directory goes with it, so the path is not there.
|
||||
func TestDeletedDirectoryMarkerIsGoneFromReads(t *testing.T) {
|
||||
client := getS3Client(t)
|
||||
bucketName := getNewBucketName()
|
||||
|
||||
createBucket(t, client, bucketName)
|
||||
defer deleteBucket(t, client, bucketName)
|
||||
enableVersioning(t, client, bucketName)
|
||||
|
||||
putObject(t, client, bucketName, "m2/", "")
|
||||
assert.Equal(t, []string{"m2/"}, listKeys(t, client, bucketName, ""))
|
||||
deleteKey(t, client, bucketName, "m2/")
|
||||
|
||||
_, err := client.HeadObject(context.TODO(), &s3.HeadObjectInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Key: aws.String("m2/"),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
require.Error(t, err, "HEAD on a deleted directory marker must not answer 200")
|
||||
_, err = client.GetObject(context.TODO(), &s3.GetObjectInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Key: aws.String("m2/"),
|
||||
})
|
||||
requireAPIError(t, err, "NoSuchKey")
|
||||
assert.Empty(t, listKeys(t, client, bucketName, "m2/"))
|
||||
}
|
||||
|
||||
// TestDirectoryMarkerDeleteMatchesUnversioned pins the point of the change: a directory
|
||||
// marker is deleted the same way whether or not the bucket is versioned.
|
||||
func TestDirectoryMarkerDeleteMatchesUnversioned(t *testing.T) {
|
||||
client := getS3Client(t)
|
||||
|
||||
for _, versioned := range []bool{false, true} {
|
||||
bucketName := getNewBucketName()
|
||||
createBucket(t, client, bucketName)
|
||||
if versioned {
|
||||
enableVersioning(t, client, bucketName)
|
||||
}
|
||||
|
||||
putObject(t, client, bucketName, "m/", "")
|
||||
putObject(t, client, bucketName, "m/child.txt", "x")
|
||||
deleteKey(t, client, bucketName, "m/")
|
||||
|
||||
assert.Equal(t, []string{"m/child.txt"}, listKeys(t, client, bucketName, ""),
|
||||
"versioned=%v: the marker key is gone, the child stays", versioned)
|
||||
assert.Equal(t, []string{"m/"}, listPrefixes(t, client, bucketName, ""),
|
||||
"versioned=%v: the prefix survives its live child", versioned)
|
||||
|
||||
deleteBucket(t, client, bucketName)
|
||||
}
|
||||
}
|
||||
|
||||
// TestDeleteDirectoryMarkerSparesAPromotedFile guards the sharp edge of storing a key
|
||||
// on a directory entry: writing under an existing object turns that object's entry into
|
||||
// a directory while it keeps its data, so "m2/" and "m2" end up on the same entry. They
|
||||
// are still different keys, and deleting one must not destroy the other.
|
||||
func TestDeleteDirectoryMarkerSparesAPromotedFile(t *testing.T) {
|
||||
client := getS3Client(t)
|
||||
|
||||
for _, versioned := range []bool{false, true} {
|
||||
bucketName := getNewBucketName()
|
||||
createBucket(t, client, bucketName)
|
||||
|
||||
putObject(t, client, bucketName, "m2", "important data")
|
||||
if versioned {
|
||||
enableVersioning(t, client, bucketName)
|
||||
}
|
||||
putObject(t, client, bucketName, "m2/child.txt", "child")
|
||||
|
||||
deleteKey(t, client, bucketName, "m2/")
|
||||
|
||||
got, err := client.GetObject(context.TODO(), &s3.GetObjectInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Key: aws.String("m2"),
|
||||
})
|
||||
require.NoError(t, err, "versioned=%v: deleting m2/ must not delete m2", versioned)
|
||||
body, err := io.ReadAll(got.Body)
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, got.Body.Close())
|
||||
assert.Equal(t, "important data", string(body), "versioned=%v", versioned)
|
||||
|
||||
deleteBucket(t, client, bucketName)
|
||||
}
|
||||
}
|
||||
|
||||
func listObjects(t *testing.T, client *s3.Client, bucketName, prefix, delimiter string) *s3.ListObjectsV2Output {
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
@@ -80,3 +81,93 @@ func TestSuspendedDeleteCreatesDeleteMarker(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "versioned-content", string(body))
|
||||
}
|
||||
|
||||
// A suspended-versioning completion must drop the null delete marker a preceding
|
||||
// DELETE left in .versions, or it reports 200 and the object lists while HEAD/GET
|
||||
// keep resolving the marker and answer NoSuchKey.
|
||||
func TestSuspendedMultipartOverwritesDeleteMarker(t *testing.T) {
|
||||
client := getS3Client(t)
|
||||
bucketName := getNewBucketName()
|
||||
|
||||
createBucket(t, client, bucketName)
|
||||
defer deleteBucket(t, client, bucketName)
|
||||
|
||||
objectKey := "suspended-multipart-after-delete.bin"
|
||||
partData := bytes.Repeat([]byte("a"), 5*1024*1024)
|
||||
|
||||
// The cleanup retires only the null version, never the key's real history.
|
||||
enableVersioning(t, client, bucketName)
|
||||
realVersion := putObject(t, client, bucketName, objectKey, "pre-suspension-content")
|
||||
require.NotNil(t, realVersion.VersionId)
|
||||
suspendVersioning(t, client, bucketName)
|
||||
|
||||
completeSuspendedMultipart := func() {
|
||||
t.Helper()
|
||||
createResp, err := client.CreateMultipartUpload(context.TODO(), &s3.CreateMultipartUploadInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Key: aws.String(objectKey),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
uploadResp, err := client.UploadPart(context.TODO(), &s3.UploadPartInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Key: aws.String(objectKey),
|
||||
UploadId: createResp.UploadId,
|
||||
PartNumber: aws.Int32(1),
|
||||
Body: bytes.NewReader(partData),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
_, err = client.CompleteMultipartUpload(context.TODO(), &s3.CompleteMultipartUploadInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Key: aws.String(objectKey),
|
||||
UploadId: createResp.UploadId,
|
||||
MultipartUpload: &types.CompletedMultipartUpload{
|
||||
Parts: []types.CompletedPart{{ETag: uploadResp.ETag, PartNumber: aws.Int32(1)}},
|
||||
},
|
||||
})
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
completeSuspendedMultipart()
|
||||
deleteKey(t, client, bucketName, objectKey)
|
||||
completeSuspendedMultipart()
|
||||
|
||||
headResp := headObject(t, client, bucketName, objectKey)
|
||||
require.NotNil(t, headResp.ContentLength)
|
||||
assert.Equal(t, int64(len(partData)), *headResp.ContentLength)
|
||||
|
||||
getResp, err := client.GetObject(context.TODO(), &s3.GetObjectInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Key: aws.String(objectKey),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
defer getResp.Body.Close()
|
||||
written, err := io.Copy(io.Discard, getResp.Body)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, int64(len(partData)), written)
|
||||
|
||||
listResp, err := client.ListObjectVersions(context.TODO(), &s3.ListObjectVersionsInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Prefix: aws.String(objectKey),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
assert.Empty(t, listResp.DeleteMarkers)
|
||||
|
||||
var listedVersionIds []string
|
||||
for _, version := range listResp.Versions {
|
||||
listedVersionIds = append(listedVersionIds, aws.ToString(version.VersionId))
|
||||
}
|
||||
assert.ElementsMatch(t, []string{*realVersion.VersionId, "null"}, listedVersionIds)
|
||||
|
||||
realVersionResp, err := client.GetObject(context.TODO(), &s3.GetObjectInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Key: aws.String(objectKey),
|
||||
VersionId: realVersion.VersionId,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
defer realVersionResp.Body.Close()
|
||||
realVersionBody, err := io.ReadAll(realVersionResp.Body)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "pre-suspension-content", string(realVersionBody))
|
||||
}
|
||||
@@ -8,6 +8,8 @@ import (
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
// TestSuspendedVersioningNullOverwrite tests the scenario where:
|
||||
@@ -255,3 +257,41 @@ func TestEnabledVersioningReturnsVersionId(t *testing.T) {
|
||||
t.Logf(" Version %d: VersionId=%s, Size=%d, IsLatest=%v", i, *v.VersionId, v.Size, v.IsLatest)
|
||||
}
|
||||
}
|
||||
|
||||
// The suspended PUT retires the null delete marker a preceding DELETE left, the same
|
||||
// as the copy and multipart paths. While the regular-path object owns the null slot a
|
||||
// leftover marker is shadowed, so it only shows once that null version goes away.
|
||||
func TestSuspendedPutRetiresDeleteMarker(t *testing.T) {
|
||||
client := getS3Client(t)
|
||||
bucketName := getNewBucketName()
|
||||
|
||||
createBucket(t, client, bucketName)
|
||||
defer deleteBucket(t, client, bucketName)
|
||||
|
||||
objectKey := "suspended-put-after-delete.txt"
|
||||
|
||||
enableVersioning(t, client, bucketName)
|
||||
putObject(t, client, bucketName, objectKey, "pre-suspension-content")
|
||||
suspendVersioning(t, client, bucketName)
|
||||
|
||||
putObject(t, client, bucketName, objectKey, "null-version-content")
|
||||
deleteKey(t, client, bucketName, objectKey)
|
||||
putObject(t, client, bucketName, objectKey, "replacement-content")
|
||||
|
||||
headObject(t, client, bucketName, objectKey)
|
||||
|
||||
// Drop the null version just written; a retired marker leaves nothing behind.
|
||||
_, err := client.DeleteObject(context.TODO(), &s3.DeleteObjectInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Key: aws.String(objectKey),
|
||||
VersionId: aws.String("null"),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
listResp, err := client.ListObjectVersions(context.TODO(), &s3.ListObjectVersionsInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Prefix: aws.String(objectKey),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
assert.Empty(t, listResp.DeleteMarkers, "the suspended PUT should have retired the null delete marker")
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package filer
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
|
||||
@@ -159,6 +160,51 @@ func (entry *Entry) IsExpireS3Enabled() (exist bool) {
|
||||
return exist
|
||||
}
|
||||
|
||||
func (entry *Entry) isS3Entry() bool {
|
||||
if entry.Extended == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
if _, found := entry.Extended[s3_constants.ExtAmzOwnerKey]; found {
|
||||
return true
|
||||
}
|
||||
|
||||
if _, found := entry.Extended[s3_constants.ExtETagKey]; found {
|
||||
return true
|
||||
}
|
||||
|
||||
for key := range entry.Extended {
|
||||
if strings.HasPrefix(key, s3_constants.ExtAmzPrefix) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (entry *Entry) ApplyS3ExpiryMetadata() {
|
||||
if entry.TtlSec == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
if _, found := entry.Extended[s3_constants.SeaweedFSExpiresS3]; found {
|
||||
return
|
||||
}
|
||||
|
||||
// The s3 expiry path skips versioned entries, so stamping one would drop its
|
||||
// expiry entirely instead of moving it onto mtime.
|
||||
if entry.IsS3Versioning() {
|
||||
return
|
||||
}
|
||||
|
||||
if !entry.isS3Entry() {
|
||||
return
|
||||
}
|
||||
|
||||
entry.Extended[s3_constants.SeaweedFSExpiresS3] = []byte("true")
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (entry *Entry) IsS3Versioning() (exist bool) {
|
||||
if entry.Extended != nil {
|
||||
_, exist = entry.Extended[s3_constants.ExtVersionIdKey]
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
package filer
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants"
|
||||
)
|
||||
|
||||
func TestApplyS3ExpiryMetadata(t *testing.T) {
|
||||
for _, tc := range []struct {
|
||||
name string
|
||||
ttlSec int32
|
||||
extended map[string][]byte
|
||||
want bool
|
||||
}{
|
||||
{
|
||||
name: "s3 entry with ttl",
|
||||
ttlSec: 3600,
|
||||
extended: map[string][]byte{s3_constants.ExtETagKey: []byte("abc123")},
|
||||
want: true,
|
||||
},
|
||||
{
|
||||
name: "no ttl",
|
||||
extended: map[string][]byte{s3_constants.ExtETagKey: []byte("abc123")},
|
||||
},
|
||||
{
|
||||
name: "not an s3 entry",
|
||||
ttlSec: 3600,
|
||||
},
|
||||
{
|
||||
name: "versioned entry keeps crtime expiry",
|
||||
ttlSec: 3600,
|
||||
extended: map[string][]byte{
|
||||
s3_constants.ExtETagKey: []byte("abc123"),
|
||||
s3_constants.ExtVersionIdKey: []byte("v1"),
|
||||
},
|
||||
},
|
||||
} {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
entry := &Entry{Attr: Attr{TtlSec: tc.ttlSec}, Extended: tc.extended}
|
||||
entry.ApplyS3ExpiryMetadata()
|
||||
if got := entry.IsExpireS3Enabled(); got != tc.want {
|
||||
t.Fatalf("IsExpireS3Enabled() = %v, want %v", got, tc.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
package iamapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/sha256"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/seaweedfs/seaweedfs/weed/credential"
|
||||
"github.com/seaweedfs/seaweedfs/weed/credential/memory"
|
||||
"github.com/seaweedfs/seaweedfs/weed/filer"
|
||||
"github.com/seaweedfs/seaweedfs/weed/pb/iam_pb"
|
||||
"github.com/seaweedfs/seaweedfs/weed/s3api"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
// A data-plane identity holding nothing but the equivalent of AmazonS3FullAccess,
|
||||
// and an admin, so the same request can be run from both sides. The admin key is
|
||||
// obviously fake to keep secret scanners quiet.
|
||||
const authzConfigJSON = `{
|
||||
"identities": [
|
||||
{
|
||||
"name": "power_user",
|
||||
"credentials": [{"accessKey": "AKIAIOSFODNN7EXAMPLE", "secretKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"}],
|
||||
"policyNames": ["PowerUserPolicy"]
|
||||
},
|
||||
{
|
||||
"name": "iam_admin",
|
||||
"credentials": [{"accessKey": "AKIATESTFAKEADMIN0001", "secretKey": "testAdminSecretFake0000000000000000000000"}],
|
||||
"actions": ["Admin"]
|
||||
}
|
||||
],
|
||||
"policies": [
|
||||
{
|
||||
"name": "PowerUserPolicy",
|
||||
"content": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"s3:*\",\"Resource\":\"*\"}]}"
|
||||
}
|
||||
]
|
||||
}`
|
||||
|
||||
func newAuthzTestServer(t *testing.T) *httptest.Server {
|
||||
t.Helper()
|
||||
|
||||
config := &iam_pb.S3ApiConfiguration{}
|
||||
require.NoError(t, filer.ParseS3ConfigurationFromBytes([]byte(authzConfigJSON), config))
|
||||
|
||||
store := &memory.MemoryStore{}
|
||||
require.NoError(t, store.Initialize(nil, ""))
|
||||
cm := &credential.CredentialManager{Store: store}
|
||||
require.NoError(t, cm.SaveConfiguration(context.Background(), config))
|
||||
|
||||
iam := &s3api.IdentityAccessManagement{}
|
||||
iam.SetCredentialManagerForTest(cm)
|
||||
require.NoError(t, iam.LoadS3ApiConfigurationFromBytes([]byte(authzConfigJSON)))
|
||||
|
||||
iama := &IamApiServer{
|
||||
iam: iam,
|
||||
s3ApiConfig: &countingConfigSaver{cm: cm},
|
||||
}
|
||||
router := mux.NewRouter().SkipClean(true)
|
||||
iama.registerRouter(router)
|
||||
|
||||
server := httptest.NewServer(router)
|
||||
t.Cleanup(server.Close)
|
||||
return server
|
||||
}
|
||||
|
||||
func postSignedIamAction(t *testing.T, serverURL, accessKey, secretKey, rawQuery, body string) *http.Response {
|
||||
t.Helper()
|
||||
|
||||
url := serverURL + "/"
|
||||
if rawQuery != "" {
|
||||
url += "?" + rawQuery
|
||||
}
|
||||
req, err := http.NewRequest(http.MethodPost, url, strings.NewReader(body))
|
||||
require.NoError(t, err)
|
||||
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||
|
||||
payloadHash := fmt.Sprintf("%x", sha256.Sum256([]byte(body)))
|
||||
require.NoError(t, v4.NewSigner().SignHTTP(context.Background(),
|
||||
aws.Credentials{AccessKeyID: accessKey, SecretAccessKey: secretKey},
|
||||
req, payloadHash, "iam", "us-east-1", time.Now()))
|
||||
|
||||
resp, err := http.DefaultClient.Do(req)
|
||||
require.NoError(t, err)
|
||||
t.Cleanup(func() { resp.Body.Close() })
|
||||
return resp
|
||||
}
|
||||
|
||||
// An S3 data-plane policy grants no IAM management, however broad it is: the
|
||||
// standalone server used to check these actions as a coarse S3 action, which
|
||||
// such a policy matches.
|
||||
func TestIamManagementDeniedForDataPlanePolicy(t *testing.T) {
|
||||
server := newAuthzTestServer(t)
|
||||
|
||||
for _, action := range []string{"CreateUser", "CreateAccessKey", "PutUserPolicy", "AttachUserPolicy"} {
|
||||
t.Run(action, func(t *testing.T) {
|
||||
resp := postSignedIamAction(t, server.URL, "AKIAIOSFODNN7EXAMPLE", "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
|
||||
"", "Action="+action+"&UserName=victim&Version=2010-05-08")
|
||||
assert.Equal(t, http.StatusForbidden, resp.StatusCode)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Same expectation when the request carries an S3 query parameter, which the
|
||||
// action resolver used to read even for an IAM action.
|
||||
func TestIamManagementDeniedWithS3QueryParameter(t *testing.T) {
|
||||
server := newAuthzTestServer(t)
|
||||
|
||||
for _, rawQuery := range []string{"delete", "acl", "tagging", "policy"} {
|
||||
t.Run(rawQuery, func(t *testing.T) {
|
||||
resp := postSignedIamAction(t, server.URL, "AKIAIOSFODNN7EXAMPLE", "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
|
||||
rawQuery, "Action=CreateUser&UserName=victim&Version=2010-05-08")
|
||||
assert.Equal(t, http.StatusForbidden, resp.StatusCode)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Self-service still works without an IAM grant, matching AWS and the embedded
|
||||
// IAM surface: a user may rotate its own access keys.
|
||||
func TestIamSelfServiceAllowedForDataPlanePolicy(t *testing.T) {
|
||||
server := newAuthzTestServer(t)
|
||||
|
||||
resp := postSignedIamAction(t, server.URL, "AKIAIOSFODNN7EXAMPLE", "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
|
||||
"", "Action=ListAccessKeys&Version=2010-05-08")
|
||||
assert.Equal(t, http.StatusOK, resp.StatusCode)
|
||||
}
|
||||
|
||||
func TestIamManagementAllowedForAdmin(t *testing.T) {
|
||||
server := newAuthzTestServer(t)
|
||||
|
||||
resp := postSignedIamAction(t, server.URL, "AKIATESTFAKEADMIN0001", "testAdminSecretFake0000000000000000000000",
|
||||
"", "Action=CreateUser&UserName=new-user&Version=2010-05-08")
|
||||
assert.Equal(t, http.StatusOK, resp.StatusCode)
|
||||
}
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
"github.com/seaweedfs/seaweedfs/weed/pb/iam_pb"
|
||||
"github.com/seaweedfs/seaweedfs/weed/s3api"
|
||||
"github.com/seaweedfs/seaweedfs/weed/s3api/policy_engine"
|
||||
. "github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants"
|
||||
"github.com/seaweedfs/seaweedfs/weed/s3api/s3err"
|
||||
"github.com/seaweedfs/seaweedfs/weed/util"
|
||||
util_http "github.com/seaweedfs/seaweedfs/weed/util/http"
|
||||
@@ -124,10 +123,7 @@ func (iama *IamApiServer) registerRouter(router *mux.Router) {
|
||||
// API Router
|
||||
apiRouter := router.PathPrefix("/").Subrouter()
|
||||
apiRouter.Use(request_id.Middleware)
|
||||
// ListBuckets
|
||||
|
||||
// apiRouter.Methods("GET").Path("/").HandlerFunc(track(s3a.iam.Auth(s3a.ListBucketsHandler, ACTION_ADMIN), "LIST"))
|
||||
apiRouter.Methods(http.MethodPost).Path("/").HandlerFunc(iama.iam.Auth(iama.DoActions, ACTION_ADMIN))
|
||||
apiRouter.Methods(http.MethodPost).Path("/").HandlerFunc(iama.iam.AuthIamManagement(iama.DoActions))
|
||||
|
||||
// Health probes
|
||||
apiRouter.Methods(http.MethodGet, http.MethodHead).Path("/healthz").HandlerFunc(iama.healthzHandler)
|
||||
|
||||
@@ -71,6 +71,15 @@ func UploadReaderInChunks(ctx context.Context, reader io.Reader, opt *ChunkedUpl
|
||||
const bytesBufferCounter = 4
|
||||
bytesBufferLimitChan := make(chan struct{}, bytesBufferCounter)
|
||||
|
||||
// objectFailed reports whether another chunk has already doomed the upload,
|
||||
// so an in-flight chunk stops spending its retry budget on bytes nobody
|
||||
// will reference.
|
||||
objectFailed := func() bool {
|
||||
uploadErrLock.Lock()
|
||||
defer uploadErrLock.Unlock()
|
||||
return uploadErr != nil
|
||||
}
|
||||
|
||||
uploadLoop:
|
||||
for {
|
||||
// Throttle buffer usage
|
||||
@@ -192,35 +201,31 @@ uploadLoop:
|
||||
var uploadResult *UploadResult
|
||||
var uploadResultErr error
|
||||
|
||||
holders := chunkHolders(assignResult)
|
||||
// Fan out to every holder, except for cipher: per-call encryption
|
||||
// would give each replica different bytes, so keep its relay path.
|
||||
if opt.UploadFunc == nil && !opt.Cipher && len(holders) > 1 {
|
||||
uploadResult, uploadResultErr = uploadChunkToHolders(ctx, holders, assignResult.Fid, buf.Bytes(), jwt, chunkMd5B64, opt)
|
||||
} else {
|
||||
uploadOption := &UploadOption{
|
||||
UploadUrl: fmt.Sprintf("http://%s/%s", assignResult.Url, assignResult.Fid),
|
||||
Cipher: opt.Cipher,
|
||||
IsInputCompressed: false,
|
||||
MimeType: opt.MimeType,
|
||||
PairMap: nil,
|
||||
Jwt: jwt,
|
||||
Md5: chunkMd5B64,
|
||||
// A target that fills up, loses its replica peer, or goes away fails
|
||||
// every attempt against the same fid, so ask for a fresh assignment and
|
||||
// retry there rather than losing the whole object to one bad volume.
|
||||
for attempt := 1; ; attempt++ {
|
||||
uploadResult, uploadResultErr = uploadChunk(ctx, assignResult, buf.Bytes(), jwt, chunkMd5B64, opt)
|
||||
if uploadResultErr == nil {
|
||||
break
|
||||
}
|
||||
// Use mock upload function if provided (for testing), otherwise use real uploader
|
||||
if opt.UploadFunc != nil {
|
||||
uploadResult, uploadResultErr = opt.UploadFunc(ctx, buf.Bytes(), uploadOption)
|
||||
} else {
|
||||
uploader, uploaderErr := NewUploader()
|
||||
if uploaderErr != nil {
|
||||
uploadErrLock.Lock()
|
||||
if uploadErr == nil {
|
||||
uploadErr = fmt.Errorf("create uploader: %w", uploaderErr)
|
||||
}
|
||||
uploadErrLock.Unlock()
|
||||
return
|
||||
}
|
||||
uploadResult, uploadResultErr = uploader.UploadData(ctx, buf.Bytes(), uploadOption)
|
||||
// The volume server commits the needle before replicating, so a
|
||||
// failed write can still leave a copy behind. No chunk will name
|
||||
// this fid whether we retry or give up here, and an unreferenced
|
||||
// needle is not garbage vacuum can find, so drop it either way.
|
||||
deleteChunkFromHolders(chunkHolders(assignResult), assignResult.Fid, jwt)
|
||||
if attempt == chunkAssignAttempts || !shouldReassignUpload(uploadResultErr) || objectFailed() {
|
||||
break
|
||||
}
|
||||
glog.V(2).Infof("re-assigning chunk at offset %d after attempt %d/%d: %v", offset, attempt, chunkAssignAttempts, uploadResultErr)
|
||||
_, assignResult, assignErr = opt.AssignFunc(ctx, 1, uint64(size))
|
||||
if assignErr != nil {
|
||||
uploadResultErr = fmt.Errorf("reassign volume after %w: %w", uploadResultErr, assignErr)
|
||||
break
|
||||
}
|
||||
jwt = opt.Jwt
|
||||
if assignResult.Auth != "" {
|
||||
jwt = assignResult.Auth
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,6 +296,46 @@ uploadLoop:
|
||||
}, nil
|
||||
}
|
||||
|
||||
// chunkAssignAttempts bounds how many volumes one chunk may be offered to
|
||||
// before the upload gives up.
|
||||
const chunkAssignAttempts = 3
|
||||
|
||||
// uploadChunk writes one chunk to its assigned volume. It fans out to every
|
||||
// holder, except for cipher: per-call encryption would give each replica
|
||||
// different bytes, so keep its relay path.
|
||||
func uploadChunk(ctx context.Context, assignResult *AssignResult, data []byte, jwt security.EncodedJwt, md5b64 string, opt *ChunkedUploadOption) (*UploadResult, error) {
|
||||
holders := chunkHolders(assignResult)
|
||||
if opt.UploadFunc == nil && !opt.Cipher && len(holders) > 1 {
|
||||
return uploadChunkToHolders(ctx, holders, assignResult.Fid, data, jwt, md5b64, opt)
|
||||
}
|
||||
uploadOption := &UploadOption{
|
||||
UploadUrl: fmt.Sprintf("http://%s/%s", assignResult.Url, assignResult.Fid),
|
||||
Cipher: opt.Cipher,
|
||||
IsInputCompressed: false,
|
||||
MimeType: opt.MimeType,
|
||||
PairMap: nil,
|
||||
Jwt: jwt,
|
||||
Md5: md5b64,
|
||||
// One upload call per assignment: the caller retries everything a
|
||||
// same-URL retry would, and a different volume is the better second try.
|
||||
// This bounds retriedUploadData only — doUploadData still reissues once
|
||||
// on a connection reset, with a rewound body, which is a transport
|
||||
// stutter rather than a fresh attempt at the volume. The fan-out path
|
||||
// keeps its retries, where absorbing a blip locally beats cancelling
|
||||
// every holder and re-uploading the chunk.
|
||||
MaxAttempts: 1,
|
||||
}
|
||||
// Use mock upload function if provided (for testing), otherwise use real uploader
|
||||
if opt.UploadFunc != nil {
|
||||
return opt.UploadFunc(ctx, data, uploadOption)
|
||||
}
|
||||
uploader, err := NewUploader()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("create uploader: %w", err)
|
||||
}
|
||||
return uploader.UploadData(ctx, data, uploadOption)
|
||||
}
|
||||
|
||||
// chunkHolders returns the assigned volume plus its replica holders.
|
||||
func chunkHolders(assignResult *AssignResult) []string {
|
||||
hosts := []string{assignResult.Url}
|
||||
@@ -341,9 +386,15 @@ func uploadChunkToHolders(ctx context.Context, hosts []string, fid string, data
|
||||
for range hosts {
|
||||
o := <-outcomes
|
||||
if o.err != nil {
|
||||
// Once one holder fails the rest are cancelled, so errors arrive in
|
||||
// no fixed order. Prefer one the caller can act on, or the choice of
|
||||
// which host to report — and whether to retry elsewhere — turns on
|
||||
// goroutine scheduling.
|
||||
if firstErr == nil {
|
||||
firstErr = o.err
|
||||
cancel()
|
||||
} else if !shouldReassignUpload(firstErr) && shouldReassignUpload(o.err) {
|
||||
firstErr = o.err
|
||||
}
|
||||
} else {
|
||||
succeeded = append(succeeded, o.host)
|
||||
|
||||
@@ -13,6 +13,8 @@ import (
|
||||
"sync/atomic"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/seaweedfs/seaweedfs/weed/security"
|
||||
)
|
||||
|
||||
// TestUploadReaderInChunksReturnsPartialResultsOnError verifies that when
|
||||
@@ -415,3 +417,225 @@ func TestUploadReaderInChunksTagsTruncatedBody(t *testing.T) {
|
||||
t.Errorf("expected io.ErrUnexpectedEOF to remain in the chain, got %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
// uploadSingleChunk runs a single-chunk upload against uploadFunc, handing out a
|
||||
// fresh volume on every assignment, and reports how many assignments it took.
|
||||
func uploadSingleChunk(t *testing.T, uploadFunc func(ctx context.Context, data []byte, option *UploadOption) (*UploadResult, error)) (*ChunkedUploadResult, int, error) {
|
||||
t.Helper()
|
||||
|
||||
assigns := 0
|
||||
assignFunc := func(ctx context.Context, count int, expectedDataSize uint64) (*VolumeAssignRequest, *AssignResult, error) {
|
||||
assigns++
|
||||
return nil, &AssignResult{
|
||||
Fid: fmt.Sprintf("%d,0a0b0c0d", assigns),
|
||||
Url: fmt.Sprintf("volume-%d:8080", assigns),
|
||||
Auth: security.EncodedJwt(fmt.Sprintf("jwt-%d", assigns)),
|
||||
Count: 1,
|
||||
}, nil
|
||||
}
|
||||
|
||||
result, err := UploadReaderInChunks(context.Background(), bytes.NewReader(bytes.Repeat([]byte("x"), 4096)), &ChunkedUploadOption{
|
||||
ChunkSize: 8 * 1024,
|
||||
Collection: "test",
|
||||
AssignFunc: assignFunc,
|
||||
UploadFunc: uploadFunc,
|
||||
})
|
||||
return result, assigns, err
|
||||
}
|
||||
|
||||
// A volume at capacity answers every attempt against the same fid with a 500,
|
||||
// so the chunk has to move to a freshly assigned volume rather than take the
|
||||
// whole object down with it.
|
||||
func TestUploadReaderInChunksReassignsOnFullVolume(t *testing.T) {
|
||||
var jwts []security.EncodedJwt
|
||||
result, assigns, err := uploadSingleChunk(t, func(ctx context.Context, data []byte, option *UploadOption) (*UploadResult, error) {
|
||||
jwts = append(jwts, option.Jwt)
|
||||
if strings.Contains(option.UploadUrl, "volume-1:") {
|
||||
return nil, &uploadStatusError{
|
||||
StatusCode: http.StatusInternalServerError,
|
||||
err: errors.New("failed to write to local disk: Volume Size 34361499680 Exceeded 34359738368"),
|
||||
}
|
||||
}
|
||||
return &UploadResult{Size: uint32(len(data))}, nil
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("expected the chunk to land on the reassigned volume, got %v", err)
|
||||
}
|
||||
if assigns != 2 {
|
||||
t.Fatalf("expected 2 assignments, got %d", assigns)
|
||||
}
|
||||
// A secured cluster mints a JWT per assignment; presenting the full volume's
|
||||
// token to the new one would 401.
|
||||
if len(jwts) != 2 || jwts[0] != "jwt-1" || jwts[1] != "jwt-2" {
|
||||
t.Errorf("expected each attempt to carry its own assignment JWT, got %v", jwts)
|
||||
}
|
||||
if len(result.FileChunks) != 1 {
|
||||
t.Fatalf("expected 1 chunk, got %d", len(result.FileChunks))
|
||||
}
|
||||
if got := result.FileChunks[0].FileId; got != "2,0a0b0c0d" {
|
||||
t.Errorf("expected the chunk to record the reassigned fid, got %s", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestUploadReaderInChunksDoesNotReassignOnClientError(t *testing.T) {
|
||||
_, assigns, err := uploadSingleChunk(t, func(ctx context.Context, data []byte, option *UploadOption) (*UploadResult, error) {
|
||||
return nil, &uploadStatusError{StatusCode: http.StatusBadRequest, err: errors.New("mismatching cookie")}
|
||||
})
|
||||
|
||||
if err == nil {
|
||||
t.Fatal("expected a 4xx to fail the upload")
|
||||
}
|
||||
// Another volume would reject the same request the same way.
|
||||
if assigns != 1 {
|
||||
t.Fatalf("expected 1 assignment, got %d", assigns)
|
||||
}
|
||||
}
|
||||
|
||||
func TestUploadReaderInChunksBoundsReassignment(t *testing.T) {
|
||||
_, assigns, err := uploadSingleChunk(t, func(ctx context.Context, data []byte, option *UploadOption) (*UploadResult, error) {
|
||||
return nil, &uploadStatusError{StatusCode: http.StatusInternalServerError, err: errors.New("volume full")}
|
||||
})
|
||||
|
||||
if err == nil {
|
||||
t.Fatal("expected the upload to fail once every volume it is offered is full")
|
||||
}
|
||||
// Spelled out rather than compared to chunkAssignAttempts: the budget is
|
||||
// what bounds this against retriedUploadData's own attempts, so raising it
|
||||
// should fail here, not pass silently.
|
||||
if assigns != 3 {
|
||||
t.Fatalf("expected 3 assignments, got %d", assigns)
|
||||
}
|
||||
}
|
||||
|
||||
// The fan-out path is what a real multi-replica cluster takes, and it behaves
|
||||
// differently from the relay path under failure: it cancels its siblings and
|
||||
// rolls back the copies that landed. Drive the reassignment loop through it.
|
||||
func TestUploadReaderInChunksReassignsAcrossHolders(t *testing.T) {
|
||||
var primaryDeletes, fullDeletes int32
|
||||
|
||||
healthy := func(deletes *int32) *httptest.Server {
|
||||
return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method == http.MethodDelete {
|
||||
atomic.AddInt32(deletes, 1)
|
||||
w.WriteHeader(http.StatusAccepted)
|
||||
return
|
||||
}
|
||||
w.WriteHeader(http.StatusCreated)
|
||||
fmt.Fprint(w, `{"name":"chunk","size":4096}`)
|
||||
}))
|
||||
}
|
||||
|
||||
full := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method == http.MethodDelete {
|
||||
atomic.AddInt32(&fullDeletes, 1)
|
||||
w.WriteHeader(http.StatusAccepted)
|
||||
return
|
||||
}
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
fmt.Fprint(w, `{"error":"failed to write to local disk: Volume Size 34361499680 Exceeded 34359738368"}`)
|
||||
}))
|
||||
defer full.Close()
|
||||
|
||||
var secondaryDeletes int32
|
||||
primary, secondary := healthy(&primaryDeletes), healthy(&secondaryDeletes)
|
||||
defer primary.Close()
|
||||
defer secondary.Close()
|
||||
|
||||
host := func(s *httptest.Server) string { return strings.TrimPrefix(s.URL, "http://") }
|
||||
|
||||
assigns := 0
|
||||
assignFunc := func(ctx context.Context, count int, expectedDataSize uint64) (*VolumeAssignRequest, *AssignResult, error) {
|
||||
assigns++
|
||||
if assigns == 1 {
|
||||
// Two holders, so uploadChunk takes the fan-out path; one is full.
|
||||
return nil, &AssignResult{
|
||||
Fid: "1,0a0b0c0d",
|
||||
Url: host(primary),
|
||||
Replicas: []Location{{Url: host(full)}},
|
||||
Count: 1,
|
||||
}, nil
|
||||
}
|
||||
return nil, &AssignResult{
|
||||
Fid: "2,0a0b0c0d",
|
||||
Url: host(primary),
|
||||
Replicas: []Location{{Url: host(secondary)}},
|
||||
Count: 1,
|
||||
}, nil
|
||||
}
|
||||
|
||||
result, err := UploadReaderInChunks(context.Background(), bytes.NewReader(bytes.Repeat([]byte("x"), 4096)), &ChunkedUploadOption{
|
||||
ChunkSize: 8 * 1024,
|
||||
Collection: "test",
|
||||
AssignFunc: assignFunc,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("expected the chunk to land on the reassigned volume, got %v", err)
|
||||
}
|
||||
if assigns != 2 {
|
||||
t.Fatalf("expected 2 assignments, got %d", assigns)
|
||||
}
|
||||
if len(result.FileChunks) != 1 || result.FileChunks[0].FileId != "2,0a0b0c0d" {
|
||||
t.Fatalf("expected the chunk to record the reassigned fid, got %+v", result.FileChunks)
|
||||
}
|
||||
// The copy that landed on the healthy holder before its peer reported full
|
||||
// is referenced by nothing, so it has to be rolled back.
|
||||
if atomic.LoadInt32(&primaryDeletes) == 0 {
|
||||
t.Error("expected the copy that landed to be rolled back")
|
||||
}
|
||||
// The full holder is not in uploadChunkToHolders' succeeded set, so only the
|
||||
// loop's own rollback reaches it — and it has to, because a 5xx there can
|
||||
// still mean the needle was committed before replication failed.
|
||||
if atomic.LoadInt32(&fullDeletes) == 0 {
|
||||
t.Error("expected the abandoned fid to be deleted from the failed holder too")
|
||||
}
|
||||
if atomic.LoadInt32(&secondaryDeletes) != 0 {
|
||||
t.Error("the reassigned volume kept the chunk; it must not be rolled back")
|
||||
}
|
||||
}
|
||||
|
||||
// retriedUploadData retries the same URL three times by default. On the relay
|
||||
// path the reassignment loop retries everything that would, so leaving both in
|
||||
// place would multiply into nine upload calls for one chunk.
|
||||
//
|
||||
// This counts calls that reached a handler and answered. doUploadData reissues
|
||||
// once more on a connection reset before any of them return, which no HTTP
|
||||
// status can provoke; upload_content_test covers that separately.
|
||||
func TestUploadReaderInChunksDoesNotMultiplyRelayAttempts(t *testing.T) {
|
||||
var posts, deletes int32
|
||||
dead := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method == http.MethodDelete {
|
||||
atomic.AddInt32(&deletes, 1)
|
||||
w.WriteHeader(http.StatusAccepted)
|
||||
return
|
||||
}
|
||||
atomic.AddInt32(&posts, 1)
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
fmt.Fprint(w, `{"error":"failed to write to local disk: Volume Size 34361499680 Exceeded 34359738368"}`)
|
||||
}))
|
||||
defer dead.Close()
|
||||
|
||||
assigns := 0
|
||||
_, err := UploadReaderInChunks(context.Background(), bytes.NewReader(bytes.Repeat([]byte("x"), 4096)), &ChunkedUploadOption{
|
||||
ChunkSize: 8 * 1024,
|
||||
Collection: "test",
|
||||
AssignFunc: func(ctx context.Context, count int, expectedDataSize uint64) (*VolumeAssignRequest, *AssignResult, error) {
|
||||
assigns++
|
||||
// One holder, so uploadChunk takes the relay path.
|
||||
return nil, &AssignResult{Fid: fmt.Sprintf("%d,0a0b0c0d", assigns), Url: strings.TrimPrefix(dead.URL, "http://"), Count: 1}, nil
|
||||
},
|
||||
})
|
||||
|
||||
if err == nil {
|
||||
t.Fatal("expected the upload to fail once every volume it is offered is full")
|
||||
}
|
||||
if got := atomic.LoadInt32(&posts); got != 3 {
|
||||
t.Errorf("expected 3 upload calls, one per assignment, got %d", got)
|
||||
}
|
||||
// Including the last one: giving up does not make the needle it may have
|
||||
// committed anyone else's to find, and no chunk will ever name that fid.
|
||||
if got := atomic.LoadInt32(&deletes); got != 3 {
|
||||
t.Errorf("expected every abandoned fid to be rolled back, got %d deletes", got)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,186 @@
|
||||
package placement
|
||||
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/seaweedfs/seaweedfs/weed/pb/master_pb"
|
||||
"github.com/seaweedfs/seaweedfs/weed/storage/types"
|
||||
)
|
||||
|
||||
// PlacementPreference describes where a volume that has to leave its current
|
||||
// node may land.
|
||||
type PlacementPreference struct {
|
||||
// Source is the node the volume is leaving. It is never a candidate, and
|
||||
// its rack and data center are what PreferLocality measures against.
|
||||
Source string
|
||||
// DiskType is the medium the volume must land on.
|
||||
DiskType types.DiskType
|
||||
// AnchorDataCenter restricts candidates to one data center when set.
|
||||
AnchorDataCenter string
|
||||
// Exclude names nodes already spoken for by the same plan, so a caller
|
||||
// placing several copies does not stack them on one node.
|
||||
Exclude map[string]bool
|
||||
// Accept rejects candidates the caller cannot use for reasons placement does
|
||||
// not model -- replica placement rules, a node already holding the volume.
|
||||
// It receives the candidate's rack and data center because the constraints
|
||||
// that need them are exactly the ones a bare node cannot express. Nil
|
||||
// accepts everything.
|
||||
Accept func(node *master_pb.DataNodeInfo, dataCenter, rack string) bool
|
||||
// VolumeBytes is what this move will actually consume on the destination.
|
||||
// Zero falls back to the tier's average volume size, which is all a caller
|
||||
// planning a not-yet-created volume can know.
|
||||
VolumeBytes uint64
|
||||
}
|
||||
|
||||
// PickTarget chooses where a volume that has to leave its node should land:
|
||||
// the emptiest node near it.
|
||||
//
|
||||
// Locality ranks first -- same rack as the source, then same data center, then
|
||||
// anywhere -- because moving a volume past a node that could have held it costs
|
||||
// cross-rack bandwidth for nothing. Within a locality tier the emptiest wins, so
|
||||
// a burst of moves still spreads instead of filling whichever node the topology
|
||||
// happens to list first. Free bytes decide when the cluster reports them and
|
||||
// free slots break the tie, which also leaves servers too old to report
|
||||
// filesystem bytes ordered sensibly.
|
||||
//
|
||||
// Locality is not optional. A caller that genuinely wants to scatter should
|
||||
// widen what it passes as Source, not ask placement to forget where the volume
|
||||
// came from.
|
||||
//
|
||||
// The chosen node's volume count is spent in topo before returning. Planning
|
||||
// several moves from one snapshot otherwise sends them all to the same node,
|
||||
// since each pick would see the capacity its predecessors already took. Callers
|
||||
// therefore pass a snapshot they own and may mutate.
|
||||
func PickTarget(topo *master_pb.TopologyInfo, pref PlacementPreference) *master_pb.DataNodeInfo {
|
||||
nodes := candidateNodes(topo, pref.AnchorDataCenter)
|
||||
|
||||
var srcDc, srcRack string
|
||||
for _, n := range nodes {
|
||||
if n.info.Id == pref.Source {
|
||||
srcDc, srcRack = n.dc, n.rack
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
type candidate struct {
|
||||
node *node
|
||||
locality int // 0 same rack, 1 same dc, 2 elsewhere
|
||||
bytes uint64
|
||||
hasBytes bool
|
||||
slots int64
|
||||
}
|
||||
|
||||
var candidates []candidate
|
||||
for _, n := range nodes {
|
||||
if n.info.Id == pref.Source || pref.Exclude[n.info.Id] {
|
||||
continue
|
||||
}
|
||||
d := n.disk(pref.DiskType)
|
||||
if d == nil || d.VolumeCount >= d.MaxVolumeCount {
|
||||
continue
|
||||
}
|
||||
if pref.Accept != nil && !pref.Accept(n.info, n.dc, n.rack) {
|
||||
continue
|
||||
}
|
||||
c := candidate{node: n}
|
||||
c.bytes, c.hasBytes = d.DiskFreeBytes, d.DiskTotalBytes != 0
|
||||
c.slots = d.MaxVolumeCount - d.VolumeCount
|
||||
switch {
|
||||
case srcRack != "" && n.rack == srcRack && n.dc == srcDc:
|
||||
c.locality = 0
|
||||
case srcDc != "" && n.dc == srcDc:
|
||||
c.locality = 1
|
||||
default:
|
||||
c.locality = 2
|
||||
}
|
||||
candidates = append(candidates, c)
|
||||
}
|
||||
if len(candidates) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
// One metric decides the whole ordering. Comparing some pairs on bytes and
|
||||
// others on slots is intransitive -- with A,B reporting bytes and C not, the
|
||||
// order of A and C depends on which the sort happens to compare first -- so a
|
||||
// single node too old to report filesystem bytes puts every candidate on
|
||||
// slots rather than silently mixing the two.
|
||||
byBytes := true
|
||||
for _, c := range candidates {
|
||||
if !c.hasBytes {
|
||||
byBytes = false
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
sort.SliceStable(candidates, func(i, j int) bool {
|
||||
a, b := candidates[i], candidates[j]
|
||||
if a.locality != b.locality {
|
||||
return a.locality < b.locality
|
||||
}
|
||||
if byBytes && a.bytes != b.bytes {
|
||||
return a.bytes > b.bytes
|
||||
}
|
||||
return a.slots > b.slots
|
||||
})
|
||||
|
||||
chosen := candidates[0].node.info
|
||||
if d, ok := chosen.DiskInfos[string(pref.DiskType)]; ok && d != nil {
|
||||
d.VolumeCount++
|
||||
if d.DiskTotalBytes != 0 && d.DiskFreeBytes != 0 {
|
||||
// Spend the space this move actually takes, so the next pick from
|
||||
// this snapshot sees the node as fuller by the right amount. A big
|
||||
// volume charged the tier average would let a batch overcommit the
|
||||
// destination; a small one would divert later moves off a node that
|
||||
// still had room.
|
||||
spend := pref.VolumeBytes
|
||||
if spend == 0 {
|
||||
spend = d.DiskTotalBytes / uint64(max64(d.MaxVolumeCount, 1))
|
||||
}
|
||||
if d.DiskFreeBytes > spend {
|
||||
d.DiskFreeBytes -= spend
|
||||
} else {
|
||||
d.DiskFreeBytes = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
return chosen
|
||||
}
|
||||
|
||||
func max64(a, b int64) int64 {
|
||||
if a > b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// node is a volume server as a placement snapshot sees it: where it sits and
|
||||
// what it has free. Deliberately smaller than the balancer's Node, which also
|
||||
// carries the volumes it holds -- placement never needs those.
|
||||
type node struct {
|
||||
info *master_pb.DataNodeInfo
|
||||
dc string
|
||||
rack string
|
||||
}
|
||||
|
||||
func (n *node) disk(diskType types.DiskType) *master_pb.DiskInfo {
|
||||
d, found := n.info.DiskInfos[string(diskType)]
|
||||
if !found {
|
||||
return nil
|
||||
}
|
||||
return d
|
||||
}
|
||||
|
||||
// candidateNodes flattens the topology, keeping one data center when anchored.
|
||||
func candidateNodes(topo *master_pb.TopologyInfo, anchorDataCenter string) (nodes []*node) {
|
||||
for _, dc := range topo.GetDataCenterInfos() {
|
||||
if anchorDataCenter != "" && dc.GetId() != anchorDataCenter {
|
||||
continue
|
||||
}
|
||||
for _, rack := range dc.GetRackInfos() {
|
||||
for _, dn := range rack.GetDataNodeInfos() {
|
||||
nodes = append(nodes, &node{info: dn, dc: dc.GetId(), rack: rack.GetId()})
|
||||
}
|
||||
}
|
||||
}
|
||||
return nodes
|
||||
}
|
||||
@@ -0,0 +1,258 @@
|
||||
package placement
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/seaweedfs/seaweedfs/weed/pb/master_pb"
|
||||
"github.com/seaweedfs/seaweedfs/weed/storage/types"
|
||||
)
|
||||
|
||||
func placementNode(id string, maxVolumes, used int64, totalBytes, freeBytes uint64) *master_pb.DataNodeInfo {
|
||||
return &master_pb.DataNodeInfo{Id: id, DiskInfos: map[string]*master_pb.DiskInfo{
|
||||
"ssd": {
|
||||
MaxVolumeCount: maxVolumes, VolumeCount: used,
|
||||
DiskTotalBytes: totalBytes, DiskFreeBytes: freeBytes,
|
||||
},
|
||||
}}
|
||||
}
|
||||
|
||||
// placementTopo builds a one-datacenter topology, taking each node's first
|
||||
// character as its rack so the tests read compactly.
|
||||
func placementTopo(nodes ...*master_pb.DataNodeInfo) *master_pb.TopologyInfo {
|
||||
byRack := map[string][]*master_pb.DataNodeInfo{}
|
||||
var order []string
|
||||
for _, n := range nodes {
|
||||
rack := n.Id[:1]
|
||||
if _, seen := byRack[rack]; !seen {
|
||||
order = append(order, rack)
|
||||
}
|
||||
byRack[rack] = append(byRack[rack], n)
|
||||
}
|
||||
var racks []*master_pb.RackInfo
|
||||
for _, r := range order {
|
||||
racks = append(racks, &master_pb.RackInfo{Id: r, DataNodeInfos: byRack[r]})
|
||||
}
|
||||
return &master_pb.TopologyInfo{DataCenterInfos: []*master_pb.DataCenterInfo{{Id: "dc1", RackInfos: racks}}}
|
||||
}
|
||||
|
||||
func TestPickTargetPrefersTheEmptiestByFreeBytes(t *testing.T) {
|
||||
topo := placementTopo(
|
||||
placementNode("a1", 10, 1, 1000, 200),
|
||||
placementNode("a2", 10, 1, 1000, 900),
|
||||
placementNode("a3", 10, 1, 1000, 500),
|
||||
)
|
||||
got := PickTarget(topo, PlacementPreference{Source: "z9", DiskType: types.SsdType})
|
||||
if got.GetId() != "a2" {
|
||||
t.Fatalf("got %q, want the node with the most free bytes (a2)", got.GetId())
|
||||
}
|
||||
}
|
||||
|
||||
func TestPickTargetFallsBackToSlotsWithoutReportedBytes(t *testing.T) {
|
||||
// A volume server too old to report filesystem bytes must still be ordered
|
||||
// sensibly rather than read as having zero free.
|
||||
topo := placementTopo(
|
||||
placementNode("a1", 10, 9, 0, 0),
|
||||
placementNode("a2", 10, 2, 0, 0),
|
||||
)
|
||||
got := PickTarget(topo, PlacementPreference{Source: "z9", DiskType: types.SsdType})
|
||||
if got.GetId() != "a2" {
|
||||
t.Fatalf("got %q, want the node with the most free slots (a2)", got.GetId())
|
||||
}
|
||||
}
|
||||
|
||||
func TestPickTargetSkipsSourceExcludedAndFull(t *testing.T) {
|
||||
topo := placementTopo(
|
||||
placementNode("a1", 10, 1, 1000, 900), // the source itself
|
||||
placementNode("a2", 10, 1, 1000, 800), // already spoken for by the plan
|
||||
placementNode("a3", 5, 5, 1000, 700), // no free slot
|
||||
placementNode("a4", 10, 1, 1000, 100),
|
||||
)
|
||||
got := PickTarget(topo, PlacementPreference{
|
||||
Source: "a1", DiskType: types.SsdType, Exclude: map[string]bool{"a2": true},
|
||||
})
|
||||
if got.GetId() != "a4" {
|
||||
t.Fatalf("got %q, want a4", got.GetId())
|
||||
}
|
||||
}
|
||||
|
||||
func TestPickTargetReturnsNilWhenNothingFits(t *testing.T) {
|
||||
topo := placementTopo(placementNode("a1", 5, 5, 1000, 900))
|
||||
if got := PickTarget(topo, PlacementPreference{Source: "z9", DiskType: types.SsdType}); got != nil {
|
||||
t.Fatalf("got %q, want nil", got.GetId())
|
||||
}
|
||||
}
|
||||
|
||||
func TestPickTargetHonoursAnchorDataCenter(t *testing.T) {
|
||||
topo := &master_pb.TopologyInfo{DataCenterInfos: []*master_pb.DataCenterInfo{
|
||||
{Id: "dc1", RackInfos: []*master_pb.RackInfo{{Id: "r1", DataNodeInfos: []*master_pb.DataNodeInfo{
|
||||
placementNode("a1", 10, 1, 1000, 100),
|
||||
}}}},
|
||||
{Id: "dc2", RackInfos: []*master_pb.RackInfo{{Id: "r2", DataNodeInfos: []*master_pb.DataNodeInfo{
|
||||
placementNode("b1", 10, 1, 1000, 900),
|
||||
}}}},
|
||||
}}
|
||||
got := PickTarget(topo, PlacementPreference{
|
||||
Source: "z9", DiskType: types.SsdType, AnchorDataCenter: "dc1",
|
||||
})
|
||||
if got.GetId() != "a1" {
|
||||
t.Fatalf("got %q, want a1 -- the anchor outranks an emptier node elsewhere", got.GetId())
|
||||
}
|
||||
}
|
||||
|
||||
func TestPickTargetPrefersTheSourceRackOverAnEmptierStranger(t *testing.T) {
|
||||
topo := placementTopo(
|
||||
placementNode("a1", 10, 1, 1000, 500), // source, rack a
|
||||
placementNode("a2", 10, 1, 1000, 100), // same rack, tighter
|
||||
placementNode("b1", 10, 1, 1000, 900), // other rack, emptiest
|
||||
)
|
||||
got := PickTarget(topo, PlacementPreference{Source: "a1", DiskType: types.SsdType})
|
||||
if got.GetId() != "a2" {
|
||||
t.Fatalf("got %q, want a2 -- same rack outranks emptier", got.GetId())
|
||||
}
|
||||
}
|
||||
|
||||
func TestPickTargetLeavesTheRackWhenItCannotHoldTheVolume(t *testing.T) {
|
||||
// Locality is a preference over candidates, never a reason to overfill.
|
||||
topo := placementTopo(
|
||||
placementNode("a1", 10, 1, 1000, 500), // source
|
||||
placementNode("a2", 5, 5, 1000, 900), // same rack, no free slot
|
||||
placementNode("b1", 10, 1, 1000, 100),
|
||||
)
|
||||
got := PickTarget(topo, PlacementPreference{Source: "a1", DiskType: types.SsdType})
|
||||
if got.GetId() != "b1" {
|
||||
t.Fatalf("got %q, want b1 -- a full same-rack node is not a candidate", got.GetId())
|
||||
}
|
||||
}
|
||||
|
||||
func TestPickTargetPrefersSameDataCenterOverAnother(t *testing.T) {
|
||||
topo := &master_pb.TopologyInfo{DataCenterInfos: []*master_pb.DataCenterInfo{
|
||||
{Id: "dc1", RackInfos: []*master_pb.RackInfo{
|
||||
{Id: "r1", DataNodeInfos: []*master_pb.DataNodeInfo{placementNode("a1", 10, 1, 1000, 500)}},
|
||||
{Id: "r2", DataNodeInfos: []*master_pb.DataNodeInfo{placementNode("a2", 10, 1, 1000, 100)}},
|
||||
}},
|
||||
{Id: "dc2", RackInfos: []*master_pb.RackInfo{
|
||||
{Id: "r3", DataNodeInfos: []*master_pb.DataNodeInfo{placementNode("b1", 10, 1, 1000, 900)}},
|
||||
}},
|
||||
}}
|
||||
got := PickTarget(topo, PlacementPreference{Source: "a1", DiskType: types.SsdType})
|
||||
if got.GetId() != "a2" {
|
||||
t.Fatalf("got %q, want a2 -- another rack in the same dc beats another dc", got.GetId())
|
||||
}
|
||||
}
|
||||
|
||||
func TestPickTargetFallsBackToCapacityForAnUnknownSource(t *testing.T) {
|
||||
// A source that is not in the topology has no rack to be near, so ordering
|
||||
// degrades to capacity rather than to topology order.
|
||||
topo := placementTopo(
|
||||
placementNode("a1", 10, 1, 1000, 100),
|
||||
placementNode("b1", 10, 1, 1000, 900),
|
||||
)
|
||||
got := PickTarget(topo, PlacementPreference{Source: "gone:8080", DiskType: types.SsdType})
|
||||
if got.GetId() != "b1" {
|
||||
t.Fatalf("got %q, want b1", got.GetId())
|
||||
}
|
||||
}
|
||||
|
||||
func TestPickTargetSpendsCapacitySoABatchSpreads(t *testing.T) {
|
||||
// The reservation this exists for: planning several moves from one snapshot
|
||||
// must not stack them all on whichever node started emptiest.
|
||||
topo := placementTopo(
|
||||
placementNode("a1", 4, 0, 4000, 4000),
|
||||
placementNode("a2", 4, 0, 4000, 3000),
|
||||
)
|
||||
seen := map[string]int{}
|
||||
for i := 0; i < 4; i++ {
|
||||
got := PickTarget(topo, PlacementPreference{Source: "z9", DiskType: types.SsdType})
|
||||
if got == nil {
|
||||
t.Fatalf("pick %d returned nil", i)
|
||||
}
|
||||
seen[got.GetId()]++
|
||||
}
|
||||
if seen["a1"] == 4 || seen["a2"] == 4 {
|
||||
t.Fatalf("all four picks landed on one node: %v", seen)
|
||||
}
|
||||
if seen["a1"]+seen["a2"] != 4 {
|
||||
t.Fatalf("unexpected spread: %v", seen)
|
||||
}
|
||||
}
|
||||
|
||||
func TestPickTargetStopsWhenTheSnapshotIsSpent(t *testing.T) {
|
||||
// Reservation has to make a node stop being a candidate, not merely rank it
|
||||
// lower, or a batch could overcommit a tier.
|
||||
topo := placementTopo(placementNode("a1", 2, 0, 2000, 2000))
|
||||
for i := 0; i < 2; i++ {
|
||||
if got := PickTarget(topo, PlacementPreference{Source: "z9", DiskType: types.SsdType}); got == nil {
|
||||
t.Fatalf("pick %d returned nil while slots remained", i)
|
||||
}
|
||||
}
|
||||
if got := PickTarget(topo, PlacementPreference{Source: "z9", DiskType: types.SsdType}); got != nil {
|
||||
t.Fatalf("got %q, want nil once the snapshot is spent", got.GetId())
|
||||
}
|
||||
}
|
||||
|
||||
func TestPickTargetUsesOneMetricWhenReportingIsMixed(t *testing.T) {
|
||||
// b1 has the most free bytes but the fewest slots; a2 the reverse. With a3
|
||||
// reporting no bytes at all, every candidate must be ordered on slots, or
|
||||
// the comparator is intransitive and the winner depends on sort order.
|
||||
topo := placementTopo(
|
||||
placementNode("a1", 10, 1, 1000, 500), // source
|
||||
placementNode("a2", 10, 1, 1000, 100),
|
||||
placementNode("a3", 10, 2, 0, 0), // too old to report bytes
|
||||
placementNode("a4", 10, 8, 1000, 900),
|
||||
)
|
||||
got := PickTarget(topo, PlacementPreference{Source: "a1", DiskType: types.SsdType})
|
||||
if got.GetId() != "a2" {
|
||||
t.Fatalf("got %q, want a2 -- the most free slots once bytes are unusable", got.GetId())
|
||||
}
|
||||
}
|
||||
|
||||
func TestPickTargetReservesTheVolumeSize(t *testing.T) {
|
||||
// A volume far bigger than the tier average must be charged at its real
|
||||
// size, or a batch of them overcommits the destination.
|
||||
topo := placementTopo(
|
||||
placementNode("a1", 10, 0, 1000, 1000),
|
||||
placementNode("a2", 10, 0, 1000, 900),
|
||||
)
|
||||
first := PickTarget(topo, PlacementPreference{Source: "z9", DiskType: types.SsdType, VolumeBytes: 800})
|
||||
if first.GetId() != "a1" {
|
||||
t.Fatalf("first pick %q, want a1", first.GetId())
|
||||
}
|
||||
// a1 now reports 200 free against a2's 900, so the next move must go there
|
||||
// rather than to the node that merely started emptiest.
|
||||
second := PickTarget(topo, PlacementPreference{Source: "z9", DiskType: types.SsdType, VolumeBytes: 800})
|
||||
if second.GetId() != "a2" {
|
||||
t.Fatalf("second pick %q, want a2 after 800 bytes were spent on a1", second.GetId())
|
||||
}
|
||||
}
|
||||
|
||||
func TestPickTargetHonoursTheCallerPredicate(t *testing.T) {
|
||||
// Constraints placement does not model -- replica placement, a node already
|
||||
// holding the volume -- stay with the caller, which keeps them out of the
|
||||
// ranking rather than duplicating them here.
|
||||
topo := placementTopo(
|
||||
placementNode("a1", 10, 1, 1000, 900),
|
||||
placementNode("a2", 10, 1, 1000, 500),
|
||||
)
|
||||
got := PickTarget(topo, PlacementPreference{
|
||||
Source: "z9", DiskType: types.SsdType,
|
||||
Accept: func(n *master_pb.DataNodeInfo, dc, rack string) bool { return n.Id != "a1" },
|
||||
})
|
||||
if got.GetId() != "a2" {
|
||||
t.Fatalf("got %q, want a2 -- a1 was rejected despite being emptier", got.GetId())
|
||||
}
|
||||
}
|
||||
|
||||
func TestPickTargetPredicateSeesRackAndDataCenter(t *testing.T) {
|
||||
topo := placementTopo(placementNode("a1", 10, 1, 1000, 900))
|
||||
var sawDc, sawRack string
|
||||
PickTarget(topo, PlacementPreference{
|
||||
Source: "z9", DiskType: types.SsdType,
|
||||
Accept: func(n *master_pb.DataNodeInfo, dc, rack string) bool {
|
||||
sawDc, sawRack = dc, rack
|
||||
return true
|
||||
},
|
||||
})
|
||||
if sawDc != "dc1" || sawRack != "a" {
|
||||
t.Fatalf("predicate saw dc=%q rack=%q, want dc1/a", sawDc, sawRack)
|
||||
}
|
||||
}
|
||||
@@ -101,7 +101,7 @@ func buildBucketMetadata(accountManager AccountManager, entry *filer_pb.Entry) *
|
||||
IsTableBucket: s3tables.IsTableBucketEntry(entry),
|
||||
|
||||
//Default ownership: OwnershipBucketOwnerEnforced, which means Acl is disabled
|
||||
ObjectOwnership: s3_constants.OwnershipBucketOwnerEnforced,
|
||||
ObjectOwnership: s3_constants.DefaultOwnershipForExists,
|
||||
|
||||
// Default owner: `AccountAdmin`
|
||||
Owner: &s3.Owner{
|
||||
@@ -111,15 +111,11 @@ func buildBucketMetadata(accountManager AccountManager, entry *filer_pb.Entry) *
|
||||
}
|
||||
if entry.Extended != nil {
|
||||
//ownership control
|
||||
ownership, ok := entry.Extended[s3_constants.ExtOwnershipKey]
|
||||
if ok {
|
||||
ownership := string(ownership)
|
||||
valid := s3_constants.ValidateOwnership(ownership)
|
||||
if valid {
|
||||
bucketMetadata.ObjectOwnership = ownership
|
||||
} else {
|
||||
glog.Warningf("Invalid ownership: %s, bucket: %s", ownership, bucketMetadata.Name)
|
||||
if ownership, ok := entry.Extended[s3_constants.ExtOwnershipKey]; ok {
|
||||
if !s3_constants.ValidateOwnership(string(ownership)) {
|
||||
glog.Warningf("Invalid ownership: %s, bucket: %s", string(ownership), bucketMetadata.Name)
|
||||
}
|
||||
bucketMetadata.ObjectOwnership = s3_constants.EffectiveOwnership(string(ownership))
|
||||
}
|
||||
|
||||
//access control policy
|
||||
|
||||
@@ -649,9 +649,10 @@ func (s3a *S3ApiServer) completeMultipartUpload(r *http.Request, input *s3.Compl
|
||||
glog.Errorf("completeMultipartUpload: failed to get versioning state for bucket %s: %v", *input.Bucket, vErr)
|
||||
return s3err.ErrInternalError
|
||||
}
|
||||
// Full object key, not just entryName, so the right .versions directory is used.
|
||||
normalizedKey := s3_constants.NormalizeObjectKey(*input.Key)
|
||||
|
||||
if versioningState == s3_constants.VersioningEnabled {
|
||||
// Use full object key (not just entryName) to ensure correct .versions directory is checked
|
||||
normalizedKey := strings.TrimPrefix(*input.Key, "/")
|
||||
useInvertedFormat := s3a.getVersionIdFormat(*input.Bucket, normalizedKey)
|
||||
versionId := generateVersionId(useInvertedFormat)
|
||||
versionFileName := s3a.getVersionFileName(versionId)
|
||||
@@ -823,6 +824,14 @@ func (s3a *S3ApiServer) completeMultipartUpload(r *http.Request, input *s3.Compl
|
||||
return s3err.ErrInternalError
|
||||
}
|
||||
|
||||
// A failed finalize leaves the key reading as deleted, so fail rather than
|
||||
// return 200 — a non-ErrNone finalize keeps the upload directory, so the
|
||||
// caller's retry replays.
|
||||
if err := s3a.finalizeSuspendedNullWrite(owner, *input.Bucket, normalizedKey, s3_constants.SeaweedFSUploadId, *input.UploadId); err != nil {
|
||||
glog.Errorf("completeMultipartUpload: failed to retire the null delete marker for %s/%s: %v", *input.Bucket, normalizedKey, err)
|
||||
return s3err.ErrInternalError
|
||||
}
|
||||
|
||||
// Note: Suspended versioning should NOT return VersionId field according to AWS S3 spec
|
||||
output = &CompleteMultipartUploadResult{
|
||||
Location: aws.String(fmt.Sprintf("%s://%s/%s/%s", getRequestScheme(r), r.Host, url.PathEscape(*input.Bucket), urlPathEscape(*input.Key))),
|
||||
|
||||
@@ -26,6 +26,13 @@ import (
|
||||
// - Falls back to base action mapping if no specific resolution is possible
|
||||
// - Always returns a valid S3 action string (never empty)
|
||||
func ResolveS3Action(r *http.Request, baseAction string, bucket string, object string) string {
|
||||
// An action naming another service is already resolved, and an S3 request
|
||||
// shape says nothing about it: a query parameter on an IAM or STS request
|
||||
// must not turn it into the S3 action that parameter stands for.
|
||||
if strings.HasPrefix(baseAction, "iam:") || strings.HasPrefix(baseAction, "sts:") {
|
||||
return baseAction
|
||||
}
|
||||
|
||||
if r == nil || r.URL == nil {
|
||||
// No HTTP context available: fall back to coarse-grained mapping
|
||||
// This ensures consistent behavior and avoids returning empty strings
|
||||
|
||||
@@ -113,3 +113,28 @@ func TestResolveS3Action_AttributesBeforeVersionId(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// A base action naming another service carries no S3 request shape, so a query
|
||||
// parameter on the request must not redirect it to an S3 action.
|
||||
func TestResolveS3ActionKeepsNonS3Service(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
method string
|
||||
url string
|
||||
baseAction string
|
||||
}{
|
||||
{"iam action with batch delete query", http.MethodPost, "http://localhost/?delete", "iam:CreateUser"},
|
||||
{"iam action with acl query", http.MethodPut, "http://localhost/?acl", "iam:AttachUserPolicy"},
|
||||
{"iam action with tagging query", http.MethodGet, "http://localhost/?tagging", "iam:ListUsers"},
|
||||
{"sts action with batch delete query", http.MethodPost, "http://localhost/?delete", "sts:AssumeRole"},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
r, _ := http.NewRequest(tt.method, tt.url, nil)
|
||||
if got := ResolveS3Action(r, tt.baseAction, "", ""); got != tt.baseAction {
|
||||
t.Errorf("ResolveS3Action() = %q, want %q", got, tt.baseAction)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -16,3 +16,12 @@ func ValidateOwnership(ownership string) bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
// EffectiveOwnership resolves a stored ownership setting to the one that governs
|
||||
// the bucket: absent or invalid behaves as BucketOwnerEnforced.
|
||||
func EffectiveOwnership(ownership string) string {
|
||||
if !ValidateOwnership(ownership) {
|
||||
return DefaultOwnershipForExists
|
||||
}
|
||||
return ownership
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package s3_constants
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestEffectiveOwnership(t *testing.T) {
|
||||
cases := []struct {
|
||||
name string
|
||||
input string
|
||||
want string
|
||||
}{
|
||||
{name: "unset", input: "", want: OwnershipBucketOwnerEnforced},
|
||||
{name: "invalid", input: "Bogus", want: OwnershipBucketOwnerEnforced},
|
||||
{name: "object writer", input: OwnershipObjectWriter, want: OwnershipObjectWriter},
|
||||
{name: "bucket owner preferred", input: OwnershipBucketOwnerPreferred, want: OwnershipBucketOwnerPreferred},
|
||||
{name: "bucket owner enforced", input: OwnershipBucketOwnerEnforced, want: OwnershipBucketOwnerEnforced},
|
||||
}
|
||||
for _, tc := range cases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
if got := EffectiveOwnership(tc.input); got != tc.want {
|
||||
t.Fatalf("EffectiveOwnership(%q) = %q, want %q", tc.input, got, tc.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package s3_constants
|
||||
|
||||
const (
|
||||
ExtAmzPrefix = "Seaweed-X-Amz-"
|
||||
ExtAmzOwnerKey = "Seaweed-X-Amz-Owner"
|
||||
ExtAmzAclKey = "Seaweed-X-Amz-Acl"
|
||||
ExtOwnershipKey = "Seaweed-X-Amz-Ownership"
|
||||
|
||||
@@ -696,7 +696,7 @@ func (s3a *S3ApiServer) getBucketOwnership(bucket string) (string, s3err.ErrorCo
|
||||
return "", errCode
|
||||
}
|
||||
|
||||
return config.Ownership, s3err.ErrNone
|
||||
return s3_constants.EffectiveOwnership(config.Ownership), s3err.ErrNone
|
||||
}
|
||||
|
||||
// setBucketOwnership sets the ownership setting for a bucket
|
||||
|
||||
@@ -1276,21 +1276,12 @@ func (s3a *S3ApiServer) PutBucketOwnershipControls(w http.ResponseWriter, r *htt
|
||||
return
|
||||
}
|
||||
|
||||
// Check if ownership needs to be updated
|
||||
currentOwnership, errCode := s3a.getBucketOwnership(bucket)
|
||||
if errCode != s3err.ErrNone {
|
||||
// Persist even when it matches the implicit default, so a later delete has something to remove.
|
||||
if errCode := s3a.setBucketOwnership(bucket, ownership); errCode != s3err.ErrNone {
|
||||
s3err.WriteErrorResponse(w, r, errCode)
|
||||
return
|
||||
}
|
||||
|
||||
if currentOwnership != ownership {
|
||||
errCode = s3a.setBucketOwnership(bucket, ownership)
|
||||
if errCode != s3err.ErrNone {
|
||||
s3err.WriteErrorResponse(w, r, errCode)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if printOwnership {
|
||||
result := &s3.PutBucketOwnershipControlsInput{
|
||||
OwnershipControls: &v,
|
||||
|
||||
@@ -152,6 +152,28 @@ func TestPutBucketOwnershipControlsRejectsRuleWithoutObjectOwnership(t *testing.
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetBucketOwnershipControlsDefaultsToBucketOwnerEnforced(t *testing.T) {
|
||||
ownerID := AccountAdmin.Id
|
||||
s3a := newMiscTestServer(t, "b")
|
||||
s3a.bucketRegistry = NewBucketRegistry(nil)
|
||||
s3a.bucketRegistry.setMetadataCache(&BucketMetaData{
|
||||
Name: "b",
|
||||
Owner: &s3.Owner{ID: &ownerID},
|
||||
})
|
||||
req := newBucketRequest(http.MethodGet, "b", "ownershipControls=", "")
|
||||
req.Header.Set(s3_constants.AmzAccountId, AccountAdmin.Id)
|
||||
rec := httptest.NewRecorder()
|
||||
|
||||
s3a.GetBucketOwnershipControls(rec, req)
|
||||
|
||||
if rec.Code != http.StatusOK {
|
||||
t.Fatalf("status = %d, want %d, body=%s", rec.Code, http.StatusOK, rec.Body.String())
|
||||
}
|
||||
if !strings.Contains(rec.Body.String(), "<ObjectOwnership>"+s3_constants.OwnershipBucketOwnerEnforced+"</ObjectOwnership>") {
|
||||
t.Fatalf("body missing default ownership: %s", rec.Body.String())
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetBucketAccelerateConfiguration(t *testing.T) {
|
||||
s3a := newMiscTestServer(t, "b")
|
||||
req := newBucketRequest(http.MethodGet, "b", "accelerate=", "")
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package s3api
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"strings"
|
||||
|
||||
"github.com/seaweedfs/seaweedfs/weed/glog"
|
||||
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
|
||||
"github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants"
|
||||
"github.com/seaweedfs/seaweedfs/weed/s3api/s3err"
|
||||
"github.com/seaweedfs/seaweedfs/weed/util"
|
||||
)
|
||||
|
||||
// An explicit directory marker - the key "dir/" created by PutObject on a
|
||||
// trailing-slash key - is stored as the filer directory itself rather than as an
|
||||
// object beside it. That makes it a poor fit for versioning: a delete marker would
|
||||
// have to replace an entry that other keys live under, and the history would have to
|
||||
// sit inside the directory it describes, where a listing keeps meeting it.
|
||||
//
|
||||
// So the key is not versioned. Deleting it does what deleting it in an unversioned
|
||||
// bucket already does: the directory is removed when nothing is left under it, and
|
||||
// demoted to a plain directory when children remain. Listings need no version lookup
|
||||
// to tell what a directory stands for, and a bucket made of directory markers costs
|
||||
// the same to list versioned as unversioned.
|
||||
|
||||
// deleteDirectoryMarker removes the key "<dir>/". Callers hold the object write lock,
|
||||
// so the entry this decides about cannot change between the read and the delete.
|
||||
func (s3a *S3ApiServer) deleteDirectoryMarker(bucket, object string) s3err.ErrorCode {
|
||||
markerDir := s3a.bucketDir(bucket) + "/" + strings.TrimSuffix(strings.TrimPrefix(object, "/"), "/")
|
||||
dir, name := util.FullPath(markerDir).DirAndName()
|
||||
|
||||
entry, err := s3a.getEntry(dir, name)
|
||||
switch {
|
||||
case errors.Is(err, filer_pb.ErrNotFound):
|
||||
return s3err.ErrNone // deleting a key that is not there is a success
|
||||
case err != nil:
|
||||
// The entry may be a file a child write promoted to a directory, whose data
|
||||
// belongs to the key without the trailing slash. Deleting without knowing
|
||||
// would destroy it, so fail and leave the retry to the client.
|
||||
glog.Errorf("deleteDirectoryMarker: cannot read %s/%s: %v", bucket, object, err)
|
||||
return s3err.ErrInternalError
|
||||
case len(entry.GetChunks()) > 0 || entry.IsInRemoteOnly():
|
||||
// A promoted file, not a marker: "dir/" does not name its data.
|
||||
glog.V(2).Infof("deleteDirectoryMarker: %s/%s holds uploaded data, leaving it alone", bucket, object)
|
||||
return s3err.ErrNone
|
||||
}
|
||||
|
||||
// Drop a history an older build recorded for this key. Nothing writes one now, and
|
||||
// leaving it behind keeps reporting the key in ListObjectVersions, so a history we
|
||||
// cannot read or remove fails the delete rather than half finishing it.
|
||||
switch _, historyErr := s3a.getEntry(markerDir, s3_constants.VersionsFolder); {
|
||||
case historyErr == nil:
|
||||
if rmErr := s3a.rm(markerDir, s3_constants.VersionsFolder, true, true); rmErr != nil {
|
||||
glog.Errorf("deleteDirectoryMarker: failed to remove stale history of %s/%s: %v", bucket, object, rmErr)
|
||||
return s3err.ErrInternalError
|
||||
}
|
||||
case !errors.Is(historyErr, filer_pb.ErrNotFound):
|
||||
glog.Errorf("deleteDirectoryMarker: cannot read stale history of %s/%s: %v", bucket, object, historyErr)
|
||||
return s3err.ErrInternalError
|
||||
}
|
||||
|
||||
if err := s3a.WithFilerClient(false, func(client filer_pb.SeaweedFilerClient) error {
|
||||
return s3a.deleteUnversionedObjectWithClient(client, bucket, object, false)
|
||||
}); err != nil {
|
||||
glog.Errorf("deleteDirectoryMarker: failed to delete %s/%s: %v", bucket, object, err)
|
||||
return s3err.ErrInternalError
|
||||
}
|
||||
return s3err.ErrNone
|
||||
}
|
||||
@@ -2474,14 +2474,39 @@ func iamRequiresAdminForOthers(action string) bool {
|
||||
return iamSelfServiceActions[action]
|
||||
}
|
||||
|
||||
// AuthIam provides IAM-specific authentication that allows self-service operations.
|
||||
// Users can manage their own access keys without admin rights, but need admin for operations on other users.
|
||||
// The action parameter is accepted for interface compatibility with cb.Limit but is not used
|
||||
// since IAM permission checking is done based on the IAM Action parameter in the request.
|
||||
func (e *EmbeddedIamApi) AuthIam(f http.HandlerFunc, _ Action) http.HandlerFunc {
|
||||
// AuthorizeIamAction authorizes an IAM management action for identity, with
|
||||
// targetUserName taken from the request's UserName parameter.
|
||||
//
|
||||
// IAM management is not part of the S3 data plane, so the grant is checked as
|
||||
// iam:<Action>. A coarse S3 action would instead be matched by an ordinary
|
||||
// data-plane policy, which says nothing about administering the credential
|
||||
// store.
|
||||
//
|
||||
// Users may run self-service actions against their own identity without any
|
||||
// IAM grant, matching AWS.
|
||||
func (iam *IdentityAccessManagement) AuthorizeIamAction(r *http.Request, identity *Identity, action, targetUserName string) s3err.ErrorCode {
|
||||
// The anonymous identity has no user of its own, so every self-service
|
||||
// action it names would run against someone else's.
|
||||
if identity == nil || identity.Name == s3_constants.AccountAnonymousId {
|
||||
return s3err.ErrAccessDenied
|
||||
}
|
||||
if iamRequiresAdminForOthers(action) && (targetUserName == "" || targetUserName == identity.Name) {
|
||||
return s3err.ErrNone
|
||||
}
|
||||
if identity.isAdmin() {
|
||||
return s3err.ErrNone
|
||||
}
|
||||
return iam.VerifyActionPermission(r, identity, Action("iam:"+action), "arn:aws:iam:::*", "")
|
||||
}
|
||||
|
||||
// AuthIamManagement authenticates an IAM management request and authorizes the
|
||||
// action it carries. It is the entry point for both IAM API surfaces — the
|
||||
// embedded one on the S3 port and the standalone `weed iam` server — so the two
|
||||
// cannot drift apart.
|
||||
func (iam *IdentityAccessManagement) AuthIamManagement(f http.HandlerFunc) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
// If auth is not enabled, allow all
|
||||
if !e.iam.isEnabled() {
|
||||
if !iam.isEnabled() {
|
||||
f(w, r)
|
||||
return
|
||||
}
|
||||
@@ -2491,7 +2516,7 @@ func (e *EmbeddedIamApi) AuthIam(f http.HandlerFunc, _ Action) http.HandlerFunc
|
||||
// needs to hash the body for IAM requests (service != "s3").
|
||||
// The streamHashRequestBody function in auth_signature_v4.go preserves the body
|
||||
// after reading it, so ParseForm() will work correctly after authentication.
|
||||
identity, errCode := e.iam.AuthSignatureOnly(r)
|
||||
identity, errCode := iam.AuthSignatureOnly(r)
|
||||
if errCode != s3err.ErrNone {
|
||||
s3err.WriteErrorResponse(w, r, errCode)
|
||||
return
|
||||
@@ -2503,50 +2528,29 @@ func (e *EmbeddedIamApi) AuthIam(f http.HandlerFunc, _ Action) http.HandlerFunc
|
||||
return
|
||||
}
|
||||
|
||||
action := r.Form.Get("Action")
|
||||
targetUserName := r.PostForm.Get("UserName")
|
||||
|
||||
// IAM API requests must be authenticated - reject nil identity
|
||||
// (can happen for authTypePostPolicy or authTypeStreamingUnsigned)
|
||||
if identity == nil {
|
||||
s3err.WriteErrorResponse(w, r, s3err.ErrAccessDenied)
|
||||
// UserName comes from the body only, the same place the handlers read it
|
||||
// from, so the authorized target and the acted-on target cannot differ.
|
||||
if errCode := iam.AuthorizeIamAction(r, identity, r.Form.Get("Action"), r.PostForm.Get("UserName")); errCode != s3err.ErrNone {
|
||||
s3err.WriteErrorResponse(w, r, errCode)
|
||||
return
|
||||
}
|
||||
|
||||
// Store identity in context
|
||||
if identity != nil && identity.Name != "" {
|
||||
if identity.Name != "" {
|
||||
r = r.WithContext(recordIdentityInContext(r, identity))
|
||||
}
|
||||
|
||||
// Check permissions based on action type
|
||||
if iamRequiresAdminForOthers(action) {
|
||||
// Self-service action: allow if operating on own resources or no target specified
|
||||
if targetUserName == "" || targetUserName == identity.Name {
|
||||
// Self-service: allowed
|
||||
f(w, r)
|
||||
return
|
||||
}
|
||||
// Operating on another user: require admin or permission
|
||||
if !identity.isAdmin() {
|
||||
if e.iam.VerifyActionPermission(r, identity, Action("iam:"+action), "arn:aws:iam:::*", "") != s3err.ErrNone {
|
||||
s3err.WriteErrorResponse(w, r, s3err.ErrAccessDenied)
|
||||
return
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// All other IAM actions require admin or permission
|
||||
if !identity.isAdmin() {
|
||||
if e.iam.VerifyActionPermission(r, identity, Action("iam:"+action), "arn:aws:iam:::*", "") != s3err.ErrNone {
|
||||
s3err.WriteErrorResponse(w, r, s3err.ErrAccessDenied)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
f(w, r)
|
||||
}
|
||||
}
|
||||
|
||||
// AuthIam provides IAM-specific authentication that allows self-service operations.
|
||||
// Users can manage their own access keys without admin rights, but need admin for operations on other users.
|
||||
// The action parameter is accepted for interface compatibility with cb.Limit but is not used
|
||||
// since IAM permission checking is done based on the IAM Action parameter in the request.
|
||||
func (e *EmbeddedIamApi) AuthIam(f http.HandlerFunc, _ Action) http.HandlerFunc {
|
||||
return e.iam.AuthIamManagement(f)
|
||||
}
|
||||
|
||||
// ExecuteAction executes an IAM action with the given values.
|
||||
// If skipPersist is true, the changed configuration is not saved to the persistent store.
|
||||
// reqID is set on the response; if empty, a new request ID is generated.
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
package s3api
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants"
|
||||
"github.com/seaweedfs/seaweedfs/weed/s3api/s3err"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
const (
|
||||
dataPlanePolicy = `{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"s3:*","Resource":"*"}]}`
|
||||
iamAdminPolicy = `{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"iam:*","Resource":"*"}]}`
|
||||
)
|
||||
|
||||
func newIamAuthzTestIam(t *testing.T) *IdentityAccessManagement {
|
||||
t.Helper()
|
||||
iam := &IdentityAccessManagement{}
|
||||
require.NoError(t, iam.PutPolicy("PowerUserPolicy", dataPlanePolicy))
|
||||
require.NoError(t, iam.PutPolicy("IamAdminPolicy", iamAdminPolicy))
|
||||
return iam
|
||||
}
|
||||
|
||||
func iamPostRequest(rawQuery string) *http.Request {
|
||||
url := "http://s3.example.com/"
|
||||
if rawQuery != "" {
|
||||
url += "?" + rawQuery
|
||||
}
|
||||
return httptest.NewRequest(http.MethodPost, url, nil)
|
||||
}
|
||||
|
||||
// A policy granting the S3 data plane must not reach IAM management, including
|
||||
// when the request carries an S3 query parameter — the action resolver used to
|
||||
// read the request shape even for an iam: action.
|
||||
func TestAuthorizeIamActionDeniesDataPlanePolicy(t *testing.T) {
|
||||
iam := newIamAuthzTestIam(t)
|
||||
identity := &Identity{Name: "power_user", PolicyNames: []string{"PowerUserPolicy"}}
|
||||
|
||||
for _, rawQuery := range []string{"", "delete", "acl", "tagging", "policy", "versions"} {
|
||||
t.Run("query="+rawQuery, func(t *testing.T) {
|
||||
assert.Equal(t, s3err.ErrAccessDenied,
|
||||
iam.AuthorizeIamAction(iamPostRequest(rawQuery), identity, "CreateUser", "victim"))
|
||||
assert.Equal(t, s3err.ErrAccessDenied,
|
||||
iam.AuthorizeIamAction(iamPostRequest(rawQuery), identity, "CreateAccessKey", "victim"))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestAuthorizeIamActionAllowsIamPolicy(t *testing.T) {
|
||||
iam := newIamAuthzTestIam(t)
|
||||
identity := &Identity{Name: "iam_operator", PolicyNames: []string{"IamAdminPolicy"}}
|
||||
|
||||
for _, rawQuery := range []string{"", "delete"} {
|
||||
t.Run("query="+rawQuery, func(t *testing.T) {
|
||||
assert.Equal(t, s3err.ErrNone,
|
||||
iam.AuthorizeIamAction(iamPostRequest(rawQuery), identity, "CreateUser", "victim"))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestAuthorizeIamActionSelfServiceAndAdmin(t *testing.T) {
|
||||
iam := newIamAuthzTestIam(t)
|
||||
powerUser := &Identity{Name: "power_user", PolicyNames: []string{"PowerUserPolicy"}}
|
||||
admin := &Identity{Name: "admin", Actions: []Action{s3_constants.ACTION_ADMIN}}
|
||||
|
||||
assert.Equal(t, s3err.ErrNone, iam.AuthorizeIamAction(iamPostRequest(""), powerUser, "CreateAccessKey", ""))
|
||||
assert.Equal(t, s3err.ErrNone, iam.AuthorizeIamAction(iamPostRequest(""), powerUser, "CreateAccessKey", "power_user"))
|
||||
assert.Equal(t, s3err.ErrNone, iam.AuthorizeIamAction(iamPostRequest(""), admin, "CreateUser", "victim"))
|
||||
assert.Equal(t, s3err.ErrAccessDenied, iam.AuthorizeIamAction(iamPostRequest(""), nil, "CreateUser", "victim"))
|
||||
}
|
||||
|
||||
// An identity with no grant at all is the negative control: the route itself
|
||||
// was never open, so a denial here has to come from the policy check.
|
||||
func TestAuthorizeIamActionDeniesUngrantedIdentity(t *testing.T) {
|
||||
iam := newIamAuthzTestIam(t)
|
||||
identity := &Identity{Name: "nobody"}
|
||||
|
||||
assert.Equal(t, s3err.ErrAccessDenied,
|
||||
iam.AuthorizeIamAction(iamPostRequest(""), identity, "CreateUser", "victim"))
|
||||
}
|
||||
|
||||
// A configured anonymous identity must not slip in through the self-service
|
||||
// carve-out, which would otherwise hand it the caller-implied user name.
|
||||
func TestAuthorizeIamActionDeniesAnonymous(t *testing.T) {
|
||||
iam := newIamAuthzTestIam(t)
|
||||
anonymous := &Identity{Name: s3_constants.AccountAnonymousId, PolicyNames: []string{"IamAdminPolicy"}}
|
||||
|
||||
assert.Equal(t, s3err.ErrAccessDenied,
|
||||
iam.AuthorizeIamAction(iamPostRequest(""), anonymous, "CreateAccessKey", ""))
|
||||
assert.Equal(t, s3err.ErrAccessDenied,
|
||||
iam.AuthorizeIamAction(iamPostRequest(""), anonymous, "CreateUser", "victim"))
|
||||
}
|
||||
@@ -463,85 +463,9 @@ func (s3a *S3ApiServer) serveDirectoryContent(w http.ResponseWriter, r *http.Req
|
||||
}
|
||||
}
|
||||
|
||||
// handleVersionedDirectoryObjectRequest answers GET/HEAD for the key "<dir>/" out of
|
||||
// its version history, which for a directory marker lives inside the directory the key
|
||||
// names. Without a history the key is whatever the directory entry says, which is the
|
||||
// unversioned path the caller falls through to.
|
||||
func (s3a *S3ApiServer) handleVersionedDirectoryObjectRequest(w http.ResponseWriter, r *http.Request, bucket, object, handlerName string) bool {
|
||||
if !strings.HasSuffix(object, "/") {
|
||||
return false
|
||||
}
|
||||
// A lookup that fails for any reason other than "not there" leaves the key's state
|
||||
// unknown, and falling through would serve a directory whose current version may be
|
||||
// a delete marker. Only a confirmed absence takes the unversioned path.
|
||||
versioningConfigured, err := s3a.isVersioningConfigured(bucket)
|
||||
if err != nil && !errors.Is(err, filer_pb.ErrNotFound) {
|
||||
glog.Errorf("%s: versioning state of %s unknown: %v", handlerName, bucket, err)
|
||||
s3err.WriteErrorResponse(w, r, s3err.ErrInternalError)
|
||||
return true
|
||||
}
|
||||
if !versioningConfigured {
|
||||
return false
|
||||
}
|
||||
|
||||
if versionId := r.URL.Query().Get("versionId"); versionId != "" {
|
||||
entry, err := s3a.getSpecificObjectVersion(bucket, object, versionId)
|
||||
if err != nil {
|
||||
glog.V(2).Infof("%s: no version %s of directory object %s/%s: %v", handlerName, versionId, bucket, object, err)
|
||||
s3err.WriteErrorResponse(w, r, s3err.ErrNoSuchVersion)
|
||||
return true
|
||||
}
|
||||
w.Header().Set("x-amz-version-id", versionId)
|
||||
if isDeleteMarkerEntry(entry) {
|
||||
w.Header().Set(s3_constants.AmzDeleteMarker, "true")
|
||||
s3err.WriteErrorResponse(w, r, s3err.ErrMethodNotAllowed)
|
||||
return true
|
||||
}
|
||||
s3a.serveDirectoryContent(w, r, entry)
|
||||
return true
|
||||
}
|
||||
|
||||
normalizedObject := s3_constants.NormalizeObjectKey(object)
|
||||
if _, historyErr := s3a.getEntry(s3a.bucketDir(bucket), normalizedObject+s3_constants.VersionsFolder); historyErr != nil {
|
||||
if !errors.Is(historyErr, filer_pb.ErrNotFound) {
|
||||
glog.Errorf("%s: version history of %s/%s unknown: %v", handlerName, bucket, object, historyErr)
|
||||
s3err.WriteErrorResponse(w, r, s3err.ErrInternalError)
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
// A failure here is reported the way the regular-object GET path reports it.
|
||||
entry, err := s3a.getLatestObjectVersion(bucket, object)
|
||||
if err != nil {
|
||||
glog.V(2).Infof("%s: no current version of directory object %s/%s: %v", handlerName, bucket, object, err)
|
||||
s3err.WriteErrorResponse(w, r, s3err.ErrNoSuchKey)
|
||||
return true
|
||||
}
|
||||
versionId := string(entry.Extended[s3_constants.ExtVersionIdKey])
|
||||
if versionId == "" {
|
||||
versionId = "null"
|
||||
}
|
||||
w.Header().Set("x-amz-version-id", versionId)
|
||||
if isDeleteMarkerEntry(entry) {
|
||||
w.Header().Set(s3_constants.AmzDeleteMarker, "true")
|
||||
s3err.WriteErrorResponse(w, r, s3err.ErrNoSuchKey)
|
||||
return true
|
||||
}
|
||||
s3a.serveDirectoryContent(w, r, entry)
|
||||
return true
|
||||
}
|
||||
|
||||
func isDeleteMarkerEntry(entry *filer_pb.Entry) bool {
|
||||
return entry != nil && string(entry.Extended[s3_constants.ExtDeleteMarkerKey]) == "true"
|
||||
}
|
||||
|
||||
// handleDirectoryObjectRequest is a helper function that handles directory object requests
|
||||
// for both GET and HEAD operations, eliminating code duplication
|
||||
func (s3a *S3ApiServer) handleDirectoryObjectRequest(w http.ResponseWriter, r *http.Request, bucket, object, handlerName string) bool {
|
||||
if s3a.handleVersionedDirectoryObjectRequest(w, r, bucket, object, handlerName) {
|
||||
return true
|
||||
}
|
||||
|
||||
// Check if this is a directory object and handle it directly
|
||||
if dirEntry, isDirectoryObject, err := s3a.checkDirectoryObject(bucket, object); err != nil {
|
||||
glog.Errorf("%s: error checking directory object %s/%s: %v", handlerName, bucket, object, err)
|
||||
|
||||
@@ -232,12 +232,13 @@ func (s3a *S3ApiServer) CopyObjectHandler(w http.ResponseWriter, r *http.Request
|
||||
return
|
||||
}
|
||||
|
||||
if sameDestination && (replaceMeta || replaceTagging) && s3a.canUseMetadataOnlySelfCopy(entry, r, dstBucket, dstObject) {
|
||||
replacesSource := copyReplacesSourceEntry(sameDestination, dstVersioningState, srcVersionId)
|
||||
|
||||
if replacesSource && (replaceMeta || replaceTagging) && s3a.canUseMetadataOnlySelfCopy(entry, r, dstBucket, dstObject) {
|
||||
var dstVersionId string
|
||||
var etag string
|
||||
// A non-versioned in-place metadata replace routes to the owner as a
|
||||
// serialized PATCH (off the distributed lock); versioned/suspended (which
|
||||
// create a new version) and the no-owner bootstrap keep the lock.
|
||||
// An in-place metadata replace routes to the owner as a serialized PATCH
|
||||
// (off the distributed lock); the no-owner bootstrap keeps the lock.
|
||||
//
|
||||
// REPLACE can also change Content-Type, which lives on Attributes.Mime,
|
||||
// not Extended. The routed PATCH only carries Extended keys, so when the
|
||||
@@ -246,7 +247,7 @@ func (s3a *S3ApiServer) CopyObjectHandler(w http.ResponseWriter, r *http.Request
|
||||
owner := s3a.objectWriteOwner(dstBucket, dstObject)
|
||||
sourceMime := entry.GetAttributes().GetMime()
|
||||
mimeChanged := resolveDestinationMime(r.Header, sourceMime, replaceMeta) != sourceMime
|
||||
routeInPlace := owner != "" && dstVersioningState == "" && !mimeChanged
|
||||
routeInPlace := owner != "" && !mimeChanged
|
||||
selfCopyBody := func() s3err.ErrorCode {
|
||||
currentEntry, currentErr := s3a.resolveCopySourceEntry(srcBucket, srcObject, srcVersionId, srcVersioningState)
|
||||
if errCode := classifyCopySourceError(currentEntry, currentErr); errCode != s3err.ErrNone {
|
||||
@@ -416,7 +417,7 @@ func (s3a *S3ApiServer) CopyObjectHandler(w http.ResponseWriter, r *http.Request
|
||||
}
|
||||
} else {
|
||||
// Use unified copy strategy approach
|
||||
dstChunks, dstMetadata, copyErr := s3a.executeUnifiedCopyStrategy(entry, r, srcBucket, dstBucket, srcObject, dstObject)
|
||||
dstChunks, dstMetadata, copyErr := s3a.executeUnifiedCopyStrategy(entry, r, srcBucket, dstBucket, srcObject, dstObject, replacesSource)
|
||||
if copyErr != nil {
|
||||
glog.Errorf("CopyObjectHandler unified copy error: %v", copyErr)
|
||||
// Map errors to appropriate S3 errors
|
||||
@@ -474,6 +475,18 @@ func (s3a *S3ApiServer) CopyObjectHandler(w http.ResponseWriter, r *http.Request
|
||||
|
||||
}
|
||||
|
||||
// copyReplacesSourceEntry reports whether a copy writes back to the very entry it
|
||||
// read, which is what lets a strategy hand the source's chunk fids to the
|
||||
// destination instead of copying the data. Nothing refcounts a plain shared chunk
|
||||
// list, so a second live entry on the same chunks loses its data as soon as either
|
||||
// side is deleted. A versioned destination writes a new version file, a suspended
|
||||
// one writes the null version next to a .versions/ entry that stays live, and a
|
||||
// source pinned to a versionId reads a version file that outlives the copy — those
|
||||
// all need the chunks copied for real, as does any copy to a different key.
|
||||
func copyReplacesSourceEntry(sameDestination bool, dstVersioningState, srcVersionId string) bool {
|
||||
return sameDestination && dstVersioningState == "" && srcVersionId == ""
|
||||
}
|
||||
|
||||
func cloneProtoEntry(entry *filer_pb.Entry) *filer_pb.Entry {
|
||||
if entry == nil {
|
||||
return nil
|
||||
@@ -583,8 +596,9 @@ func (s3a *S3ApiServer) finalizeCopyDestination(dstBucket, dstObject, dstVersion
|
||||
return "", "", err
|
||||
}
|
||||
|
||||
if err = s3a.updateIsLatestFlagsForSuspendedVersioning(dstBucket, normalizedObject); err != nil {
|
||||
glog.Warningf("CopyObjectHandler: failed to update suspended version latest flags for %s/%s: %v", dstBucket, normalizedObject, err)
|
||||
// mkFile writes through the default filer, so the ownership check reads there too.
|
||||
if err = s3a.finalizeSuspendedNullWrite("", dstBucket, normalizedObject, s3_constants.ExtETagKey, etag); err != nil {
|
||||
glog.Warningf("CopyObjectHandler: failed to retire the null delete marker for %s/%s: %v", dstBucket, normalizedObject, err)
|
||||
}
|
||||
|
||||
return "", etag, nil
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package s3api
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants"
|
||||
)
|
||||
|
||||
func TestCopyReplacesSourceEntry(t *testing.T) {
|
||||
cases := []struct {
|
||||
name string
|
||||
sameDestination bool
|
||||
versioningState string
|
||||
srcVersionId string
|
||||
want bool
|
||||
}{
|
||||
{"no versioning replaces the bare key", true, "", "", true},
|
||||
{"a copy to another key writes its own entry", false, "", "", false},
|
||||
{"versioning enabled writes a new version file", true, s3_constants.VersioningEnabled, "", false},
|
||||
{"suspended writes the null version beside live versions", true, s3_constants.VersioningSuspended, "", false},
|
||||
{"pinned source version outlives the copy", true, "", "6736fb618f225b190c06e5b4fb63c83b", false},
|
||||
{"pinned null source version", true, "", "null", false},
|
||||
}
|
||||
for _, c := range cases {
|
||||
t.Run(c.name, func(t *testing.T) {
|
||||
if got := copyReplacesSourceEntry(c.sameDestination, c.versioningState, c.srcVersionId); got != c.want {
|
||||
t.Errorf("copyReplacesSourceEntry(%v, %q, %q) = %v, want %v", c.sameDestination, c.versioningState, c.srcVersionId, got, c.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -12,8 +12,10 @@ import (
|
||||
)
|
||||
|
||||
// executeUnifiedCopyStrategy executes the appropriate copy strategy based on encryption state
|
||||
// Returns chunks and destination metadata that should be applied to the destination entry
|
||||
func (s3a *S3ApiServer) executeUnifiedCopyStrategy(entry *filer_pb.Entry, r *http.Request, srcBucket, dstBucket, srcObject, dstObject string) ([]*filer_pb.FileChunk, map[string][]byte, error) {
|
||||
// Returns chunks and destination metadata that should be applied to the destination entry.
|
||||
// replacesSource says the destination entry is the source entry, which is what lets the
|
||||
// key-rotation strategy hand back the source chunks instead of copying them.
|
||||
func (s3a *S3ApiServer) executeUnifiedCopyStrategy(entry *filer_pb.Entry, r *http.Request, srcBucket, dstBucket, srcObject, dstObject string, replacesSource bool) ([]*filer_pb.FileChunk, map[string][]byte, error) {
|
||||
// Per-chunk copy must see data chunks: a manifest chunk copied raw becomes
|
||||
// object data. Resolved manifests stay with the source.
|
||||
if _, err := s3a.flattenManifestChunks(r.Context(), entry); err != nil {
|
||||
@@ -51,7 +53,7 @@ func (s3a *S3ApiServer) executeUnifiedCopyStrategy(entry *filer_pb.Entry, r *htt
|
||||
return chunks, nil, err
|
||||
|
||||
case CopyStrategyKeyRotation:
|
||||
return s3a.executeKeyRotation(entry, r, state, dstBucket, dstPath)
|
||||
return s3a.executeKeyRotation(entry, r, state, dstBucket, dstPath, replacesSource)
|
||||
|
||||
case CopyStrategyEncrypt:
|
||||
return s3a.executeEncryptCopy(entry, r, state, dstBucket, dstPath)
|
||||
@@ -96,7 +98,7 @@ func (s3a *S3ApiServer) mapCopyErrorToS3Error(err error) s3err.ErrorCode {
|
||||
}
|
||||
|
||||
// executeKeyRotation handles key rotation for same-object copies
|
||||
func (s3a *S3ApiServer) executeKeyRotation(entry *filer_pb.Entry, r *http.Request, state *EncryptionState, dstBucket, dstPath string) ([]*filer_pb.FileChunk, map[string][]byte, error) {
|
||||
func (s3a *S3ApiServer) executeKeyRotation(entry *filer_pb.Entry, r *http.Request, state *EncryptionState, dstBucket, dstPath string, replacesSource bool) ([]*filer_pb.FileChunk, map[string][]byte, error) {
|
||||
// For key rotation, we only need to update metadata, not re-copy chunks
|
||||
// This is a significant optimization for same-object key changes
|
||||
|
||||
@@ -105,7 +107,10 @@ func (s3a *S3ApiServer) executeKeyRotation(entry *filer_pb.Entry, r *http.Reques
|
||||
return s3a.executeReencryptCopy(entry, r, state, dstBucket, dstPath)
|
||||
}
|
||||
|
||||
if state.SrcSSEKMS && state.DstSSEKMS {
|
||||
// Handing back the source chunks leaves the destination sharing needles nothing
|
||||
// refcounts, so it is only safe when the destination overwrites the source entry.
|
||||
// A versioned rotation writes a new version beside the source and has to reencrypt.
|
||||
if state.SrcSSEKMS && state.DstSSEKMS && replacesSource {
|
||||
// SSE-KMS key rotation - return existing chunks, metadata will be updated by caller
|
||||
return entry.GetChunks(), nil, nil
|
||||
}
|
||||
|
||||
@@ -122,6 +122,13 @@ func (s3a *S3ApiServer) checkDeleteIfMatch(bucket, object, versionId, versioning
|
||||
func (s3a *S3ApiServer) deleteVersionedObject(r *http.Request, bucket, object, versionId, versioningState string) (deleteMutationResult, s3err.ErrorCode) {
|
||||
var result deleteMutationResult
|
||||
|
||||
// The key "dir/" is the filer directory itself, which a delete marker cannot stand
|
||||
// in for without hiding the children underneath it. It is not a versioned object,
|
||||
// so it is deleted the way an unversioned bucket deletes it.
|
||||
if versionId == "" && strings.HasSuffix(object, "/") {
|
||||
return result, s3a.deleteDirectoryMarker(bucket, object)
|
||||
}
|
||||
|
||||
switch {
|
||||
case versionId != "":
|
||||
versionEntry, versionLookupErr := s3a.getSpecificObjectVersion(bucket, object, versionId)
|
||||
@@ -230,10 +237,21 @@ func (s3a *S3ApiServer) DeleteObjectHandler(w http.ResponseWriter, r *http.Reque
|
||||
var deleteResult deleteMutationResult
|
||||
var deleteCode s3err.ErrorCode
|
||||
|
||||
// A trailing-slash key is a directory marker in every bucket, versioned or not, and
|
||||
// is deleted the same way: the raw delete below cannot handle a directory that still
|
||||
// has children, and versioning has nothing to add to a key that is not an object.
|
||||
deleteHandled := false
|
||||
if versionId == "" && strings.HasSuffix(object, "/") {
|
||||
deleteCode, deleteHandled = s3a.withObjectWriteLock(bucket, object, func() s3err.ErrorCode {
|
||||
return s3a.checkDeleteIfMatch(bucket, object, versionId, versioningState, r.Header.Get(s3_constants.IfMatch), s3err.ErrPreconditionFailed)
|
||||
}, func() s3err.ErrorCode {
|
||||
return s3a.deleteDirectoryMarker(bucket, object)
|
||||
}), true
|
||||
}
|
||||
|
||||
// Fast path: route the delete to the owner filer under its per-path lock;
|
||||
// routedObjectOwner excludes versioned/object-lock buckets.
|
||||
deleteHandled := false
|
||||
if !versioningConfigured {
|
||||
if !deleteHandled && !versioningConfigured {
|
||||
if cond, condOk := buildDeleteCondition(r); condOk {
|
||||
if owner, ownerOk := s3a.routedObjectOwner(bucket, object); ownerOk {
|
||||
resp, err := s3a.routedDelete(owner, bucket, object, cond)
|
||||
@@ -468,6 +486,10 @@ func (s3a *S3ApiServer) DeleteMultipleObjectsHandler(w http.ResponseWriter, r *h
|
||||
return s3err.ErrAccessDenied
|
||||
}
|
||||
|
||||
if strings.HasSuffix(object.Key, "/") {
|
||||
return s3a.deleteDirectoryMarker(bucket, object.Key)
|
||||
}
|
||||
|
||||
if err := s3a.deleteUnversionedObjectWithClient(client, bucket, object.Key, false); err != nil {
|
||||
glog.Errorf("DeleteMultipleObjectsHandler: failed to delete %s/%s: %v", bucket, object.Key, err)
|
||||
return s3err.ErrInternalError
|
||||
|
||||
@@ -752,7 +752,7 @@ func (s3a *S3ApiServer) doListFilerEntries(ctx context.Context, client filer_pb.
|
||||
if cursor.prefixEndsOnDelimiter {
|
||||
cursor.prefixEndsOnDelimiter = false
|
||||
}
|
||||
isKeyObject := s3a.isLiveDirectoryKeyObject(ctx, client, entry, dir+"/"+entry.Name, cursor)
|
||||
isKeyObject := entry.IsDirectoryKeyObject()
|
||||
if isKeyObject {
|
||||
// Directory key objects (created via PutObject with trailing "/")
|
||||
// must appear as regular keys in recursive listing mode.
|
||||
@@ -792,7 +792,7 @@ func (s3a *S3ApiServer) doListFilerEntries(ctx context.Context, client filer_pb.
|
||||
return
|
||||
}
|
||||
// println("doListFilerEntries2 nextMarker", nextMarker)
|
||||
} else if s3a.isLiveDirectoryKeyObject(ctx, client, entry, dir+"/"+entry.Name, cursor) || !s3a.dirHoldsOnlyHiddenEntries(ctx, client, bucket, dir+"/"+entry.Name, cursor) {
|
||||
} else if entry.IsDirectoryKeyObject() || !s3a.dirHoldsOnlyHiddenEntries(ctx, client, bucket, dir+"/"+entry.Name, cursor) {
|
||||
eachEntryFn(dir, entry)
|
||||
}
|
||||
} else {
|
||||
@@ -812,55 +812,6 @@ func (s3a *S3ApiServer) doListFilerEntries(ctx context.Context, client filer_pb.
|
||||
}
|
||||
}
|
||||
|
||||
// isLiveDirectoryKeyObject reports whether entry still stands for the key "<dir>/",
|
||||
// and strips entry in place when it does not. A directory marker deleted in a versioned
|
||||
// bucket keeps its payload on disk — that payload is the key's null version — so the
|
||||
// copy this listing holds is demoted instead, which is what stops the callback further
|
||||
// down from reporting the entry as a key while the directory still serves as a prefix.
|
||||
func (s3a *S3ApiServer) isLiveDirectoryKeyObject(ctx context.Context, client filer_pb.SeaweedFilerClient, entry *filer_pb.Entry, dirPath string, cursor *ListingCursor) bool {
|
||||
if !entry.IsDirectoryKeyObject() {
|
||||
return false
|
||||
}
|
||||
if !cursor.hideDeletedPrefixes || !directoryMarkerIsDeleted(ctx, client, dirPath) {
|
||||
return true
|
||||
}
|
||||
clearDirectoryMarkerMetadata(entry)
|
||||
return false
|
||||
}
|
||||
|
||||
// directoryMarkerIsDeleted reports whether the key "<dir>/" currently resolves to a
|
||||
// delete marker. An explicit directory marker is the filer directory itself, so its
|
||||
// version history is the container's own .versions entry, whose current-version stamp
|
||||
// every pointer flip maintains — one lookup, no version scan. An unstamped history
|
||||
// leaves the key visible, as it was before this check existed.
|
||||
func directoryMarkerIsDeleted(ctx context.Context, client filer_pb.SeaweedFilerClient, dirPath string) bool {
|
||||
// The answer comes off the first entry, so cancel on return rather than draining.
|
||||
ctx, cancel := context.WithCancel(ctx)
|
||||
defer cancel()
|
||||
|
||||
stream, err := client.ListEntries(ctx, &filer_pb.ListEntriesRequest{
|
||||
Directory: dirPath,
|
||||
Prefix: s3_constants.VersionsFolder,
|
||||
Limit: 1,
|
||||
})
|
||||
if err != nil {
|
||||
if !errors.Is(err, filer_pb.ErrNotFound) {
|
||||
glog.V(1).Infof("directoryMarkerIsDeleted %s: %v", dirPath, err)
|
||||
}
|
||||
return false
|
||||
}
|
||||
for {
|
||||
resp, recvErr := stream.Recv()
|
||||
if recvErr != nil {
|
||||
return false
|
||||
}
|
||||
if resp.Entry == nil || resp.Entry.Name != s3_constants.VersionsFolder {
|
||||
continue
|
||||
}
|
||||
return string(resp.Entry.Extended[s3_constants.ExtLatestVersionIsDeleteMarker]) == "true"
|
||||
}
|
||||
}
|
||||
|
||||
// hiddenProbePageSize is the window one probe request asks the filer for, and
|
||||
// hiddenProbeBudget caps how many entries a single list request may look at while
|
||||
// deciding which directories still stand for a prefix.
|
||||
@@ -947,7 +898,7 @@ func (s3a *S3ApiServer) dirHoldsOnlyHiddenEntries(ctx context.Context, client fi
|
||||
}
|
||||
return false
|
||||
}
|
||||
if s3a.isLiveDirectoryKeyObject(ctx, client, entry, dir+"/"+entry.Name, cursor) {
|
||||
if entry.IsDirectoryKeyObject() {
|
||||
return false
|
||||
}
|
||||
if !s3a.dirHoldsOnlyHiddenEntries(ctx, client, bucket, dir+"/"+entry.Name, cursor) {
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
package s3api
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
"context"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
|
||||
"github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants"
|
||||
"github.com/stretchr/testify/assert"
|
||||
grpc "google.golang.org/grpc"
|
||||
)
|
||||
|
||||
// directoryMarker builds the filer directory a PutObject on a trailing-slash key
|
||||
// leaves behind.
|
||||
// leaves behind. Deleting the key strips this metadata back off, so a deleted marker
|
||||
// is just newDir.
|
||||
func directoryMarker(name string) *filer_pb.Entry {
|
||||
entry := newDir(name)
|
||||
entry.Attributes.Mime = s3_constants.FolderMimeType
|
||||
@@ -19,69 +20,47 @@ func directoryMarker(name string) *filer_pb.Entry {
|
||||
return entry
|
||||
}
|
||||
|
||||
// ownVersionsDir builds the history of the key "<dir>/", which lives inside the
|
||||
// directory it names rather than beside it.
|
||||
func ownVersionsDir(deleted bool) *filer_pb.Entry {
|
||||
now := time.Now().Unix()
|
||||
extended := map[string][]byte{
|
||||
s3_constants.ExtLatestVersionIdKey: []byte("v-dir"),
|
||||
s3_constants.ExtLatestVersionMtimeKey: []byte(strconv.FormatInt(now, 10)),
|
||||
s3_constants.ExtLatestVersionSizeKey: []byte("0"),
|
||||
s3_constants.ExtLatestVersionETagKey: []byte(`"d41d8cd98f00b204e9800998ecf8427e"`),
|
||||
s3_constants.ExtLatestVersionIsDeleteMarker: []byte(strconv.FormatBool(deleted)),
|
||||
}
|
||||
return &filer_pb.Entry{
|
||||
Name: s3_constants.VersionsFolder,
|
||||
IsDirectory: true,
|
||||
Attributes: &filer_pb.FuseAttributes{Mtime: now},
|
||||
Extended: extended,
|
||||
}
|
||||
}
|
||||
|
||||
// TestDeletedDirectoryMarkerIsNotListed covers the reported flow: PutObject on "m2/",
|
||||
// DELETE on "m2/" writes a delete marker into m2/.versions, and the key must stop
|
||||
// being reported even though the filer directory that carries it survives.
|
||||
// TestDeletedDirectoryMarkerIsNotListed covers the reported flow. The delete demotes the
|
||||
// directory that carried the key, so what is left lists as the plain directory it is.
|
||||
func TestDeletedDirectoryMarkerIsNotListed(t *testing.T) {
|
||||
client := &testFilerClient{
|
||||
entriesByDir: map[string][]*filer_pb.Entry{
|
||||
"/buckets/test": {directoryMarker("m2")},
|
||||
"/buckets/test/m2": {ownVersionsDir(true)},
|
||||
"/buckets/test": {newDir("m2")},
|
||||
"/buckets/test/m2": {deleteMarkedVersionsDir("f.txt")},
|
||||
},
|
||||
}
|
||||
|
||||
seen := listedNames(t, client, listDirectoryRequest{dir: "/buckets/test", delimiter: "/", bucket: "test"}, &ListingCursor{maxKeys: 1000, hideDeletedPrefixes: true})
|
||||
assert.Empty(t, seen, "a delete-marked directory marker is not a key and names no prefix")
|
||||
assert.Empty(t, seen, "nothing under it is a key, so it names no prefix either")
|
||||
|
||||
seen = listedNames(t, client, listDirectoryRequest{dir: "/buckets/test", bucket: "test"}, &ListingCursor{maxKeys: 1000, hideDeletedPrefixes: true})
|
||||
assert.Empty(t, seen, "the flat listing must not report it either")
|
||||
}
|
||||
|
||||
// TestLiveDirectoryMarkerIsListed pins the other half: a marker whose current version
|
||||
// is real is a key, and the listing reports it from the directory that carries it.
|
||||
// TestLiveDirectoryMarkerIsListed pins the other half: the directory entry carries the
|
||||
// key, so the listing reports it straight off that entry.
|
||||
func TestLiveDirectoryMarkerIsListed(t *testing.T) {
|
||||
client := &testFilerClient{
|
||||
entriesByDir: map[string][]*filer_pb.Entry{
|
||||
"/buckets/test": {directoryMarker("m2")},
|
||||
"/buckets/test/m2": {ownVersionsDir(false)},
|
||||
"/buckets/test/m2": {},
|
||||
},
|
||||
}
|
||||
|
||||
seen := listedNames(t, client, listDirectoryRequest{dir: "/buckets/test", delimiter: "/", bucket: "test"}, &ListingCursor{maxKeys: 1000, hideDeletedPrefixes: true})
|
||||
assert.Equal(t, []string{"m2"}, seen)
|
||||
|
||||
// A live history must not also surface as a phantom key named after its container.
|
||||
seen = listedNames(t, client, listDirectoryRequest{dir: "/buckets/test", bucket: "test"}, &ListingCursor{maxKeys: 1000, hideDeletedPrefixes: true})
|
||||
assert.Equal(t, []string{"m2"}, seen)
|
||||
}
|
||||
|
||||
// TestDeletedDirectoryMarkerKeepsLiveChildren guards the boundary between the two
|
||||
// questions a directory answers: deleting the key "m2/" says nothing about the objects
|
||||
// below it, which keep the prefix alive.
|
||||
// TestDeletedDirectoryMarkerKeepsLiveChildren guards the boundary: deleting the key
|
||||
// "m2/" says nothing about the objects below it, which keep the prefix alive.
|
||||
func TestDeletedDirectoryMarkerKeepsLiveChildren(t *testing.T) {
|
||||
client := &testFilerClient{
|
||||
entriesByDir: map[string][]*filer_pb.Entry{
|
||||
"/buckets/test": {directoryMarker("m2")},
|
||||
"/buckets/test/m2": {ownVersionsDir(true), liveVersionsDir("keep.txt")},
|
||||
"/buckets/test": {newDir("m2")},
|
||||
"/buckets/test/m2": {liveVersionsDir("keep.txt")},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -92,31 +71,55 @@ func TestDeletedDirectoryMarkerKeepsLiveChildren(t *testing.T) {
|
||||
assert.Equal(t, []string{"keep.txt"}, seen, "only the surviving child is a key")
|
||||
}
|
||||
|
||||
// TestDeletedDirectoryMarkerIsNotADirectoryProbe checks the trailing-slash probe: the
|
||||
// key was deleted, so prefix=m2/ answers empty instead of resurfacing the marker.
|
||||
func TestDeletedDirectoryMarkerIsNotADirectoryProbe(t *testing.T) {
|
||||
// ownVersionsDir builds a history recorded inside a directory by an older build, which
|
||||
// described the key "<dir>/" rather than any child of it.
|
||||
func ownVersionsDir() *filer_pb.Entry {
|
||||
entry := deleteMarkedVersionsDir("")
|
||||
entry.Name = s3_constants.VersionsFolder
|
||||
return entry
|
||||
}
|
||||
|
||||
// TestStaleOwnVersionsIsNotAKey pins the guard for buckets written before directory
|
||||
// markers stopped being versioned: a history left inside a directory describes that
|
||||
// directory, and must not surface as a key named after it.
|
||||
func TestStaleOwnVersionsIsNotAKey(t *testing.T) {
|
||||
client := &testFilerClient{
|
||||
entriesByDir: map[string][]*filer_pb.Entry{
|
||||
"/buckets/test": {directoryMarker("m2")},
|
||||
"/buckets/test/m2": {ownVersionsDir(true)},
|
||||
"/buckets/test/m2": {ownVersionsDir()},
|
||||
},
|
||||
}
|
||||
|
||||
seen := listedNames(t, client, listDirectoryRequest{dir: "/buckets/test", prefix: "m2", delimiter: "/", bucket: "test"},
|
||||
&ListingCursor{maxKeys: 1000, prefixEndsOnDelimiter: true, hideDeletedPrefixes: true})
|
||||
assert.Empty(t, seen)
|
||||
seen := listedNames(t, client, listDirectoryRequest{dir: "/buckets/test", bucket: "test"}, &ListingCursor{maxKeys: 1000, hideDeletedPrefixes: true})
|
||||
assert.Equal(t, []string{"m2"}, seen, "the marker is the only key; no phantom m2/m2")
|
||||
}
|
||||
|
||||
// TestUnversionedBucketKeepsItsDirectoryMarkers pins the gate: without versioning there
|
||||
// is no history to consult and no lookup to pay for.
|
||||
func TestUnversionedBucketKeepsItsDirectoryMarkers(t *testing.T) {
|
||||
client := &testFilerClient{
|
||||
// countingFilerClient records how many ListEntries round trips a listing spends.
|
||||
type countingFilerClient struct {
|
||||
*testFilerClient
|
||||
calls int
|
||||
}
|
||||
|
||||
func (c *countingFilerClient) ListEntries(ctx context.Context, in *filer_pb.ListEntriesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[filer_pb.ListEntriesResponse], error) {
|
||||
c.calls++
|
||||
return c.testFilerClient.ListEntries(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// TestDirectoryMarkersCostNoLookups is why the delete is recorded on the directory
|
||||
// entry rather than in a history a listing has to go and read. Buckets written by tools
|
||||
// that keep a marker per directory are made of these, so a round trip per marker is the
|
||||
// whole listing cost.
|
||||
func TestDirectoryMarkersCostNoLookups(t *testing.T) {
|
||||
client := &countingFilerClient{testFilerClient: &testFilerClient{
|
||||
entriesByDir: map[string][]*filer_pb.Entry{
|
||||
"/buckets/test": {directoryMarker("m2")},
|
||||
"/buckets/test/m2": {ownVersionsDir(true)},
|
||||
"/buckets/test": {directoryMarker("d1"), directoryMarker("d2"), directoryMarker("d3")},
|
||||
"/buckets/test/d1": {},
|
||||
"/buckets/test/d2": {},
|
||||
"/buckets/test/d3": {},
|
||||
},
|
||||
}
|
||||
}}
|
||||
|
||||
seen := listedNames(t, client, listDirectoryRequest{dir: "/buckets/test", delimiter: "/", bucket: "test"}, &ListingCursor{maxKeys: 1000})
|
||||
assert.Equal(t, []string{"m2"}, seen)
|
||||
seen := listedNames(t, client, listDirectoryRequest{dir: "/buckets/test", delimiter: "/", bucket: "test"}, &ListingCursor{maxKeys: 1000, hideDeletedPrefixes: true})
|
||||
assert.Equal(t, []string{"d1", "d2", "d3"}, seen)
|
||||
assert.Equal(t, 1, client.calls, "listing directory markers must not cost a round trip per marker")
|
||||
}
|
||||
@@ -189,24 +189,6 @@ func (s3a *S3ApiServer) PutObjectHandler(w http.ResponseWriter, r *http.Request)
|
||||
s3err.WriteErrorResponse(w, r, filerErrorToS3Error(err))
|
||||
return
|
||||
}
|
||||
// A directory marker is stored as the directory itself, so it is the key's null
|
||||
// version. Re-creating one after a delete has to retire that delete marker,
|
||||
// otherwise the key stays invisible to every versioned read. Reporting the PUT
|
||||
// as successful before that is known to have happened would hand the client a
|
||||
// marker it cannot see, so an unreadable versioning state fails the request.
|
||||
state, stateErr := s3a.getVersioningState(bucket)
|
||||
if stateErr != nil && !errors.Is(stateErr, filer_pb.ErrNotFound) {
|
||||
glog.Errorf("PutObjectHandler: versioning state of %s unknown: %v", bucket, stateErr)
|
||||
s3err.WriteErrorResponse(w, r, s3err.ErrInternalError)
|
||||
return
|
||||
}
|
||||
if state != "" {
|
||||
if err := s3a.restoreNullVersion(bucket, strings.TrimPrefix(object, "/")); err != nil {
|
||||
glog.Errorf("PutObjectHandler: failed to restore directory marker %s/%s: %v", bucket, object, err)
|
||||
s3err.WriteErrorResponse(w, r, s3err.ErrInternalError)
|
||||
return
|
||||
}
|
||||
}
|
||||
setEtag(w, dirEtag)
|
||||
} else {
|
||||
// Get detailed versioning state for the bucket
|
||||
@@ -1311,10 +1293,6 @@ func (s3a *S3ApiServer) putSuspendedVersioningObject(r *http.Request, bucket, ob
|
||||
glog.V(3).Infof("putSuspendedVersioningObject: START bucket=%s, object=%s, normalized=%s",
|
||||
bucket, object, normalizedObject)
|
||||
|
||||
// The null version now lives at the regular path, so any null version recorded in
|
||||
// .versions is stale (S3 has the suspended write overwrite it, not accumulate).
|
||||
s3a.removeNullVersionFile(bucket, normalizedObject)
|
||||
|
||||
filePath := s3a.toFilerPath(bucket, normalizedObject)
|
||||
|
||||
body := dataReader
|
||||
@@ -1378,15 +1356,18 @@ func (s3a *S3ApiServer) putSuspendedVersioningObject(r *http.Request, bucket, ob
|
||||
}
|
||||
|
||||
// Versioned/suspended bucket → resolver returns 0; pass it directly.
|
||||
// afterCreate clears the prior latest pointer and stamps the displaced version
|
||||
// with NoncurrentSinceNs — off-ring under the write lock, routed off-lock after
|
||||
// the PUT. Best-effort either way: a stale flag self-heals on the next list.
|
||||
// afterCreate retires the null delete marker a preceding DELETE left, clears the
|
||||
// prior latest pointer and stamps the displaced version with NoncurrentSinceNs —
|
||||
// off-ring under the write lock, routed off-lock after the PUT. Only once the write
|
||||
// has committed: retiring the marker for a write that then fails leaves the pointer
|
||||
// naming a marker that is gone, and the read path heals that by promoting an older
|
||||
// version, republishing the deleted key. Best-effort, as a stale flag self-heals on
|
||||
// the next list.
|
||||
etag, errCode, sseMetadata = s3a.putToFiler(r, filePath, body, bucket, normalizedObject, 1, 0, &putFinalize{
|
||||
afterCreate: func(_ *filer_pb.Entry) s3err.ErrorCode {
|
||||
if err := s3a.updateIsLatestFlagsForSuspendedVersioning(bucket, normalizedObject); err != nil {
|
||||
// Best-effort: a stale IsLatest flag is recoverable on the
|
||||
// next list-versions resync, so don't fail the PUT.
|
||||
glog.Warningf("putSuspendedVersioningObject: failed to update IsLatest flags: %v", err)
|
||||
afterCreate: func(entry *filer_pb.Entry) s3err.ErrorCode {
|
||||
writtenETag := string(entry.Extended[s3_constants.ExtETagKey])
|
||||
if err := s3a.finalizeSuspendedNullWrite("", bucket, normalizedObject, s3_constants.ExtETagKey, writtenETag); err != nil {
|
||||
glog.Warningf("putSuspendedVersioningObject: failed to retire the null delete marker: %v", err)
|
||||
}
|
||||
return s3err.ErrNone
|
||||
},
|
||||
@@ -1401,22 +1382,6 @@ func (s3a *S3ApiServer) putSuspendedVersioningObject(r *http.Request, bucket, ob
|
||||
return etag, s3err.ErrNone, sseMetadata
|
||||
}
|
||||
|
||||
// restoreNullVersion makes the object at the regular path the current version again:
|
||||
// it drops a stale null version from .versions and clears the latest-version pointer,
|
||||
// which is the recorded way of saying "the null object is current". The clearing helper
|
||||
// is named for suspended versioning but does exactly this, and an enabled bucket needs
|
||||
// the same thing when a directory marker is re-created over its delete marker.
|
||||
func (s3a *S3ApiServer) restoreNullVersion(bucket, object string) error {
|
||||
if _, err := s3a.getEntry(s3a.bucketDir(bucket), object+s3_constants.VersionsFolder); err != nil {
|
||||
if errors.Is(err, filer_pb.ErrNotFound) {
|
||||
return nil // no history, so the object at the regular path is already current
|
||||
}
|
||||
return fmt.Errorf("read version history of %s/%s: %w", bucket, object, err)
|
||||
}
|
||||
s3a.removeNullVersionFile(bucket, object)
|
||||
return s3a.updateIsLatestFlagsForSuspendedVersioning(bucket, object)
|
||||
}
|
||||
|
||||
// removeNullVersionFile deletes the "null" version file from an object's .versions
|
||||
// directory, leaving real versions alone. Best-effort: a leftover null version is
|
||||
// superseded by the object at the regular path on the next read.
|
||||
|
||||
@@ -80,6 +80,16 @@ func (s3a *S3ApiServer) ownerRecentlyUnreachable(owner pb.ServerAddress) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// lookupEntryPreferringOwner reads an entry back from a known write owner, so a
|
||||
// caller that just wrote there sees its own write. Unlike getObjectEntryRoutedByKey
|
||||
// it never drops the owner for a healthier peer, which would read behind the write.
|
||||
func (s3a *S3ApiServer) lookupEntryPreferringOwner(owner pb.ServerAddress, dir, name string) (*filer_pb.Entry, error) {
|
||||
if owner == "" {
|
||||
return s3a.getEntry(dir, name)
|
||||
}
|
||||
return s3a.lookupEntryOnFiler(owner, dir, name)
|
||||
}
|
||||
|
||||
// lookupEntryOnFiler resolves dir/name against a single filer, without failover.
|
||||
func (s3a *S3ApiServer) lookupEntryOnFiler(filer pb.ServerAddress, dir, name string) (*filer_pb.Entry, error) {
|
||||
var entry *filer_pb.Entry
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package s3api
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
@@ -194,3 +196,37 @@ func (s3a *S3ApiServer) versionedFinalize(bucket, object, versionId, versionFile
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// finalizeSuspendedNullWrite retires the null delete marker a suspended DELETE left
|
||||
// in .versions, so reads resolve the null version the caller just wrote at the
|
||||
// regular path. Pointer first: clearing the marker while the pointer still names it
|
||||
// makes reads rescan .versions and promote an older version. Call only once the
|
||||
// write has committed — retiring the marker for a write that then fails republishes
|
||||
// the deleted key.
|
||||
//
|
||||
// identityKey/identityValue name the extended attribute that marks the entry as the
|
||||
// caller's write (an upload id, an etag). The cleanup rewrites shared .versions state
|
||||
// off the object write lock, so it is skipped unless the regular path still holds that
|
||||
// write: a DELETE that landed in between owns the null slot, and retiring its marker
|
||||
// would resurrect an older version under a key that was deleted. Narrows that race,
|
||||
// does not close it. owner, when set, is the filer the write went to, so the check
|
||||
// reads its own write back rather than a peer that may be behind.
|
||||
func (s3a *S3ApiServer) finalizeSuspendedNullWrite(owner pb.ServerAddress, bucket, object, identityKey, identityValue string) error {
|
||||
dir, name := util.FullPath(s3a.toFilerPath(bucket, object)).DirAndName()
|
||||
current, err := s3a.lookupEntryPreferringOwner(owner, dir, name)
|
||||
if err != nil && !errors.Is(err, filer_pb.ErrNotFound) {
|
||||
return fmt.Errorf("re-read %s/%s: %w", bucket, object, err)
|
||||
}
|
||||
if current == nil || string(current.Extended[identityKey]) != identityValue {
|
||||
glog.V(2).Infof("finalizeSuspendedNullWrite: %s/%s superseded by a concurrent write", bucket, object)
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := s3a.updateIsLatestFlagsForSuspendedVersioning(bucket, object); err != nil {
|
||||
return err
|
||||
}
|
||||
// Best-effort: with the pointer gone the regular-path object already owns the
|
||||
// null slot, so a surviving marker is neither read nor listed.
|
||||
s3a.removeNullVersionFile(bucket, object)
|
||||
return nil
|
||||
}
|
||||
@@ -649,9 +649,8 @@ func (vc *versionCollector) processVersionsDirectory(entryPath string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// processExplicitDirectory handles an explicit S3 directory object. containerPath is
|
||||
// the directory's own filer path, which is where the key's version history lives.
|
||||
func (vc *versionCollector) processExplicitDirectory(entryPath, containerPath string, entry *filer_pb.Entry) error {
|
||||
// processExplicitDirectory handles an explicit S3 directory object
|
||||
func (vc *versionCollector) processExplicitDirectory(entryPath string, entry *filer_pb.Entry) {
|
||||
directoryKey := entryPath
|
||||
if !strings.HasSuffix(directoryKey, "/") {
|
||||
directoryKey += "/"
|
||||
@@ -663,33 +662,18 @@ func (vc *versionCollector) processExplicitDirectory(entryPath, containerPath st
|
||||
// this mirrors ListObjectsV2 and AWS, and stops clients like Veeam that
|
||||
// reject unexpected keys in a listing from aborting.
|
||||
if !strings.HasPrefix(directoryKey, vc.prefix) {
|
||||
return nil
|
||||
return
|
||||
}
|
||||
|
||||
// Skip directories at or before keyMarker
|
||||
if vc.keyMarker != "" && directoryKey <= vc.keyMarker {
|
||||
return nil
|
||||
}
|
||||
|
||||
// The directory entry is this key's null version. A history under it names the
|
||||
// current version, so the null is only latest when there is no pointer to follow.
|
||||
// A history we cannot read leaves that unknown, and claiming latest would hide a
|
||||
// current delete marker, so the listing fails instead of guessing.
|
||||
isLatest := true
|
||||
versionsEntry, err := vc.s3a.getEntry(containerPath, s3_constants.VersionsFolder)
|
||||
switch {
|
||||
case err == nil:
|
||||
if _, hasPointer := versionsEntry.Extended[s3_constants.ExtLatestVersionIdKey]; hasPointer {
|
||||
isLatest = false
|
||||
}
|
||||
case !errors.Is(err, filer_pb.ErrNotFound):
|
||||
return fmt.Errorf("read version history of %s: %w", containerPath, err)
|
||||
return
|
||||
}
|
||||
|
||||
versionEntry := &VersionEntry{
|
||||
Key: directoryKey,
|
||||
VersionId: "null",
|
||||
IsLatest: isLatest,
|
||||
IsLatest: true,
|
||||
LastModified: time.Unix(entry.Attributes.Mtime, 0),
|
||||
ETag: "\"d41d8cd98f00b204e9800998ecf8427e\"", // Empty content ETag
|
||||
Size: 0,
|
||||
@@ -697,7 +681,6 @@ func (vc *versionCollector) processExplicitDirectory(entryPath, containerPath st
|
||||
StorageClass: StorageClass(vc.s3a.getStorageClassFromExtended(entry.Extended)),
|
||||
}
|
||||
*vc.allVersions = append(*vc.allVersions, versionEntry)
|
||||
return nil
|
||||
}
|
||||
|
||||
// processRegularFile handles a regular file entry (pre-versioning or suspended-versioning object)
|
||||
@@ -887,9 +870,7 @@ func (vc *versionCollector) processDirectory(currentPath, entryPath string, entr
|
||||
// an SDK PutObject of "dir/" carries a default Content-Type, so the two
|
||||
// listings must agree on what counts as a directory key.
|
||||
if entry.IsDirectoryKeyObject() {
|
||||
if err := vc.processExplicitDirectory(entryPath, path.Join(currentPath, entry.Name), entry); err != nil {
|
||||
return err
|
||||
}
|
||||
vc.processExplicitDirectory(entryPath, entry)
|
||||
}
|
||||
|
||||
// Skip entire subdirectory if all keys within it are before the keyMarker.
|
||||
|
||||
@@ -723,21 +723,11 @@ func (s3a *S3ApiServer) UnifiedPostHandler(w http.ResponseWriter, r *http.Reques
|
||||
// Always set identity in context when non-nil to ensure downstream handlers have access
|
||||
r = r.WithContext(recordIdentityInContext(r, identity))
|
||||
|
||||
targetUserName := r.Form.Get("UserName")
|
||||
|
||||
// Check permissions based on action type
|
||||
isSelfServiceAction := iamRequiresAdminForOthers(action)
|
||||
isActingOnSelf := targetUserName == "" || targetUserName == identity.Name
|
||||
|
||||
// Permission check is required for all actions except for self-service actions
|
||||
// performed on the user's own identity.
|
||||
if !(isSelfServiceAction && isActingOnSelf) {
|
||||
if !identity.isAdmin() {
|
||||
if s3a.iam.VerifyActionPermission(r, identity, Action("iam:"+action), "arn:aws:iam:::*", "") != s3err.ErrNone {
|
||||
s3err.WriteErrorResponse(w, r, s3err.ErrAccessDenied)
|
||||
return
|
||||
}
|
||||
}
|
||||
// UserName comes from the body only, the same place DoActions reads it
|
||||
// from, so the authorized target and the acted-on target cannot differ.
|
||||
if s3a.iam.AuthorizeIamAction(r, identity, action, r.PostForm.Get("UserName")) != s3err.ErrNone {
|
||||
s3err.WriteErrorResponse(w, r, s3err.ErrAccessDenied)
|
||||
return
|
||||
}
|
||||
|
||||
// Call Limit middleware + DoActions
|
||||
|
||||
@@ -108,7 +108,7 @@ One filer `SubscribeMetadata` stream per `dailyrun.Run()` call, covering every s
|
||||
|
||||
`globalStartTsNs = min(per-shard cursor, runNow - maxTTL)`. Pre-loaded once at pass start so the subscription's `StartTsNs` covers every shard's needed range; per-shard drains then filter `ev.TsNs <= shard.startTsNs` locally.
|
||||
|
||||
Fan-out cancels the reader on the first `ev.TsNs > runNow` (meta-log events arrive in TsNs order; everything after is past the pass boundary). Per-shard channels are buffered to 256 events — large enough to absorb bursts without back-pressuring the fan-out.
|
||||
The subscription is bounded: `UntilNs = runNow`, so the filer ends the stream once it has delivered everything up to the pass boundary and the pass ends on its own. Fan-out also cancels the reader on the first `ev.TsNs > runNow` as a backstop (meta-log events arrive in TsNs order; everything after is past the boundary) — that used to be the *only* way a pass ended, which wedged the job for as long as the cluster stayed quiet. Per-shard channels are buffered to 256 events — large enough to absorb bursts without back-pressuring the fan-out.
|
||||
|
||||
## Action kinds and dispatch paths
|
||||
|
||||
@@ -140,7 +140,7 @@ type Cursor struct {
|
||||
|
||||
`LastWalkedNs` is JSON-omitempty, so cursor files written before that field existed decode cleanly as zero (treated as "never walked steady-state" → next pass seeds the anchor).
|
||||
|
||||
Cursor save uses a fresh `context.Background()` with a 5s timeout because the steady-state drain exits via passCtx cancellation (the only way an idle subscription ends). Saving with the canceled passCtx would silently drop the cursor and the next pass would re-replay from the same floor.
|
||||
Cursor save uses a fresh `context.Background()` with a 5s timeout because a caller-imposed wall-clock cap on the pass (the shell driver's `-runtime`) cancels the drain's context. Saving with the canceled context would silently drop the cursor and the next pass would re-replay from the same floor.
|
||||
|
||||
In steady state the start position honors the cursor verbatim — the floor `runNow - maxTTL` is applied only on cold start (`!found`). The drain freezes the cursor at the last pre-skip event so pending matches with `DueTime == TsNs + maxTTL` stay in scope across passes; bumping forward in steady state would orphan exactly those events.
|
||||
|
||||
|
||||
@@ -19,19 +19,25 @@ import (
|
||||
|
||||
// recordingClient captures every LifecycleDelete request the
|
||||
// daily-run path emits. Default outcome is DONE; tests that need
|
||||
// other outcomes set responses by index.
|
||||
// other outcomes set responses by index, or outcomeByObject when
|
||||
// shards dispatch concurrently and call order isn't fixed.
|
||||
type recordingClient struct {
|
||||
mu sync.Mutex
|
||||
requests []*s3_lifecycle_pb.LifecycleDeleteRequest
|
||||
responses []s3_lifecycle_pb.LifecycleDeleteOutcome
|
||||
calls atomic.Int32
|
||||
mu sync.Mutex
|
||||
requests []*s3_lifecycle_pb.LifecycleDeleteRequest
|
||||
responses []s3_lifecycle_pb.LifecycleDeleteOutcome
|
||||
outcomeByObject map[string]s3_lifecycle_pb.LifecycleDeleteOutcome
|
||||
calls atomic.Int32
|
||||
}
|
||||
|
||||
func (c *recordingClient) LifecycleDelete(_ context.Context, req *s3_lifecycle_pb.LifecycleDeleteRequest) (*s3_lifecycle_pb.LifecycleDeleteResponse, error) {
|
||||
c.mu.Lock()
|
||||
c.requests = append(c.requests, req)
|
||||
idx := int(c.calls.Add(1)) - 1
|
||||
byObject, pinned := c.outcomeByObject[req.ObjectPath]
|
||||
c.mu.Unlock()
|
||||
if pinned {
|
||||
return &s3_lifecycle_pb.LifecycleDeleteResponse{Outcome: byObject}, nil
|
||||
}
|
||||
out := s3_lifecycle_pb.LifecycleDeleteOutcome_DONE
|
||||
if idx < len(c.responses) {
|
||||
out = c.responses[idx]
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/seaweedfs/seaweedfs/weed/glog"
|
||||
@@ -88,8 +89,15 @@ type Config struct {
|
||||
|
||||
// 0 -> unbounded.
|
||||
EventBudget int
|
||||
|
||||
// 0 -> defaultSubscriptionReceiveTimeout.
|
||||
SubscriptionReceiveTimeout time.Duration
|
||||
}
|
||||
|
||||
// Above the filer's 15m maxGapStall, so a subscriber parked on a gap is
|
||||
// not mistaken for a stalled one.
|
||||
const defaultSubscriptionReceiveTimeout = 20 * time.Minute
|
||||
|
||||
// Run executes the daily replay for every shard in cfg.Shards
|
||||
// concurrently. Returns the first shard error; the rest log and run to
|
||||
// completion so one shard's transient failure doesn't lose other shards'
|
||||
@@ -132,6 +140,9 @@ func Run(ctx context.Context, cfg Config) error {
|
||||
fanoutDone chan struct{}
|
||||
cancelRead context.CancelFunc
|
||||
globalStartTsNs int64
|
||||
// Set by the reader goroutine when it stops for a reason we asked
|
||||
// for, rather than a broken stream.
|
||||
stoppedOnPurpose atomic.Bool
|
||||
)
|
||||
if rsh != [32]byte{} {
|
||||
// Pre-load all per-shard cursors so the shared subscription
|
||||
@@ -141,7 +152,7 @@ func Run(ctx context.Context, cfg Config) error {
|
||||
// exactly the case where a rule's TTL equals maxTTL and an
|
||||
// older event still has DueTime <= runNow.
|
||||
globalStartTsNs = computeGlobalStartTsNs(ctx, cfg, runNow, maxTTL)
|
||||
shardEvents, readerDone, fanoutDone, cancelRead = startSharedSubscription(ctx, cfg, runNow, globalStartTsNs)
|
||||
shardEvents, readerDone, fanoutDone, cancelRead = startSharedSubscription(ctx, cfg, runNow, globalStartTsNs, &stoppedOnPurpose)
|
||||
defer cancelRead()
|
||||
}
|
||||
|
||||
@@ -159,6 +170,13 @@ func Run(ctx context.Context, cfg Config) error {
|
||||
if err := runShard(ctx, cfg, snap, runNow, sh, ch); err != nil {
|
||||
errCh <- err
|
||||
}
|
||||
// A halted dispatch returns runShard mid-stream. Keep
|
||||
// discarding, or the fan-out blocks on this shard's full
|
||||
// buffer and starves every other drain.
|
||||
if ch != nil {
|
||||
for range ch {
|
||||
}
|
||||
}
|
||||
}()
|
||||
}
|
||||
wg.Wait()
|
||||
@@ -167,11 +185,16 @@ func Run(ctx context.Context, cfg Config) error {
|
||||
// Tear down the shared subscription. cancelRead unblocks both the
|
||||
// reader's gRPC stream and the fan-out's send loop; we wait on both
|
||||
// so their goroutines don't outlive Run.
|
||||
var readerErr error
|
||||
if cancelRead != nil {
|
||||
cancelRead()
|
||||
<-fanoutDone
|
||||
if rerr := <-readerDone; rerr != nil && !errors.Is(rerr, context.Canceled) && !errors.Is(rerr, context.DeadlineExceeded) {
|
||||
glog.V(2).Infof("daily_run: shared reader returned: %v", rerr)
|
||||
if rerr := <-readerDone; rerr != nil && !stoppedOnPurpose.Load() {
|
||||
// The drains ended on a closed channel, so the pass is
|
||||
// truncated. Cursors hold what was processed; what matters is
|
||||
// that the job doesn't go green on a dead subscription.
|
||||
readerErr = fmt.Errorf("shared meta-log subscription: %w", rerr)
|
||||
glog.Warningf("daily_run: %v", readerErr)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,6 +208,12 @@ func Run(ctx context.Context, cfg Config) error {
|
||||
glog.V(1).Infof("daily_run: additional shard error: %v", err)
|
||||
}
|
||||
}
|
||||
if readerErr != nil {
|
||||
errCount++
|
||||
if first == nil {
|
||||
first = readerErr
|
||||
}
|
||||
}
|
||||
status := "ok"
|
||||
if first != nil {
|
||||
status = "error"
|
||||
@@ -280,7 +309,9 @@ func computeGlobalStartTsNs(ctx context.Context, cfg Config, runNow time.Time, m
|
||||
// Events arriving with TsNs > runUpTo (the pass boundary) cause the
|
||||
// fan-out to cancel the reader and close all per-shard channels,
|
||||
// ending the pass.
|
||||
func startSharedSubscription(ctx context.Context, cfg Config, runNow time.Time, globalStartTsNs int64) (map[int]chan *reader.Event, chan error, chan struct{}, context.CancelFunc) {
|
||||
func startSharedSubscription(ctx context.Context, cfg Config, runNow time.Time, globalStartTsNs int64, stoppedOnPurpose *atomic.Bool) (map[int]chan *reader.Event, chan error, chan struct{}, context.CancelFunc) {
|
||||
// Set by the fan-out when it ends the pass on an event past runUpTo.
|
||||
var pastBoundary atomic.Bool
|
||||
shardSet := make(map[int]bool, len(cfg.Shards))
|
||||
shardEvents := make(map[int]chan *reader.Event, len(cfg.Shards))
|
||||
for _, sh := range cfg.Shards {
|
||||
@@ -301,22 +332,40 @@ func startSharedSubscription(ctx context.Context, cfg Config, runNow time.Time,
|
||||
clientID = int32(util.RandomInt32())
|
||||
}
|
||||
|
||||
runUpTo := runNow.UnixNano()
|
||||
receiveTimeout := cfg.SubscriptionReceiveTimeout
|
||||
if receiveTimeout == 0 {
|
||||
receiveTimeout = defaultSubscriptionReceiveTimeout
|
||||
}
|
||||
events := make(chan *reader.Event, 4*len(cfg.Shards))
|
||||
rd := &reader.Reader{
|
||||
ShardPredicate: func(id int) bool { return shardSet[id] },
|
||||
BucketsPath: cfg.BucketsPath,
|
||||
StartTsNs: globalStartTsNs,
|
||||
// The pass covers (globalStartTsNs, runUpTo]. Unbounded, it ends
|
||||
// only when an unrelated write pushes an event past runUpTo — so
|
||||
// a quiet cluster wedges it.
|
||||
UntilTsNs: runUpTo,
|
||||
Events: events,
|
||||
EventBudget: cfg.EventBudget,
|
||||
ReceiveTimeout: receiveTimeout,
|
||||
}
|
||||
|
||||
readerCtx, cancelReader := context.WithCancel(ctx)
|
||||
readerDone := make(chan error, 1)
|
||||
go func() {
|
||||
readerDone <- rd.Run(readerCtx, cfg.FilerClient, clientName, clientID)
|
||||
rerr := rd.Run(readerCtx, cfg.FilerClient, clientName, clientID)
|
||||
// Not decidable from the error: a stream we cancel and one the
|
||||
// filer cancels both arrive as codes.Canceled. Snapshot intent
|
||||
// here rather than after teardown, or a deadline expiring during
|
||||
// the drains and cursor saves masks a real failure.
|
||||
stoppedOnPurpose.Store(ctx.Err() != nil || pastBoundary.Load())
|
||||
readerDone <- rerr
|
||||
// Only sender. Closing is what ends the fan-out, and through it
|
||||
// every drain, when the stream finishes on its own.
|
||||
close(events)
|
||||
}()
|
||||
|
||||
runUpTo := runNow.UnixNano()
|
||||
fanoutDone := make(chan struct{})
|
||||
go func() {
|
||||
defer close(fanoutDone)
|
||||
@@ -341,6 +390,7 @@ func startSharedSubscription(ctx context.Context, cfg Config, runNow time.Time,
|
||||
// too. Cancel the reader so subsequent passes don't
|
||||
// pay for stream tail we'd drop anyway.
|
||||
if ev.TsNs > runUpTo {
|
||||
pastBoundary.Store(true)
|
||||
cancelReader()
|
||||
return
|
||||
}
|
||||
@@ -389,6 +439,10 @@ func validate(cfg Config) error {
|
||||
if cfg.WalkerInterval < 0 {
|
||||
return fmt.Errorf("daily_run: negative WalkerInterval %v (0 = unthrottled, positive values throttle)", cfg.WalkerInterval)
|
||||
}
|
||||
// Negative would reach the reader as "disabled" by accident.
|
||||
if cfg.SubscriptionReceiveTimeout < 0 {
|
||||
return fmt.Errorf("daily_run: negative SubscriptionReceiveTimeout %v (0 = default %v)", cfg.SubscriptionReceiveTimeout, defaultSubscriptionReceiveTimeout)
|
||||
}
|
||||
for _, sh := range cfg.Shards {
|
||||
if sh < 0 || sh >= s3lifecycle.ShardCount {
|
||||
return fmt.Errorf("daily_run: shard %d out of [0, %d)", sh, s3lifecycle.ShardCount)
|
||||
@@ -554,18 +608,15 @@ func runShard(ctx context.Context, cfg Config, snap *engine.Snapshot, runNow tim
|
||||
}
|
||||
|
||||
lastOK, _, drainErr := drainShardEvents(ctx, cfg, runNow, shardID, snap, startTsNs, events)
|
||||
// Cursor save uses a fresh ctx because the steady-state drain exits
|
||||
// via passCtx cancellation (the only signal the filer subscription
|
||||
// gets when no new events arrive). Saving with the canceled passCtx
|
||||
// would silently drop the cursor and the next pass would re-replay
|
||||
// from the same floor — defeating advancement entirely.
|
||||
// Fresh ctx: a wall-clock cap on the pass (the shell driver's
|
||||
// -runtime) cancels the drain's, and saving with it would drop the
|
||||
// cursor and re-replay from the same floor next pass.
|
||||
saveCtx, saveCancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
defer saveCancel()
|
||||
if drainErr != nil {
|
||||
_ = saveCursorAndPublish(saveCtx, cfg.Persister, shardID, Cursor{TsNs: lastOK, RuleSetHash: rsh, PromotedHash: promoted, LastWalkedNs: lastWalkedNs})
|
||||
// passCtx timeout is the expected end-of-pass for an idle
|
||||
// subscription; not a real error. Other drain errors still
|
||||
// propagate.
|
||||
// Cut short by its wall-clock cap: truncated, not failed — the
|
||||
// cursor above carries progress forward.
|
||||
if errors.Is(drainErr, context.DeadlineExceeded) || errors.Is(drainErr, context.Canceled) {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -0,0 +1,297 @@
|
||||
package dailyrun
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
|
||||
"github.com/seaweedfs/seaweedfs/weed/s3api/s3lifecycle"
|
||||
"github.com/seaweedfs/seaweedfs/weed/s3api/s3lifecycle/engine"
|
||||
"github.com/seaweedfs/seaweedfs/weed/s3api/s3lifecycle/reader"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// idleSubscribeStream: nothing to deliver past the pass boundary. A
|
||||
// bounded subscription gets EOF; an unbounded one blocks forever.
|
||||
type idleSubscribeStream struct {
|
||||
grpc.ClientStream
|
||||
ctx context.Context
|
||||
untilNs int64
|
||||
}
|
||||
|
||||
func (s *idleSubscribeStream) Recv() (*filer_pb.SubscribeMetadataResponse, error) {
|
||||
if s.untilNs != 0 {
|
||||
return nil, io.EOF
|
||||
}
|
||||
<-s.ctx.Done()
|
||||
return nil, s.ctx.Err()
|
||||
}
|
||||
|
||||
type idleSubscribeClient struct {
|
||||
filer_pb.SeaweedFilerClient
|
||||
gotReq chan *filer_pb.SubscribeMetadataRequest
|
||||
}
|
||||
|
||||
func (c *idleSubscribeClient) SubscribeMetadata(ctx context.Context, req *filer_pb.SubscribeMetadataRequest, _ ...grpc.CallOption) (filer_pb.SeaweedFiler_SubscribeMetadataClient, error) {
|
||||
select {
|
||||
case c.gotReq <- req:
|
||||
default:
|
||||
}
|
||||
return &idleSubscribeStream{ctx: ctx, untilNs: req.UntilNs}, nil
|
||||
}
|
||||
|
||||
// The reported wedge: the pass ended only when an unrelated write pushed
|
||||
// an event past its boundary, so a quiet cluster starved every drain and
|
||||
// Run's WaitGroup never reached zero.
|
||||
func TestRun_EndsOnIdleSubscription(t *testing.T) {
|
||||
e := engine.New()
|
||||
e.Compile([]engine.CompileInput{
|
||||
{Bucket: "b1", Rules: []*s3lifecycle.Rule{
|
||||
{ID: "r", Status: s3lifecycle.StatusEnabled, ExpirationDays: 30},
|
||||
}},
|
||||
}, engine.CompileOptions{})
|
||||
require.NotEqual(t, [32]byte{}, engine.ReplayContentHash(e.Snapshot()),
|
||||
"rule must be replay-eligible or Run skips the subscription entirely")
|
||||
|
||||
client := &idleSubscribeClient{gotReq: make(chan *filer_pb.SubscribeMetadataRequest, 1)}
|
||||
runNow := time.Now().UTC()
|
||||
cfg := Config{
|
||||
Shards: []int{0, 1, 2},
|
||||
BucketsPath: "/buckets",
|
||||
Engine: e,
|
||||
FilerClient: client,
|
||||
Client: stubLifecycleClient{},
|
||||
Persister: newMemPersister(),
|
||||
Lister: stubSiblingLister{},
|
||||
Now: func() time.Time { return runNow },
|
||||
}
|
||||
|
||||
done := make(chan error, 1)
|
||||
go func() { done <- Run(context.Background(), cfg) }()
|
||||
select {
|
||||
case err := <-done:
|
||||
require.NoError(t, err)
|
||||
case <-time.After(10 * time.Second):
|
||||
t.Fatal("Run did not return on an idle subscription")
|
||||
}
|
||||
|
||||
req := <-client.gotReq
|
||||
assert.Equal(t, runNow.UnixNano(), req.UntilNs, "subscription must stop at the pass boundary")
|
||||
}
|
||||
|
||||
// failingSubscribeClient fails the subscribe call outright.
|
||||
type failingSubscribeClient struct {
|
||||
filer_pb.SeaweedFilerClient
|
||||
err error
|
||||
}
|
||||
|
||||
func (c *failingSubscribeClient) SubscribeMetadata(_ context.Context, _ *filer_pb.SubscribeMetadataRequest, _ ...grpc.CallOption) (filer_pb.SeaweedFiler_SubscribeMetadataClient, error) {
|
||||
return nil, c.err
|
||||
}
|
||||
|
||||
// Flip side of closing the event channel: the drains now end cleanly on
|
||||
// a dead subscription, so the pass would otherwise go green having
|
||||
// processed nothing.
|
||||
func TestRun_ReaderFailureFailsThePass(t *testing.T) {
|
||||
e := engine.New()
|
||||
e.Compile([]engine.CompileInput{
|
||||
{Bucket: "b1", Rules: []*s3lifecycle.Rule{
|
||||
{ID: "r", Status: s3lifecycle.StatusEnabled, ExpirationDays: 30},
|
||||
}},
|
||||
}, engine.CompileOptions{})
|
||||
|
||||
cfg := Config{
|
||||
Shards: []int{0, 1},
|
||||
BucketsPath: "/buckets",
|
||||
Engine: e,
|
||||
FilerClient: &failingSubscribeClient{err: status.Error(codes.Unavailable, "filer down")},
|
||||
Client: stubLifecycleClient{},
|
||||
Persister: newMemPersister(),
|
||||
Lister: stubSiblingLister{},
|
||||
}
|
||||
|
||||
done := make(chan error, 1)
|
||||
go func() { done <- Run(context.Background(), cfg) }()
|
||||
select {
|
||||
case err := <-done:
|
||||
require.Error(t, err, "a dead subscription must not report a successful pass")
|
||||
assert.Contains(t, err.Error(), "subscription")
|
||||
case <-time.After(10 * time.Second):
|
||||
t.Fatal("Run did not return after the subscription failed")
|
||||
}
|
||||
}
|
||||
|
||||
// blockingSubscribeStream never delivers; only a cap ends the pass.
|
||||
type blockingSubscribeStream struct {
|
||||
grpc.ClientStream
|
||||
ctx context.Context
|
||||
}
|
||||
|
||||
func (s *blockingSubscribeStream) Recv() (*filer_pb.SubscribeMetadataResponse, error) {
|
||||
<-s.ctx.Done()
|
||||
// A canceled gRPC stream returns a status code, not context.Canceled.
|
||||
return nil, status.Error(codes.Canceled, "context canceled")
|
||||
}
|
||||
|
||||
type blockingSubscribeClient struct {
|
||||
filer_pb.SeaweedFilerClient
|
||||
}
|
||||
|
||||
func (c *blockingSubscribeClient) SubscribeMetadata(ctx context.Context, _ *filer_pb.SubscribeMetadataRequest, _ ...grpc.CallOption) (filer_pb.SeaweedFiler_SubscribeMetadataClient, error) {
|
||||
return &blockingSubscribeStream{ctx: ctx}, nil
|
||||
}
|
||||
|
||||
// Counterweight to TestRun_ServerSideCancelFailsThePass: same
|
||||
// codes.Canceled from the reader, opposite verdict. Only intent
|
||||
// separates them, which is why the decision reads ctx not the error.
|
||||
func TestRun_CappedPassIsNotAFailure(t *testing.T) {
|
||||
e := engine.New()
|
||||
e.Compile([]engine.CompileInput{
|
||||
{Bucket: "b1", Rules: []*s3lifecycle.Rule{
|
||||
{ID: "r", Status: s3lifecycle.StatusEnabled, ExpirationDays: 30},
|
||||
}},
|
||||
}, engine.CompileOptions{})
|
||||
|
||||
cfg := Config{
|
||||
Shards: []int{0, 1},
|
||||
BucketsPath: "/buckets",
|
||||
Engine: e,
|
||||
FilerClient: &blockingSubscribeClient{},
|
||||
Client: stubLifecycleClient{},
|
||||
Persister: newMemPersister(),
|
||||
Lister: stubSiblingLister{},
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 200*time.Millisecond)
|
||||
defer cancel()
|
||||
done := make(chan error, 1)
|
||||
go func() { done <- Run(ctx, cfg) }()
|
||||
select {
|
||||
case err := <-done:
|
||||
require.NoError(t, err, "a pass truncated by its own wall-clock cap is not a failure")
|
||||
case <-time.After(10 * time.Second):
|
||||
t.Fatal("Run did not return after the pass was capped")
|
||||
}
|
||||
}
|
||||
|
||||
// Neither UntilNs nor keepalive reaches this: a healthy connection whose
|
||||
// filer has stopped producing.
|
||||
func TestRun_StalledSubscriptionTimesOutThePass(t *testing.T) {
|
||||
e := engine.New()
|
||||
e.Compile([]engine.CompileInput{
|
||||
{Bucket: "b1", Rules: []*s3lifecycle.Rule{
|
||||
{ID: "r", Status: s3lifecycle.StatusEnabled, ExpirationDays: 30},
|
||||
}},
|
||||
}, engine.CompileOptions{})
|
||||
|
||||
cfg := Config{
|
||||
Shards: []int{0, 1},
|
||||
BucketsPath: "/buckets",
|
||||
Engine: e,
|
||||
FilerClient: &blockingSubscribeClient{},
|
||||
Client: stubLifecycleClient{},
|
||||
Persister: newMemPersister(),
|
||||
Lister: stubSiblingLister{},
|
||||
SubscriptionReceiveTimeout: 50 * time.Millisecond,
|
||||
}
|
||||
|
||||
done := make(chan error, 1)
|
||||
go func() { done <- Run(context.Background(), cfg) }()
|
||||
select {
|
||||
case err := <-done:
|
||||
require.ErrorIs(t, err, reader.ErrReceiveTimeout)
|
||||
case <-time.After(10 * time.Second):
|
||||
t.Fatal("Run did not return on a stalled subscription")
|
||||
}
|
||||
}
|
||||
|
||||
func TestValidate_RejectsNegativeSubscriptionReceiveTimeout(t *testing.T) {
|
||||
cfg := validatableConfig()
|
||||
cfg.SubscriptionReceiveTimeout = -time.Second
|
||||
require.ErrorContains(t, validate(cfg), "SubscriptionReceiveTimeout")
|
||||
cfg.SubscriptionReceiveTimeout = 0
|
||||
require.NoError(t, validate(cfg))
|
||||
}
|
||||
|
||||
// slowSavePersister stretches teardown past the caller's deadline.
|
||||
type slowSavePersister struct {
|
||||
*memPersister
|
||||
delay time.Duration
|
||||
}
|
||||
|
||||
func (p *slowSavePersister) Save(ctx context.Context, shardID int, c Cursor) error {
|
||||
time.Sleep(p.delay)
|
||||
return p.memPersister.Save(ctx, shardID, c)
|
||||
}
|
||||
|
||||
// A reader that fails while the caller's deadline is still live, on a
|
||||
// pass whose teardown then outlives that deadline. Sampling ctx.Err()
|
||||
// after the drains and cursor saves would read the late deadline as
|
||||
// intent and report the truncated pass as a success.
|
||||
func TestRun_LateDeadlineDoesNotMaskReaderFailure(t *testing.T) {
|
||||
e := engine.New()
|
||||
e.Compile([]engine.CompileInput{
|
||||
{Bucket: "b1", Rules: []*s3lifecycle.Rule{
|
||||
{ID: "r", Status: s3lifecycle.StatusEnabled, ExpirationDays: 30},
|
||||
}},
|
||||
}, engine.CompileOptions{})
|
||||
|
||||
cfg := Config{
|
||||
Shards: []int{0, 1},
|
||||
BucketsPath: "/buckets",
|
||||
Engine: e,
|
||||
FilerClient: &failingSubscribeClient{err: status.Error(codes.Unavailable, "filer down")},
|
||||
Client: stubLifecycleClient{},
|
||||
Persister: &slowSavePersister{memPersister: newMemPersister(), delay: 300 * time.Millisecond},
|
||||
Lister: stubSiblingLister{},
|
||||
}
|
||||
|
||||
// Deadline lands during the cursor saves, well after the reader failed.
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond)
|
||||
defer cancel()
|
||||
done := make(chan error, 1)
|
||||
go func() { done <- Run(ctx, cfg) }()
|
||||
select {
|
||||
case err := <-done:
|
||||
require.Error(t, err, "a deadline expiring during teardown must not excuse an earlier reader failure")
|
||||
require.NotNil(t, ctx.Err(), "test is meaningless unless the deadline did expire")
|
||||
case <-time.After(10 * time.Second):
|
||||
t.Fatal("Run did not return")
|
||||
}
|
||||
}
|
||||
|
||||
// The case status-code classification could not express: the filer
|
||||
// cancels while the caller's context is untouched.
|
||||
func TestRun_ServerSideCancelFailsThePass(t *testing.T) {
|
||||
e := engine.New()
|
||||
e.Compile([]engine.CompileInput{
|
||||
{Bucket: "b1", Rules: []*s3lifecycle.Rule{
|
||||
{ID: "r", Status: s3lifecycle.StatusEnabled, ExpirationDays: 30},
|
||||
}},
|
||||
}, engine.CompileOptions{})
|
||||
|
||||
cfg := Config{
|
||||
Shards: []int{0, 1},
|
||||
BucketsPath: "/buckets",
|
||||
Engine: e,
|
||||
FilerClient: &failingSubscribeClient{err: status.Error(codes.Canceled, "context canceled")},
|
||||
Client: stubLifecycleClient{},
|
||||
Persister: newMemPersister(),
|
||||
Lister: stubSiblingLister{},
|
||||
}
|
||||
|
||||
done := make(chan error, 1)
|
||||
go func() { done <- Run(context.Background(), cfg) }()
|
||||
select {
|
||||
case err := <-done:
|
||||
require.Error(t, err, "a peer-canceled stream truncates the pass and must not report success")
|
||||
case <-time.After(10 * time.Second):
|
||||
t.Fatal("Run did not return after the subscription was canceled")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
package dailyrun
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"strconv"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
|
||||
"github.com/seaweedfs/seaweedfs/weed/pb/s3_lifecycle_pb"
|
||||
"github.com/seaweedfs/seaweedfs/weed/s3api/s3lifecycle"
|
||||
"github.com/seaweedfs/seaweedfs/weed/s3api/s3lifecycle/engine"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
// scriptedSubscribeStream replays a fixed list, then EOFs like a filer
|
||||
// honoring UntilNs.
|
||||
type scriptedSubscribeStream struct {
|
||||
grpc.ClientStream
|
||||
responses []*filer_pb.SubscribeMetadataResponse
|
||||
next int
|
||||
}
|
||||
|
||||
func (s *scriptedSubscribeStream) Recv() (*filer_pb.SubscribeMetadataResponse, error) {
|
||||
if s.next >= len(s.responses) {
|
||||
return nil, io.EOF
|
||||
}
|
||||
resp := s.responses[s.next]
|
||||
s.next++
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
type scriptedSubscribeClient struct {
|
||||
filer_pb.SeaweedFilerClient
|
||||
responses []*filer_pb.SubscribeMetadataResponse
|
||||
}
|
||||
|
||||
func (c *scriptedSubscribeClient) SubscribeMetadata(_ context.Context, _ *filer_pb.SubscribeMetadataRequest, _ ...grpc.CallOption) (filer_pb.SeaweedFiler_SubscribeMetadataClient, error) {
|
||||
return &scriptedSubscribeStream{responses: c.responses}, nil
|
||||
}
|
||||
|
||||
func subscribeResponse(bucket, key string, mtime time.Time, tsNs int64) *filer_pb.SubscribeMetadataResponse {
|
||||
return &filer_pb.SubscribeMetadataResponse{
|
||||
TsNs: tsNs,
|
||||
EventNotification: &filer_pb.EventNotification{
|
||||
NewParentPath: "/buckets/" + bucket,
|
||||
NewEntry: &filer_pb.Entry{
|
||||
Name: key,
|
||||
Attributes: &filer_pb.FuseAttributes{Mtime: mtime.Unix(), FileSize: 1},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// keyForShard finds an object key in bucket that hashes to shardID.
|
||||
func keyForShard(t *testing.T, bucket string, shardID int) string {
|
||||
t.Helper()
|
||||
for i := 0; i < 10000; i++ {
|
||||
key := "k" + strconv.Itoa(i)
|
||||
if s3lifecycle.ShardID(bucket, key) == shardID {
|
||||
return key
|
||||
}
|
||||
}
|
||||
t.Fatalf("no key hashes to shard %d", shardID)
|
||||
return ""
|
||||
}
|
||||
|
||||
// The second wedge: a drain halted by a BLOCKED dispatch stops reading
|
||||
// its channel, the fan-out blocks once the 256 buffer fills, and every
|
||||
// other shard starves behind it.
|
||||
func TestRun_HaltedShardDoesNotStarveOthers(t *testing.T) {
|
||||
const bucket = "bk"
|
||||
rule := &s3lifecycle.Rule{ID: "r", Status: s3lifecycle.StatusEnabled, ExpirationDays: 1}
|
||||
prior := map[s3lifecycle.ActionKey]engine.PriorState{}
|
||||
ruleHash := s3lifecycle.RuleHash(rule)
|
||||
for _, k := range s3lifecycle.RuleActionKinds(rule) {
|
||||
prior[s3lifecycle.ActionKey{Bucket: bucket, RuleHash: ruleHash, ActionKind: k}] = engine.PriorState{
|
||||
BootstrapComplete: true,
|
||||
Mode: engine.ModeEventDriven,
|
||||
}
|
||||
}
|
||||
e := engine.New()
|
||||
snap := e.Compile([]engine.CompileInput{{Bucket: bucket, Rules: []*s3lifecycle.Rule{rule}}},
|
||||
engine.CompileOptions{PriorStates: prior})
|
||||
|
||||
haltedShard, starvedShard := 0, 1
|
||||
haltedKey := keyForShard(t, bucket, haltedShard)
|
||||
starvedKey := keyForShard(t, bucket, starvedShard)
|
||||
|
||||
runNow := time.Now().UTC()
|
||||
evTime := runNow.Add(-48 * time.Hour) // past the 1-day expiration
|
||||
// Past the 256 buffer, so the fan-out blocks on the halted shard
|
||||
// before reaching the starved shard's event.
|
||||
var responses []*filer_pb.SubscribeMetadataResponse
|
||||
for i := 0; i < 300; i++ {
|
||||
responses = append(responses, subscribeResponse(bucket, haltedKey, evTime, evTime.UnixNano()+int64(i)))
|
||||
}
|
||||
responses = append(responses, subscribeResponse(bucket, starvedKey, evTime, runNow.Add(-time.Hour).UnixNano()))
|
||||
|
||||
// Pinned per object, not call index: the shards dispatch concurrently.
|
||||
client := &recordingClient{outcomeByObject: map[string]s3_lifecycle_pb.LifecycleDeleteOutcome{
|
||||
haltedKey: s3_lifecycle_pb.LifecycleDeleteOutcome_BLOCKED,
|
||||
}}
|
||||
|
||||
// Resume from before the events; the cold-start floor would skip them.
|
||||
// Hashes must match or runShard takes the recovery branch instead.
|
||||
persister := newMemPersister()
|
||||
seeded := Cursor{
|
||||
TsNs: runNow.Add(-72 * time.Hour).UnixNano(),
|
||||
RuleSetHash: engine.ReplayContentHash(snap),
|
||||
PromotedHash: engine.PromotedHash(snap, engine.MaxEffectiveTTL(snap)),
|
||||
}
|
||||
for _, sh := range []int{haltedShard, starvedShard} {
|
||||
require.NoError(t, persister.Save(context.Background(), sh, seeded))
|
||||
}
|
||||
|
||||
cfg := Config{
|
||||
Shards: []int{haltedShard, starvedShard},
|
||||
BucketsPath: "/buckets",
|
||||
Engine: e,
|
||||
FilerClient: &scriptedSubscribeClient{responses: responses},
|
||||
Client: client,
|
||||
Persister: persister,
|
||||
Lister: stubSiblingLister{},
|
||||
Now: func() time.Time { return runNow },
|
||||
}
|
||||
|
||||
done := make(chan error, 1)
|
||||
go func() { done <- Run(context.Background(), cfg) }()
|
||||
select {
|
||||
case err := <-done:
|
||||
require.NoError(t, err)
|
||||
case <-time.After(10 * time.Second):
|
||||
t.Fatal("Run wedged: the fan-out blocked on a shard that had stopped draining")
|
||||
}
|
||||
|
||||
// Returning isn't enough: dropping the starved shard's events would
|
||||
// return just as cleanly.
|
||||
assert.Contains(t, client.seenObjects(), starvedKey,
|
||||
"the shard behind the halted one must still get its events")
|
||||
starvedCursor, found, err := persister.Load(context.Background(), starvedShard)
|
||||
require.NoError(t, err)
|
||||
require.True(t, found)
|
||||
assert.Greater(t, starvedCursor.TsNs, seeded.TsNs, "starved shard's cursor must advance")
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package dailyrun
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -15,19 +16,25 @@ import (
|
||||
// memPersister is a minimal in-memory CursorPersister. Phase 4b tests
|
||||
// drive runShard directly; the recovery-branch path returns before
|
||||
// drainShardEvents so the heavier filer/client/lister fakes aren't
|
||||
// needed here.
|
||||
// needed here. Locked because Run fans out a goroutine per shard and
|
||||
// they all load and save through the same persister.
|
||||
type memPersister struct {
|
||||
mu sync.Mutex
|
||||
store map[int]Cursor
|
||||
}
|
||||
|
||||
func newMemPersister() *memPersister { return &memPersister{store: map[int]Cursor{}} }
|
||||
|
||||
func (p *memPersister) Load(_ context.Context, shardID int) (Cursor, bool, error) {
|
||||
p.mu.Lock()
|
||||
defer p.mu.Unlock()
|
||||
c, ok := p.store[shardID]
|
||||
return c, ok, nil
|
||||
}
|
||||
|
||||
func (p *memPersister) Save(_ context.Context, shardID int, c Cursor) error {
|
||||
p.mu.Lock()
|
||||
defer p.mu.Unlock()
|
||||
p.store[shardID] = c
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -75,17 +75,57 @@ type Reader struct {
|
||||
StartTsNs int64
|
||||
Events chan<- *Event
|
||||
|
||||
// UntilTsNs ends the stream once the filer has delivered through this
|
||||
// timestamp. Zero follows forever, which on an idle cluster parks a
|
||||
// bounded caller in Recv until something unrelated is written.
|
||||
UntilTsNs int64
|
||||
|
||||
// EventBudget caps how many events Run processes before returning nil.
|
||||
// Zero = unbounded; the run continues until ctx cancellation or stream
|
||||
// error. Used by the worker scheduler to bound a single READ task.
|
||||
EventBudget int
|
||||
|
||||
// ReceiveTimeout bounds the wait for each response, covering a filer
|
||||
// that stops producing while the transport still answers keepalives.
|
||||
// Also opts into idle heartbeats so a caught-up stream stays alive.
|
||||
// Keep above the filer's 15m maxGapStall — a subscriber parked on a
|
||||
// gap sends nothing and is not stuck. Zero disables it.
|
||||
ReceiveTimeout time.Duration
|
||||
|
||||
// bucketsPathSlash is BucketsPath with a guaranteed trailing slash,
|
||||
// computed once on Run and reused per event to avoid recomputing the
|
||||
// normalized prefix in extractBucketKey.
|
||||
bucketsPathSlash string
|
||||
}
|
||||
|
||||
// ErrReceiveTimeout: stream still open, but no events and no heartbeats.
|
||||
var ErrReceiveTimeout = errors.New("reader: metadata receive timeout")
|
||||
|
||||
type receiveResult struct {
|
||||
resp *filer_pb.SubscribeMetadataResponse
|
||||
err error
|
||||
}
|
||||
|
||||
// awaitResponse waits for the next response under ReceiveTimeout. Started
|
||||
// per call, so it times the filer only — a slow Events consumer blocks in
|
||||
// dispatchOne, outside this window, and can't trip the watchdog.
|
||||
func (r *Reader) awaitResponse(ctx context.Context, received <-chan receiveResult) (*filer_pb.SubscribeMetadataResponse, error, bool) {
|
||||
var timeout <-chan time.Time
|
||||
if r.ReceiveTimeout > 0 {
|
||||
timer := time.NewTimer(r.ReceiveTimeout)
|
||||
defer timer.Stop()
|
||||
timeout = timer.C
|
||||
}
|
||||
select {
|
||||
case result := <-received:
|
||||
return result.resp, result.err, false
|
||||
case <-timeout:
|
||||
return nil, nil, true
|
||||
case <-ctx.Done():
|
||||
return nil, ctx.Err(), false
|
||||
}
|
||||
}
|
||||
|
||||
// Run subscribes via SubscribeMetadata starting at the configured position,
|
||||
// filters to the configured shard set, and emits Events. Returns on
|
||||
// ctx.Done(), io.EOF, or stream error. Caller is responsible for closing
|
||||
@@ -102,6 +142,9 @@ func (r *Reader) Run(ctx context.Context, client filer_pb.SeaweedFilerClient, cl
|
||||
if r.BucketsPath == "" {
|
||||
return errors.New("reader: empty BucketsPath")
|
||||
}
|
||||
if r.ReceiveTimeout < 0 {
|
||||
return fmt.Errorf("reader: negative ReceiveTimeout %v", r.ReceiveTimeout)
|
||||
}
|
||||
r.bucketsPathSlash = r.BucketsPath
|
||||
if !strings.HasSuffix(r.bucketsPathSlash, "/") {
|
||||
r.bucketsPathSlash += "/"
|
||||
@@ -111,20 +154,47 @@ func (r *Reader) Run(ctx context.Context, client filer_pb.SeaweedFilerClient, cl
|
||||
if sinceNs == 0 && r.Cursor != nil {
|
||||
sinceNs = r.Cursor.MinTsNs()
|
||||
}
|
||||
stream, err := client.SubscribeMetadata(ctx, &filer_pb.SubscribeMetadataRequest{
|
||||
// Own context: aborting the RPC is the only way to unblock Recv.
|
||||
streamCtx, cancelStream := context.WithCancel(ctx)
|
||||
defer cancelStream()
|
||||
stream, err := client.SubscribeMetadata(streamCtx, &filer_pb.SubscribeMetadataRequest{
|
||||
ClientName: clientName,
|
||||
PathPrefix: r.BucketsPath,
|
||||
SinceNs: sinceNs,
|
||||
UntilNs: r.UntilTsNs,
|
||||
ClientId: clientID,
|
||||
ClientSupportsBatching: true,
|
||||
// dispatchOne drops these, but arriving at all is the point.
|
||||
ClientSupportsIdleHeartbeat: r.ReceiveTimeout > 0,
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("subscribe: %w", err)
|
||||
}
|
||||
|
||||
// Buffered so a response landing as the watchdog fires doesn't strand
|
||||
// this goroutine.
|
||||
received := make(chan receiveResult, 1)
|
||||
go func() {
|
||||
for {
|
||||
resp, recvErr := stream.Recv()
|
||||
select {
|
||||
case received <- receiveResult{resp: resp, err: recvErr}:
|
||||
case <-streamCtx.Done():
|
||||
return
|
||||
}
|
||||
if recvErr != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
processed := 0
|
||||
for {
|
||||
resp, recvErr := stream.Recv()
|
||||
resp, recvErr, timedOut := r.awaitResponse(streamCtx, received)
|
||||
if timedOut {
|
||||
cancelStream() // unwind the goroutine blocked in Recv
|
||||
return fmt.Errorf("%w after %s", ErrReceiveTimeout, r.ReceiveTimeout)
|
||||
}
|
||||
if recvErr == io.EOF {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
package reader
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
// stalledStream stays open and never delivers: keepalives answered, no
|
||||
// progress.
|
||||
type stalledStream struct {
|
||||
grpc.ClientStream
|
||||
ctx context.Context
|
||||
}
|
||||
|
||||
func (s *stalledStream) Recv() (*filer_pb.SubscribeMetadataResponse, error) {
|
||||
<-s.ctx.Done()
|
||||
return nil, s.ctx.Err()
|
||||
}
|
||||
|
||||
type stalledClient struct {
|
||||
filer_pb.SeaweedFilerClient
|
||||
req *filer_pb.SubscribeMetadataRequest
|
||||
}
|
||||
|
||||
func (c *stalledClient) SubscribeMetadata(ctx context.Context, req *filer_pb.SubscribeMetadataRequest, _ ...grpc.CallOption) (filer_pb.SeaweedFiler_SubscribeMetadataClient, error) {
|
||||
c.req = req
|
||||
return &stalledStream{ctx: ctx}, nil
|
||||
}
|
||||
|
||||
func TestRun_ReceiveTimeoutOnStalledStream(t *testing.T) {
|
||||
client := &stalledClient{}
|
||||
r := &Reader{
|
||||
ShardPredicate: func(int) bool { return true },
|
||||
BucketsPath: "/buckets",
|
||||
Events: make(chan *Event, 1),
|
||||
ReceiveTimeout: 50 * time.Millisecond,
|
||||
}
|
||||
|
||||
done := make(chan error, 1)
|
||||
go func() { done <- r.Run(context.Background(), client, "test", 1) }()
|
||||
select {
|
||||
case err := <-done:
|
||||
require.ErrorIs(t, err, ErrReceiveTimeout)
|
||||
case <-time.After(5 * time.Second):
|
||||
t.Fatal("Run did not time out on a stalled stream")
|
||||
}
|
||||
assert.True(t, client.req.ClientSupportsIdleHeartbeat,
|
||||
"a reader with a receive timeout must ask for heartbeats, or a caught-up stream looks stalled")
|
||||
}
|
||||
|
||||
// heartbeatStream delivers only heartbeats: a ts, no EventNotification.
|
||||
type heartbeatStream struct {
|
||||
grpc.ClientStream
|
||||
every time.Duration
|
||||
sent int
|
||||
max int
|
||||
}
|
||||
|
||||
func (s *heartbeatStream) Recv() (*filer_pb.SubscribeMetadataResponse, error) {
|
||||
if s.sent >= s.max {
|
||||
return nil, context.Canceled
|
||||
}
|
||||
time.Sleep(s.every)
|
||||
s.sent++
|
||||
return &filer_pb.SubscribeMetadataResponse{TsNs: int64(s.sent)}, nil
|
||||
}
|
||||
|
||||
type heartbeatClient struct {
|
||||
filer_pb.SeaweedFilerClient
|
||||
stream *heartbeatStream
|
||||
}
|
||||
|
||||
func (c *heartbeatClient) SubscribeMetadata(_ context.Context, _ *filer_pb.SubscribeMetadataRequest, _ ...grpc.CallOption) (filer_pb.SeaweedFiler_SubscribeMetadataClient, error) {
|
||||
return c.stream, nil
|
||||
}
|
||||
|
||||
// Why the timeout is safe to set: a caught-up stream keeps arriving, so
|
||||
// the watchdog fires on real silence, not on an idle cluster.
|
||||
func TestRun_HeartbeatsHoldTheStreamOpen(t *testing.T) {
|
||||
stream := &heartbeatStream{every: 20 * time.Millisecond, max: 10}
|
||||
r := &Reader{
|
||||
ShardPredicate: func(int) bool { return true },
|
||||
BucketsPath: "/buckets",
|
||||
Events: make(chan *Event, 1),
|
||||
ReceiveTimeout: 200 * time.Millisecond,
|
||||
}
|
||||
|
||||
done := make(chan error, 1)
|
||||
go func() { done <- r.Run(context.Background(), &heartbeatClient{stream: stream}, "test", 1) }()
|
||||
select {
|
||||
case err := <-done:
|
||||
assert.False(t, errors.Is(err, ErrReceiveTimeout),
|
||||
"heartbeats spanning more than one timeout window must keep the stream alive")
|
||||
case <-time.After(5 * time.Second):
|
||||
t.Fatal("Run never returned")
|
||||
}
|
||||
assert.Equal(t, 10, stream.sent, "every heartbeat should have been consumed")
|
||||
}
|
||||
|
||||
func TestRun_RejectsNegativeReceiveTimeout(t *testing.T) {
|
||||
r := &Reader{
|
||||
ShardPredicate: func(int) bool { return true },
|
||||
BucketsPath: "/buckets",
|
||||
Events: make(chan *Event, 1),
|
||||
ReceiveTimeout: -time.Second,
|
||||
}
|
||||
err := r.Run(context.Background(), &stalledClient{}, "test", 1)
|
||||
require.Error(t, err)
|
||||
assert.Contains(t, err.Error(), "ReceiveTimeout")
|
||||
}
|
||||
@@ -387,6 +387,7 @@ func (fs *FilerServer) applyStorageDefaultsToEntry(ctx context.Context, entry *f
|
||||
} else if entry.TtlSec == 0 {
|
||||
entry.TtlSec = so.TtlSeconds
|
||||
}
|
||||
entry.ApplyS3ExpiryMetadata()
|
||||
return so, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -36,12 +36,16 @@ func TestObjectTransactionPutAppliesConfiguredTTLAndExpires(t *testing.T) {
|
||||
Entry: &filer_pb.Entry{
|
||||
Name: "expired.mp4",
|
||||
Attributes: &filer_pb.FuseAttributes{
|
||||
Crtime: old.Unix(),
|
||||
Crtime: time.Now().Unix(),
|
||||
Mtime: old.Unix(),
|
||||
FileMode: 0644,
|
||||
FileSize: 123,
|
||||
TtlSec: 0,
|
||||
},
|
||||
Extended: map[string][]byte{
|
||||
"Seaweed-X-Amz-Owner": []byte("admin"),
|
||||
"Seaweed-X-Amz-ETag": []byte("abc123"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -60,6 +64,9 @@ func TestObjectTransactionPutAppliesConfiguredTTLAndExpires(t *testing.T) {
|
||||
if got := entry.TtlSec; got != 3600 {
|
||||
t.Fatalf("TtlSec = %d, want 3600 from fs.configure storage rule", got)
|
||||
}
|
||||
if _, found := entry.Extended["X-Seaweedfs-Expires-S3"]; !found {
|
||||
t.Fatalf("Header X-Seaweedfs-Expires-S3 not found")
|
||||
}
|
||||
|
||||
_, err = fs.filer.FindEntry(context.Background(), util.FullPath("/buckets/video/expired.mp4"))
|
||||
if err != filer_pb.ErrNotFound {
|
||||
@@ -90,12 +97,16 @@ func TestObjectTransactionPutPreservesExplicitTTL(t *testing.T) {
|
||||
Entry: &filer_pb.Entry{
|
||||
Name: "lifecycle.mp4",
|
||||
Attributes: &filer_pb.FuseAttributes{
|
||||
Crtime: now.Unix(),
|
||||
Crtime: time.Now().Add(-2 * time.Hour).Unix(),
|
||||
Mtime: now.Unix(),
|
||||
FileMode: 0644,
|
||||
FileSize: 123,
|
||||
TtlSec: 7200,
|
||||
},
|
||||
Extended: map[string][]byte{
|
||||
"Seaweed-X-Amz-Owner": []byte("admin"),
|
||||
"Seaweed-X-Amz-ETag": []byte("abc123"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -114,6 +125,9 @@ func TestObjectTransactionPutPreservesExplicitTTL(t *testing.T) {
|
||||
if got := entry.TtlSec; got != 7200 {
|
||||
t.Fatalf("TtlSec = %d, want explicit TTL 7200 to win over fs.configure", got)
|
||||
}
|
||||
if _, found := entry.Extended["X-Seaweedfs-Expires-S3"]; !found {
|
||||
t.Fatalf("Header X-Seaweedfs-Expires-S3 not found")
|
||||
}
|
||||
}
|
||||
|
||||
func TestObjectTransactionPutClearsTTLForRemoteEntry(t *testing.T) {
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"flag"
|
||||
"fmt"
|
||||
"github.com/seaweedfs/seaweedfs/weed/placement"
|
||||
"io"
|
||||
"path/filepath"
|
||||
"sync"
|
||||
@@ -489,26 +490,36 @@ func (c *commandVolumeTierMove) ensureReplicationFulfilled(commandEnv *CommandEn
|
||||
|
||||
fmt.Fprintf(writer, "volume %d: creating %d additional replica(s) for replication %s\n", vid, additionalCopiesNeeded, replicaPlacement)
|
||||
|
||||
fn := capacityByFreeVolumeCount(toDiskType)
|
||||
// One picker decides where copies go, so this command spreads and stays near
|
||||
// the source the same way every other mover does. Constraints it cannot model
|
||||
// -- replica placement, and a node already holding the volume -- stay here.
|
||||
topo := topologyFromLocations(allLocations)
|
||||
// The picker answers with a node; replica placement is judged on where that
|
||||
// node sits, so keep the mapping back to its rack and data center.
|
||||
placeOf := make(map[string]location, len(allLocations))
|
||||
for _, l := range allLocations {
|
||||
placeOf[l.dataNode.Id] = l
|
||||
}
|
||||
taken := make(map[string]bool)
|
||||
copiesMade := 0
|
||||
for _, candidateDst := range allLocations {
|
||||
if copiesMade >= additionalCopiesNeeded {
|
||||
for copiesMade < additionalCopiesNeeded {
|
||||
dst := placement.PickTarget(topo, placement.PlacementPreference{
|
||||
Source: sourceAddress.String(),
|
||||
DiskType: toDiskType,
|
||||
Exclude: taken,
|
||||
Accept: func(dn *master_pb.DataNodeInfo, dc, rack string) bool {
|
||||
if nodesWithVolume[dn.Id] {
|
||||
return false
|
||||
}
|
||||
return satisfyReplicaPlacement(replicaPlacement, targetTierReplicas, newLocation(dc, rack, dn))
|
||||
},
|
||||
})
|
||||
if dst == nil {
|
||||
break
|
||||
}
|
||||
if fn(candidateDst.dataNode) <= 0 {
|
||||
continue
|
||||
}
|
||||
// Skip nodes that already host this volume on any disk type to avoid
|
||||
// VolumeCopy conflicts (e.g., same volume on source tier and target tier).
|
||||
if nodesWithVolume[candidateDst.dataNode.Id] {
|
||||
continue
|
||||
}
|
||||
if !satisfyReplicaPlacement(replicaPlacement, targetTierReplicas, candidateDst) {
|
||||
continue
|
||||
}
|
||||
|
||||
candidateAddress := pb.NewServerAddressFromDataNode(candidateDst.dataNode)
|
||||
fmt.Fprintf(writer, "volume %d: replicating from %s to %s\n", vid, sourceAddress, candidateDst.dataNode.Id)
|
||||
taken[dst.Id] = true
|
||||
candidateDst := placeOf[dst.Id]
|
||||
candidateAddress := pb.NewServerAddressFromDataNode(dst)
|
||||
|
||||
if copyErr := replicateVolumeToServer(context.Background(), commandEnv.option.GrpcDialOption, writer, vid, sourceAddress, candidateAddress, toDiskType.ReadableString()); copyErr != nil {
|
||||
return nil, fmt.Errorf("replicate volume %d to %s: %v", vid, candidateDst.dataNode.Id, copyErr)
|
||||
@@ -527,7 +538,8 @@ func (c *commandVolumeTierMove) ensureReplicationFulfilled(commandEnv *CommandEn
|
||||
location: &candidateDst,
|
||||
info: targetTierReplicas[0].info,
|
||||
})
|
||||
addVolumeCount(candidateDst.dataNode.DiskInfos[string(toDiskType)], 1)
|
||||
// PickTarget already spent the slot in topo, which shares these DataNodeInfo
|
||||
// pointers with allLocations, so counting it again here would double it.
|
||||
copiesMade++
|
||||
}
|
||||
|
||||
@@ -591,3 +603,31 @@ func collectVolumeIdsForTierChange(topologyInfo *master_pb.TopologyInfo, volumeS
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// topologyFromLocations rebuilds a topology snapshot from the locations a
|
||||
// command already collected, so placement sees exactly the candidate set the
|
||||
// command would have iterated.
|
||||
func topologyFromLocations(locations []location) *master_pb.TopologyInfo {
|
||||
dcs := make(map[string]map[string][]*master_pb.DataNodeInfo)
|
||||
var dcOrder []string
|
||||
rackOrder := make(map[string][]string)
|
||||
for _, l := range locations {
|
||||
if _, ok := dcs[l.dc]; !ok {
|
||||
dcs[l.dc] = make(map[string][]*master_pb.DataNodeInfo)
|
||||
dcOrder = append(dcOrder, l.dc)
|
||||
}
|
||||
if _, ok := dcs[l.dc][l.rack]; !ok {
|
||||
rackOrder[l.dc] = append(rackOrder[l.dc], l.rack)
|
||||
}
|
||||
dcs[l.dc][l.rack] = append(dcs[l.dc][l.rack], l.dataNode)
|
||||
}
|
||||
topo := &master_pb.TopologyInfo{}
|
||||
for _, dc := range dcOrder {
|
||||
dcInfo := &master_pb.DataCenterInfo{Id: dc}
|
||||
for _, rack := range rackOrder[dc] {
|
||||
dcInfo.RackInfos = append(dcInfo.RackInfos, &master_pb.RackInfo{Id: rack, DataNodeInfos: dcs[dc][rack]})
|
||||
}
|
||||
topo.DataCenterInfos = append(topo.DataCenterInfos, dcInfo)
|
||||
}
|
||||
return topo
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
var (
|
||||
MAJOR_VERSION = int32(4)
|
||||
MINOR_VERSION = int32(40)
|
||||
MINOR_VERSION = int32(41)
|
||||
VERSION_NUMBER = fmt.Sprintf("%d.%02d", MAJOR_VERSION, MINOR_VERSION)
|
||||
VERSION = util.SizeLimit + " " + VERSION_NUMBER
|
||||
COMMIT = ""
|
||||
|
||||
Reference in new issue
Block a user