From e9a5d733b1b40c94faf725ba210c78ec8d30f3af Mon Sep 17 00:00:00 2001 From: Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> Date: Thu, 26 Nov 2026 21:36:36 +0500 Subject: [PATCH] weed: report host THP policy; build: declare Go 1.27.4 to match the releases (#13025) * weed: report the host transparent huge page policy at startup Go maps the heap with MADV_HUGEPAGE, so the host THP policy applies to a SeaweedFS process whether or not the operator asked for it, and the advice in the Go GC guide depends on the heap size. Operators had no way to see which mode a node actually runs in. Log enabled/defrag/khugepaged.max_ptes_none once at startup from the long-running commands, and print the Go toolchain in `weed version` so a support bundle identifies the runtime that produced the binary. Nothing changes the policy: THP is host-wide, and GODEBUG=disablethp=1 remains the only per-process control. Refs #5437 * build: declare Go 1.27.4, the toolchain the releases already use The 4.55 release binaries report go1.27.4 (`go version -m` on the published tarball), while go.mod still said 1.26.6, the Dockerfiles pinned golang:1.26, and the release workflows left the Go version to the action default of "the latest stable at build time". A source build, a container and a downloaded tarball therefore ran different toolchains from the same tag, and the next release could silently pick up another one. Set the go directive to 1.27.4 in the root module and in the four modules that build in CI, bump the 16 Dockerfiles, and pin goversion: 1.27.4 in the 16 release and dev action steps. `go mod tidy` now emits the two require blocks Go 1.27 expects; no dependency version changed. Go 1.27's gofmt realigns 8 files. * weed mini: report the THP policy after quieting stderr The startup line ran from the dispatch point before runMini applied quietMiniLogs, so every weed mini start on Linux printed it to stderr, which mini keeps for the welcome banner, warnings and errors. Log it from runMini after quietMiniLogs so it lands in the log file only. Co-Authored-By: Claude Opus 5.5 * util: report whether the Go heap can use huge pages The runtime advises only GC metadata with MADV_HUGEPAGE and leaves the heap arenas to the host default, so under enabled=madvise the heap stays on small pages. The log still printed go_heap_disabled=false there, which reads as "the heap uses THP". Report go_heap_thp, true only under enabled=always without GODEBUG=disablethp, and drop the struct comment that said the heap is mapped with MADV_HUGEPAGE. Co-Authored-By: Claude Opus 5.5 * util: count an inherited PR_SET_THP_DISABLE in go_heap_thp A launcher can disable THP for the process with prctl, and children inherit it, so enabled=always alone does not mean the heap gets huge pages. Co-Authored-By: Claude Opus 5.5 * util: read GODEBUG disablethp the way the runtime does The runtime applies GODEBUG left to right, so with disablethp=1,disablethp=0 the heap keeps THP, while the helper stopped at the first disablethp=1. The helper also missed other nonzero values such as disablethp=2, which the runtime treats as disabled, and trimmed spaces around keys, which the runtime keeps. Take the last disablethp with an integer value, treat any nonzero value as disabled, and match keys exactly. The parser now takes the GODEBUG string, so it is tested without changing the environment. Co-Authored-By: Claude Opus 5.5 * util: honor per-size THP policies in go_heap_thp Since Linux 6.8 each anonymous huge page size has its own policy in hugepages-kB/enabled, and only "inherit" follows the top-level knob. A 64kB size set to "always" gives the unadvised heap huge pages under a top-level "madvise" or "never", and a 2048kB size set to "never" takes them away under "always", but the log judged only the top-level value. Read the per-size policies and report go_heap_thp=true when any size reaches the heap. Under a top-level "never", the "disabled by the host" line is now printed only when no size reaches the heap. Co-Authored-By: Claude Opus 5.5 * util: report go_heap_thp=unknown when the process setting is unreadable If PR_GET_THP_DISABLE fails, for example because a seccomp profile rejects it, the process THP setting is not known, but the log treated it as allowed and could print go_heap_thp=true. Print go_heap_thp=unknown in that case. It stays false when the host or GODEBUG already rules out heap huge pages. Co-Authored-By: Claude Opus 5.5 * util: report go_heap_thp=unknown when a per-size THP policy is unreadable An unreadable hugepages-kB/enabled was skipped, so the log could say the host disabled THP while that size allowed it. Keep it as an empty mode and report unknown unless a readable size already allows huge pages. Co-Authored-By: Claude Opus 5.5 * ci: take the Go version from go.mod in tests and releases posix-compliance pinned GO_VERSION 1.26 and built go 1.27.4 modules only through the GOTOOLCHAIN auto-switch; nine workflows used go-version ^1.26 and the kafka jobs ran in golang:1.26-alpine. Read the version from go.mod with go-version-file, as the other setup-go steps already do, moving checkout ahead of setup-go where it came after so the file exists. The posix report takes the version from the setup-go output. The release and dev builds pinned goversion 1.27.4 in 16 places. The pinned go-release-action reads the go directive when goversion is go.mod, so the binaries now follow go.mod without a second copy of the version. * weed: report the THP policy from every long-running command mount, worker, iam, master.follower, the filer sync/backup/remote/replicate daemons and the mq agent and kafka gateway keep serving after startup like the commands already listed; mount is likely where heap size matters most. fuse is not listed: its first process starts a child with the same arguments and waits, so logging at dispatch would print the line twice. It logs in runFuse just before handing over to runMount, which only the child reaches. --------- Co-authored-by: Konstantin Lebedev Co-authored-by: Chris Lu Co-authored-by: Claude Opus 5.5 --- .github/workflows/binaries_dev.yml | 4 + .github/workflows/binaries_release0.yml | 2 + .github/workflows/binaries_release1.yml | 2 + .github/workflows/binaries_release2.yml | 2 + .github/workflows/binaries_release3.yml | 2 + .github/workflows/binaries_release4.yml | 2 + .github/workflows/binaries_release5.yml | 2 + .github/workflows/ec-integration-tests.yml | 8 +- .github/workflows/kafka-quicktest.yml | 2 +- .github/workflows/kafka-tests.yml | 46 +- .github/workflows/plugin-workers.yml | 8 +- .github/workflows/posix-compliance.yml | 16 +- .github/workflows/postgres-tests.yml | 8 +- .github/workflows/s3-parquet-tests.yml | 4 +- .../test-s3-over-https-using-awscli.yml | 2 +- .github/workflows/tls-rotation-tests.yml | 8 +- .../workflows/vacuum-integration-tests.yml | 8 +- docker/Dockerfile.foundationdb_large | 2 +- docker/Dockerfile.go_build | 2 +- docker/Dockerfile.rocksdb_dev_env | 2 +- docker/Dockerfile.rocksdb_large | 2 +- docker/entrypoint.sh | 2 + go.mod | 471 +++++++++--------- telemetry/server/Dockerfile | 2 +- telemetry/server/go.mod | 2 +- test/foundationdb/Dockerfile.build | 2 +- test/foundationdb/Dockerfile.build.arm64 | 2 +- test/foundationdb/Dockerfile.test | 2 +- test/fuse_integration/Makefile | 2 +- test/kafka/Dockerfile.kafka-gateway | 2 +- test/kafka/Dockerfile.seaweedfs | 2 +- test/kafka/Dockerfile.test-setup | 2 +- test/kafka/go.mod | 2 +- .../kafka-client-loadtest/Dockerfile.loadtest | 2 +- test/kafka/kafka-client-loadtest/go.mod | 2 +- test/postgres/Dockerfile.client | 2 +- test/postgres/Dockerfile.producer | 2 +- test/postgres/Dockerfile.seaweedfs | 2 +- test/s3/iam/Dockerfile.s3 | 2 +- test/sftp/go.mod | 2 +- weed/admin/plugin/worker_job_queues.go | 1 + weed/command/fuse_std.go | 2 + weed/command/mini.go | 1 + weed/command/version.go | 1 + weed/iam/oidc/principal_tags_test.go | 4 +- weed/iam/policy/jwt_claim_variables_test.go | 8 +- .../iamapi/iamapi_management_handlers_test.go | 16 +- ...i_object_handlers_response_headers_test.go | 10 +- .../volume_grpc_erasure_coding_recover.go | 4 +- .../erasure_coding/ecbalancer/place_test.go | 10 +- weed/util/hugepage.go | 62 +++ weed/util/hugepage_linux.go | 105 ++++ weed/util/hugepage_linux_test.go | 29 ++ weed/util/hugepage_other.go | 6 + weed/util/hugepage_test.go | 88 ++++ weed/util/parse_test.go | 10 +- weed/weed.go | 19 + 57 files changed, 672 insertions(+), 345 deletions(-) create mode 100644 weed/util/hugepage.go create mode 100644 weed/util/hugepage_linux.go create mode 100644 weed/util/hugepage_linux_test.go create mode 100644 weed/util/hugepage_other.go create mode 100644 weed/util/hugepage_test.go diff --git a/.github/workflows/binaries_dev.yml b/.github/workflows/binaries_dev.yml index ed9d8cc541..a8c8502655 100644 --- a/.github/workflows/binaries_dev.yml +++ b/.github/workflows/binaries_dev.yml @@ -56,6 +56,7 @@ jobs: - name: Go Release Binaries Large Disk uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22 with: + goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} @@ -72,6 +73,7 @@ jobs: - name: Go Release Binaries Normal Volume Size uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22 with: + goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} @@ -105,6 +107,7 @@ jobs: - name: Go Release Binaries Large Disk uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22 with: + goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} @@ -121,6 +124,7 @@ jobs: - name: Go Release Binaries Normal Volume Size uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22 with: + goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} diff --git a/.github/workflows/binaries_release0.yml b/.github/workflows/binaries_release0.yml index 045f094238..1c6bc416aa 100644 --- a/.github/workflows/binaries_release0.yml +++ b/.github/workflows/binaries_release0.yml @@ -32,6 +32,7 @@ jobs: - name: Go Release Binaries Normal Volume Size uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22 with: + goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} @@ -46,6 +47,7 @@ jobs: - name: Go Release Large Disk Binaries uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22 with: + goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} diff --git a/.github/workflows/binaries_release1.yml b/.github/workflows/binaries_release1.yml index 9130ac3bb8..3c5c9b151f 100644 --- a/.github/workflows/binaries_release1.yml +++ b/.github/workflows/binaries_release1.yml @@ -32,6 +32,7 @@ jobs: - name: Go Release Binaries Normal Volume Size uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22 with: + goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} @@ -46,6 +47,7 @@ jobs: - name: Go Release Large Disk Binaries uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22 with: + goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} diff --git a/.github/workflows/binaries_release2.yml b/.github/workflows/binaries_release2.yml index 99f0755998..9663481073 100644 --- a/.github/workflows/binaries_release2.yml +++ b/.github/workflows/binaries_release2.yml @@ -32,6 +32,7 @@ jobs: - name: Go Release Binaries Normal Volume Size uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22 with: + goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} @@ -46,6 +47,7 @@ jobs: - name: Go Release Large Disk Binaries uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22 with: + goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} diff --git a/.github/workflows/binaries_release3.yml b/.github/workflows/binaries_release3.yml index 0b429f37d1..8dda72d0d0 100644 --- a/.github/workflows/binaries_release3.yml +++ b/.github/workflows/binaries_release3.yml @@ -32,6 +32,7 @@ jobs: - name: Go Release Binaries Normal Volume Size uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22 with: + goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} @@ -46,6 +47,7 @@ jobs: - name: Go Release Large Disk Binaries uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22 with: + goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} diff --git a/.github/workflows/binaries_release4.yml b/.github/workflows/binaries_release4.yml index 11871e6a00..dcc7d0a708 100644 --- a/.github/workflows/binaries_release4.yml +++ b/.github/workflows/binaries_release4.yml @@ -32,6 +32,7 @@ jobs: - name: Go Release Binaries Normal Volume Size uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22 with: + goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} @@ -47,6 +48,7 @@ jobs: - name: Go Release Large Disk Binaries uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22 with: + goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} diff --git a/.github/workflows/binaries_release5.yml b/.github/workflows/binaries_release5.yml index 1d254dc178..8aa6e9c67a 100644 --- a/.github/workflows/binaries_release5.yml +++ b/.github/workflows/binaries_release5.yml @@ -32,6 +32,7 @@ jobs: - name: Go Release Binaries Normal Volume Size uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22 with: + goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} @@ -46,6 +47,7 @@ jobs: - name: Go Release Large Disk Binaries uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22 with: + goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} diff --git a/.github/workflows/ec-integration-tests.yml b/.github/workflows/ec-integration-tests.yml index fe6ad96055..d3a131d3b6 100644 --- a/.github/workflows/ec-integration-tests.yml +++ b/.github/workflows/ec-integration-tests.yml @@ -31,16 +31,16 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 30 steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v7 + - name: Set up Go 1.x uses: actions/setup-go@v7 with: cache: ${{ runner.environment == 'github-hosted' }} - go-version: ^1.26 + go-version-file: 'go.mod' id: go - - name: Check out code into the Go module directory - uses: actions/checkout@v7 - - name: Build weed binary run: | cd weed && go build -o weed . diff --git a/.github/workflows/kafka-quicktest.yml b/.github/workflows/kafka-quicktest.yml index f48c5487df..b1cb81b468 100644 --- a/.github/workflows/kafka-quicktest.yml +++ b/.github/workflows/kafka-quicktest.yml @@ -42,7 +42,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v7 with: - go-version: ^1.26 + go-version-file: 'go.mod' cache: ${{ runner.environment == 'github-hosted' }} cache-dependency-path: | **/go.sum diff --git a/.github/workflows/kafka-tests.yml b/.github/workflows/kafka-tests.yml index 4a59cb6724..a09dd1f355 100644 --- a/.github/workflows/kafka-tests.yml +++ b/.github/workflows/kafka-tests.yml @@ -43,23 +43,23 @@ jobs: matrix: container-id: [unit-tests-1] container: - image: golang:1.26-alpine + image: golang:1.27-alpine options: --cpus 1.0 --memory 1g --hostname kafka-unit-${{ matrix.container-id }} env: GOMAXPROCS: 1 CGO_ENABLED: 0 CONTAINER_ID: ${{ matrix.container-id }} steps: + - name: Check out code + uses: actions/checkout@v7 + - name: Set up Go 1.x uses: actions/setup-go@v7 with: cache: ${{ runner.environment == 'github-hosted' }} - go-version: ^1.26 + go-version-file: 'go.mod' id: go - - name: Check out code - uses: actions/checkout@v7 - - name: Setup Container Environment run: | apk add --no-cache git @@ -88,7 +88,7 @@ jobs: matrix: container-id: [integration-1] container: - image: golang:1.26-alpine + image: golang:1.27-alpine options: --cpus 2.0 --memory 2g --ulimit nofile=1024:1024 --hostname kafka-integration-${{ matrix.container-id }} env: GOMAXPROCS: 2 @@ -96,16 +96,16 @@ jobs: KAFKA_TEST_ISOLATION: "true" CONTAINER_ID: ${{ matrix.container-id }} steps: + - name: Check out code + uses: actions/checkout@v7 + - name: Set up Go 1.x uses: actions/setup-go@v7 with: cache: ${{ runner.environment == 'github-hosted' }} - go-version: ^1.26 + go-version-file: 'go.mod' id: go - - name: Check out code - uses: actions/checkout@v7 - - name: Setup Integration Container Environment run: | apk add --no-cache git procps @@ -136,7 +136,7 @@ jobs: matrix: container-id: [e2e-1] container: - image: golang:1.26-alpine + image: golang:1.27-alpine options: --cpus 2.0 --memory 2g --hostname kafka-e2e-${{ matrix.container-id }} env: GOMAXPROCS: 2 @@ -150,7 +150,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v7 with: - go-version: ^1.26 + go-version-file: 'go.mod' cache: ${{ runner.environment == 'github-hosted' }} cache-dependency-path: | **/go.sum @@ -315,7 +315,7 @@ jobs: matrix: container-id: [consumer-group-1] container: - image: golang:1.26-alpine + image: golang:1.27-alpine options: --cpus 1.0 --memory 2g --ulimit nofile=512:512 --hostname kafka-consumer-${{ matrix.container-id }} env: GOMAXPROCS: 1 @@ -329,7 +329,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v7 with: - go-version: ^1.26 + go-version-file: 'go.mod' cache: ${{ runner.environment == 'github-hosted' }} cache-dependency-path: | **/go.sum @@ -477,7 +477,7 @@ jobs: matrix: container-id: [client-compat-1] container: - image: golang:1.26-alpine + image: golang:1.27-alpine options: --cpus 1.0 --memory 1.5g --shm-size 256m --hostname kafka-client-${{ matrix.container-id }} env: GOMAXPROCS: 1 @@ -491,7 +491,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v7 with: - go-version: ^1.26 + go-version-file: 'go.mod' cache: ${{ runner.environment == 'github-hosted' }} cache-dependency-path: | **/go.sum @@ -635,7 +635,7 @@ jobs: matrix: container-id: [smq-integration-1] container: - image: golang:1.26-alpine + image: golang:1.27-alpine options: --cpus 1.0 --memory 2g --hostname kafka-smq-${{ matrix.container-id }} env: GOMAXPROCS: 1 @@ -649,7 +649,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v7 with: - go-version: ^1.26 + go-version-file: 'go.mod' cache: ${{ runner.environment == 'github-hosted' }} cache-dependency-path: | **/go.sum @@ -796,7 +796,7 @@ jobs: matrix: container-id: [protocol-1] container: - image: golang:1.26-alpine + image: golang:1.27-alpine options: --cpus 1.0 --memory 1g --tmpfs /tmp:exec --hostname kafka-protocol-${{ matrix.container-id }} env: GOMAXPROCS: 1 @@ -804,16 +804,16 @@ jobs: KAFKA_PROTOCOL_ISOLATION: "true" CONTAINER_ID: ${{ matrix.container-id }} steps: + - name: Check out code + uses: actions/checkout@v7 + - name: Set up Go 1.x uses: actions/setup-go@v7 with: cache: ${{ runner.environment == 'github-hosted' }} - go-version: ^1.26 + go-version-file: 'go.mod' id: go - - name: Check out code - uses: actions/checkout@v7 - - name: Setup Protocol Container Environment run: | apk add --no-cache git procps diff --git a/.github/workflows/plugin-workers.yml b/.github/workflows/plugin-workers.yml index 100f41aa94..9f45d86465 100644 --- a/.github/workflows/plugin-workers.yml +++ b/.github/workflows/plugin-workers.yml @@ -42,15 +42,15 @@ jobs: path: test/plugin_workers/volume_balance steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v7 + - name: Set up Go 1.x uses: actions/setup-go@v7 with: cache: ${{ runner.environment == 'github-hosted' }} - go-version: ^1.26 + go-version-file: 'go.mod' id: go - - name: Check out code into the Go module directory - uses: actions/checkout@v7 - - name: Run plugin worker tests run: go test -v ./${{ matrix.path }} diff --git a/.github/workflows/posix-compliance.yml b/.github/workflows/posix-compliance.yml index 012a865d6a..5d4556e9ea 100644 --- a/.github/workflows/posix-compliance.yml +++ b/.github/workflows/posix-compliance.yml @@ -39,7 +39,6 @@ permissions: issues: write env: - GO_VERSION: '1.26' TIMEOUT: '45m' jobs: @@ -61,10 +60,11 @@ jobs: - name: Clean up stale FUSE mounts uses: ./.github/actions/cleanup-stale-fuse-mounts - - name: Set up Go ${{ env.GO_VERSION }} + - name: Set up Go + id: setup-go uses: actions/setup-go@v7 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: 'go.mod' cache: ${{ runner.environment == 'github-hosted' }} cache-dependency-path: | go.sum @@ -532,7 +532,7 @@ jobs: const report = fs.readFileSync(reportPath, 'utf8'); const comment = `## POSIX Compliance Test Results - **Go Version:** ${{ env.GO_VERSION }} + **Go Version:** ${{ steps.setup-go.outputs.go-version }} **FUSE Version:** ${{ matrix.fuse-version }} **Test Type:** ${{ github.event.inputs.test_type || 'full' }} @@ -570,7 +570,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v7 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: 'go.mod' cache: ${{ runner.environment == 'github-hosted' }} - name: Install macFUSE @@ -623,7 +623,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v7 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: 'go.mod' cache: ${{ runner.environment == 'github-hosted' }} - name: Install security analysis tools @@ -680,7 +680,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v7 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: 'go.mod' cache: ${{ runner.environment == 'github-hosted' }} - name: Install dependencies @@ -733,7 +733,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v7 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: 'go.mod' cache: ${{ runner.environment == 'github-hosted' }} - name: Install dependencies diff --git a/.github/workflows/postgres-tests.yml b/.github/workflows/postgres-tests.yml index bbcef063bf..bae86952a1 100644 --- a/.github/workflows/postgres-tests.yml +++ b/.github/workflows/postgres-tests.yml @@ -38,16 +38,16 @@ jobs: run: working-directory: test/postgres steps: + - name: Check out code + uses: actions/checkout@v7 + - name: Set up Go 1.x uses: actions/setup-go@v7 with: cache: ${{ runner.environment == 'github-hosted' }} - go-version: ^1.26 + go-version-file: 'go.mod' id: go - - name: Check out code - uses: actions/checkout@v7 - - name: Configure Docker Hub mirror run: | echo '{"registry-mirrors": ["https://mirror.gcr.io"]}' | sudo tee /etc/docker/daemon.json diff --git a/.github/workflows/s3-parquet-tests.yml b/.github/workflows/s3-parquet-tests.yml index 9305402fca..9f7849dc23 100644 --- a/.github/workflows/s3-parquet-tests.yml +++ b/.github/workflows/s3-parquet-tests.yml @@ -45,7 +45,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v7 with: - go-version: ^1.26 + go-version-file: 'go.mod' cache: ${{ runner.environment == 'github-hosted' }} - name: Set up Python ${{ matrix.python-version }} @@ -153,7 +153,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v7 with: - go-version: ^1.26 + go-version-file: 'go.mod' cache: ${{ runner.environment == 'github-hosted' }} - name: Run Go unit tests diff --git a/.github/workflows/test-s3-over-https-using-awscli.yml b/.github/workflows/test-s3-over-https-using-awscli.yml index d1b161da3d..c2f6e6f0d2 100644 --- a/.github/workflows/test-s3-over-https-using-awscli.yml +++ b/.github/workflows/test-s3-over-https-using-awscli.yml @@ -40,7 +40,7 @@ jobs: - uses: actions/setup-go@v7 with: - go-version: ^1.26 + go-version-file: 'go.mod' cache: ${{ runner.environment == 'github-hosted' }} - name: Build SeaweedFS diff --git a/.github/workflows/tls-rotation-tests.yml b/.github/workflows/tls-rotation-tests.yml index b8ba194a45..65454bc0a6 100644 --- a/.github/workflows/tls-rotation-tests.yml +++ b/.github/workflows/tls-rotation-tests.yml @@ -31,16 +31,16 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 10 steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v7 + - name: Set up Go 1.x uses: actions/setup-go@v7 with: cache: ${{ runner.environment == 'github-hosted' }} - go-version: ^1.26 + go-version-file: 'go.mod' id: go - - name: Check out code into the Go module directory - uses: actions/checkout@v7 - - name: Build weed binary run: | cd weed && go build -o weed . diff --git a/.github/workflows/vacuum-integration-tests.yml b/.github/workflows/vacuum-integration-tests.yml index 3096e8f5b7..b64a095dfc 100644 --- a/.github/workflows/vacuum-integration-tests.yml +++ b/.github/workflows/vacuum-integration-tests.yml @@ -31,16 +31,16 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 15 steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v7 + - name: Set up Go 1.x uses: actions/setup-go@v7 with: cache: ${{ runner.environment == 'github-hosted' }} - go-version: ^1.26 + go-version-file: 'go.mod' id: go - - name: Check out code into the Go module directory - uses: actions/checkout@v7 - - name: Build weed binary run: | cd weed && go build -o weed . diff --git a/docker/Dockerfile.foundationdb_large b/docker/Dockerfile.foundationdb_large index 9ec3e137fc..e44c390396 100644 --- a/docker/Dockerfile.foundationdb_large +++ b/docker/Dockerfile.foundationdb_large @@ -1,4 +1,4 @@ -FROM golang:1.26 AS builder +FROM golang:1.27 AS builder RUN apt-get update && \ apt-get install -y build-essential wget ca-certificates && \ diff --git a/docker/Dockerfile.go_build b/docker/Dockerfile.go_build index 22e4674290..1709b2ae35 100644 --- a/docker/Dockerfile.go_build +++ b/docker/Dockerfile.go_build @@ -1,6 +1,6 @@ # Pin the builder to the host arch and cross-compile the (CGO-free) Go binary, # so arm64/arm/386 targets skip QEMU emulation of the whole compile. -FROM --platform=$BUILDPLATFORM golang:1.26-alpine AS builder +FROM --platform=$BUILDPLATFORM golang:1.27-alpine AS builder RUN apk add git g++ fuse RUN mkdir -p /go/src/github.com/seaweedfs/ ARG BRANCH=${BRANCH:-master} diff --git a/docker/Dockerfile.rocksdb_dev_env b/docker/Dockerfile.rocksdb_dev_env index 2b6b0431b1..5ebe31c662 100644 --- a/docker/Dockerfile.rocksdb_dev_env +++ b/docker/Dockerfile.rocksdb_dev_env @@ -1,4 +1,4 @@ -FROM golang:1.26 AS builder +FROM golang:1.27 AS builder RUN apt-get update RUN apt-get install -y build-essential libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev liblz4-dev libzstd-dev diff --git a/docker/Dockerfile.rocksdb_large b/docker/Dockerfile.rocksdb_large index 757af7e64d..c22d34b7a9 100644 --- a/docker/Dockerfile.rocksdb_large +++ b/docker/Dockerfile.rocksdb_large @@ -1,4 +1,4 @@ -FROM golang:1.26 AS builder +FROM golang:1.27 AS builder RUN apt-get update RUN apt-get install -y build-essential libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev liblz4-dev libzstd-dev diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index fca7c82b42..ee1bd44f33 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -2,6 +2,8 @@ # Enable FIPS 140-3 mode by default (Go 1.24+) # To disable: docker run -e GODEBUG=fips140=off ... +# Transparent huge pages are a host-wide setting this image cannot change; to +# turn them off for this process only, append GODEBUG=disablethp=1. export GODEBUG="${GODEBUG:+$GODEBUG,}fips140=on" # Fix permissions for mounted volumes diff --git a/go.mod b/go.mod index 149f17ae50..3b935d1cdc 100644 --- a/go.mod +++ b/go.mod @@ -1,93 +1,118 @@ module github.com/seaweedfs/seaweedfs -go 1.26.6 +go 1.27.4 require ( - cloud.google.com/go v0.123.0 // indirect + cloud.google.com/go/kms v1.36.1 cloud.google.com/go/pubsub v1.51.1 cloud.google.com/go/storage v1.69.0 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.24.0 + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.14.1 + github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys v0.10.0 + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.8.3 + github.com/DATA-DOG/go-sqlmock v1.5.2 + github.com/Jille/raft-grpc-transport v1.6.1 github.com/Shopify/sarama v1.38.1 + github.com/ThreeDotsLabs/watermill v1.5.3 + github.com/a-h/templ v0.3.1100 + github.com/apache/arrow-go/v18 v18.8.0 + github.com/apache/cassandra-gocql-driver/v2 v2.1.2 + github.com/apache/iceberg-go v0.7.0 + github.com/apple/foundationdb/bindings/go v0.0.0-20250911184653-27f7192f47c3 + github.com/arangodb/go-driver v1.6.9 github.com/aws/aws-sdk-go v1.55.8 - github.com/beorn7/perks v1.0.1 // indirect + github.com/aws/aws-sdk-go-v2 v1.48.0 + github.com/aws/aws-sdk-go-v2/config v1.33.9 + github.com/aws/aws-sdk-go-v2/credentials v1.20.9 + github.com/aws/aws-sdk-go-v2/service/s3 v1.114.10 + github.com/aws/aws-sdk-go-v2/service/sts v1.51.6 + github.com/aws/smithy-go v1.28.9 github.com/bwmarrin/snowflake v0.3.0 github.com/cenkalti/backoff/v4 v4.3.0 - github.com/coreos/go-semver v0.3.1 // indirect - github.com/coreos/go-systemd/v22 v22.7.0 // indirect - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/cespare/xxhash/v2 v2.3.0 + github.com/cognusion/imaging v1.0.4 github.com/dustin/go-humanize v1.1.0 - github.com/eapache/go-resiliency v1.6.0 // indirect - github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect - github.com/eapache/queue v1.1.0 // indirect github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a - github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c // indirect - github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 // indirect github.com/facebookgo/stats v0.0.0-20151006221625-1b76add642e4 - github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 // indirect - github.com/fsnotify/fsnotify v1.10.1 // indirect + github.com/fluent/fluent-logger-golang v1.10.1 + github.com/getsentry/sentry-go v0.50.0 + github.com/go-ldap/ldap/v3 v3.4.14 github.com/go-redsync/redsync/v4 v4.18.0 github.com/go-sql-driver/mysql v1.10.1 - github.com/go-zookeeper/zk v1.0.4 // indirect + github.com/golang-jwt/jwt/v5 v5.3.1 github.com/golang/protobuf v1.5.4 github.com/golang/snappy v1.0.0 github.com/google/btree v1.1.3 + github.com/google/flatbuffers/go v0.0.0-20230108230133-3b8644d32c50 github.com/google/uuid v1.6.0 - github.com/google/wire v0.7.0 // indirect - github.com/googleapis/gax-go/v2 v2.27.0 // indirect github.com/gorilla/mux v1.8.1 - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-uuid v1.0.3 // indirect + github.com/gorilla/sessions v1.4.0 + github.com/hashicorp/go-metrics v0.7.0 + github.com/hashicorp/golang-lru/v2 v2.0.7 + github.com/hashicorp/raft v1.8.0 + github.com/hashicorp/raft-boltdb/v2 v2.4.2 + github.com/hashicorp/vault/api v1.23.0 github.com/jackc/pgx/v5 v5.10.0 - github.com/jcmturner/gofork v1.7.6 // indirect - github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect + github.com/jhump/protoreflect v1.18.1 github.com/jinzhu/copier v0.4.0 - github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/json-iterator/go v1.1.12 + github.com/k0kubun/pp v3.0.1+incompatible github.com/karlseguin/ccache/v2 v2.0.8 github.com/klauspost/compress v1.20.3 github.com/klauspost/reedsolomon v1.14.2 github.com/kurin/blazer v0.5.3 + github.com/linkedin/goavro/v2 v2.15.0 github.com/linxGnu/grocksdb v1.11.1 - github.com/mailru/easyjson v0.9.2 // indirect - github.com/mattn/go-isatty v0.0.24 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/minio/crc64nvme v1.1.1 + github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 github.com/olivere/elastic/v7 v7.0.32 + github.com/orcaman/concurrent-map/v2 v2.0.1 + github.com/parquet-go/parquet-go v0.32.0 github.com/peterh/liner v1.2.3 - github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/pierrec/lz4/v4 v4.1.33 + github.com/pkg/sftp v1.13.12 + github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 github.com/posener/complete v1.2.3 github.com/pquerna/cachecontrol v0.2.0 github.com/prometheus/client_golang v1.24.1 github.com/prometheus/client_model v0.6.3 - github.com/prometheus/common v0.71.0 // indirect github.com/prometheus/procfs v0.23.0 - github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect + github.com/rabbitmq/amqp091-go v1.16.0 + github.com/rclone/rclone v1.75.1 + github.com/rdleal/intervalst v1.5.0 + github.com/redis/go-redis/v9 v9.23.0 + github.com/schollz/progressbar/v3 v3.19.1 + github.com/seaweedfs/cockroachdb-parser v0.0.0-20260225204133-2f342c5ea564 + github.com/seaweedfs/go-fuse/v2 v2.9.5 github.com/seaweedfs/goexif v1.0.3 github.com/seaweedfs/raft v1.2.4 - github.com/sirupsen/logrus v1.9.4 // indirect - github.com/spf13/afero v1.15.0 // indirect - github.com/spf13/cast v1.10.0 // indirect + github.com/shirou/gopsutil/v4 v4.26.10 github.com/spf13/viper v1.21.0 github.com/stretchr/testify v1.12.1 github.com/stvp/tempredis v0.0.0-20181119212430-b82af8480203 github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965 + github.com/tarantool/go-option v1.1.0 + github.com/tarantool/go-tarantool/v3 v3.0.2 + github.com/testcontainers/testcontainers-go v0.45.0 github.com/tidwall/gjson v1.20.0 github.com/tidwall/match v1.2.0 - github.com/tidwall/pretty v1.2.0 // indirect + github.com/tikv/client-go/v2 v2.0.7 github.com/tsuna/gohbase v0.0.0-20201125011725-348991136365 + github.com/twmb/avro v1.9.0 github.com/tylertreat/BoomFilters v0.0.0-20210315201527-1a82519a3e43 github.com/valyala/bytebufferpool v1.0.0 github.com/viant/ptrie v1.0.1 - github.com/xdg-go/pbkdf2 v1.0.0 // indirect + github.com/winfsp/cgofuse v1.6.1-0.20260126094232-f2c4fccdb286 github.com/xdg-go/scram v1.2.0 - github.com/xdg-go/stringprep v1.0.4 // indirect - github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect + github.com/xeipuuv/gojsonschema v1.2.0 + github.com/ydb-platform/ydb-go-sdk-auth-environ v0.5.3 + github.com/ydb-platform/ydb-go-sdk/v3 v3.155.1 go.etcd.io/etcd/api/v3 v3.7.3 + go.etcd.io/etcd/client/pkg/v3 v3.7.3 go.etcd.io/etcd/client/v3 v3.7.3 go.mongodb.org/mongo-driver v1.17.9 - go.opencensus.io v0.24.0 // indirect + go.uber.org/atomic v1.12.0 + go.yaml.in/yaml/v3 v3.0.6 gocloud.dev v0.49.0 gocloud.dev/pubsub/natspubsub v0.49.0 gocloud.dev/pubsub/rabbitpubsub v0.47.0 @@ -96,213 +121,39 @@ require ( golang.org/x/image v0.46.0 golang.org/x/net v0.62.0 golang.org/x/oauth2 v0.37.0 + golang.org/x/sync v0.24.0 golang.org/x/sys v0.50.0 - golang.org/x/text v0.43.0 // indirect - golang.org/x/tools v0.52.0 // indirect - golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect + golang.org/x/term v0.48.0 + golang.org/x/time v0.16.0 + golang.org/x/tools/godoc v0.1.0-deprecated google.golang.org/api v0.310.0 - google.golang.org/genproto v0.0.0-20261019180522-ce908d29299b // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20261019180522-ce908d29299b google.golang.org/grpc v1.86.0-dev.0.20261027044109-d619b5d02089 + google.golang.org/grpc/security/advancedtls v1.0.0 google.golang.org/protobuf v1.36.12 - gopkg.in/inf.v0 v0.9.1 // indirect - modernc.org/b v1.0.0 // indirect - modernc.org/mathutil v1.7.1 // indirect - modernc.org/memory v1.12.1 // indirect modernc.org/sqlite v1.60.1 ) -require ( - cloud.google.com/go/kms v1.36.1 - github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys v0.10.0 - github.com/DATA-DOG/go-sqlmock v1.5.2 - github.com/Jille/raft-grpc-transport v1.6.1 - github.com/ThreeDotsLabs/watermill v1.5.3 - github.com/a-h/templ v0.3.1100 - github.com/apache/arrow-go/v18 v18.8.0 - github.com/apache/cassandra-gocql-driver/v2 v2.1.2 - github.com/apache/iceberg-go v0.7.0 - github.com/apple/foundationdb/bindings/go v0.0.0-20250911184653-27f7192f47c3 - github.com/arangodb/go-driver v1.6.9 - github.com/aws/aws-sdk-go-v2 v1.48.0 - github.com/aws/aws-sdk-go-v2/config v1.33.9 - github.com/aws/aws-sdk-go-v2/credentials v1.20.9 - github.com/aws/aws-sdk-go-v2/service/s3 v1.114.10 - github.com/cespare/xxhash/v2 v2.3.0 - github.com/cognusion/imaging v1.0.4 - github.com/fluent/fluent-logger-golang v1.10.1 - github.com/getsentry/sentry-go v0.50.0 - github.com/go-ldap/ldap/v3 v3.4.14 - github.com/golang-jwt/jwt/v5 v5.3.1 - github.com/google/flatbuffers/go v0.0.0-20230108230133-3b8644d32c50 - github.com/hashicorp/go-metrics v0.7.0 - github.com/hashicorp/golang-lru/v2 v2.0.7 - github.com/hashicorp/raft v1.8.0 - github.com/hashicorp/raft-boltdb/v2 v2.4.2 - github.com/hashicorp/vault/api v1.23.0 - github.com/jhump/protoreflect v1.18.1 - github.com/linkedin/goavro/v2 v2.15.0 - github.com/minio/crc64nvme v1.1.1 - github.com/orcaman/concurrent-map/v2 v2.0.1 - github.com/parquet-go/parquet-go v0.32.0 - github.com/pkg/sftp v1.13.12 - github.com/rabbitmq/amqp091-go v1.16.0 - github.com/rclone/rclone v1.75.1 - github.com/rdleal/intervalst v1.5.0 - github.com/redis/go-redis/v9 v9.23.0 - github.com/schollz/progressbar/v3 v3.19.1 - github.com/seaweedfs/go-fuse/v2 v2.9.5 - github.com/shirou/gopsutil/v4 v4.26.10 - github.com/tarantool/go-option v1.1.0 - github.com/tarantool/go-tarantool/v3 v3.0.2 - github.com/testcontainers/testcontainers-go v0.45.0 - github.com/tikv/client-go/v2 v2.0.7 - github.com/twmb/avro v1.9.0 - github.com/xeipuuv/gojsonschema v1.2.0 - github.com/ydb-platform/ydb-go-sdk-auth-environ v0.5.3 - github.com/ydb-platform/ydb-go-sdk/v3 v3.155.1 - go.etcd.io/etcd/client/pkg/v3 v3.7.3 - go.uber.org/atomic v1.12.0 - go.yaml.in/yaml/v3 v3.0.6 - golang.org/x/sync v0.24.0 - golang.org/x/tools/godoc v0.1.0-deprecated - google.golang.org/grpc/security/advancedtls v1.0.0 -) - -require github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect - -require ( - cloud.google.com/go/longrunning v1.3.0 // indirect - cloud.google.com/go/pubsub/v2 v2.7.0 // indirect - dario.cat/mergo v1.0.2 // indirect - github.com/Azure/azure-sdk-for-go/sdk/keyvault/internal v0.7.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/storage/internal v0.1.0 // indirect - github.com/Azure/go-ansiterm v0.0.0-20261006220739-8c912ac31dd4 // indirect - github.com/FilenCloudDienste/filen-sdk-go v0.0.39 // indirect - github.com/ProtonMail/gopenpgp/v3 v3.4.1 // indirect - github.com/RoaringBitmap/roaring/v2 v2.26.0 // 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.1 // indirect - github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/apache/thrift v0.24.0 // indirect - github.com/aws/aws-sdk-go-v2/service/signin v1.10.4 // 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/bits-and-blooms/bitset v1.24.4 // indirect - github.com/blevesearch/snowballstem v0.9.0 // indirect - github.com/boombuler/barcode v1.1.0 // 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 - github.com/cockroachdb/errors v1.14.0 // indirect - github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506 // indirect - github.com/cockroachdb/redact v1.1.5 // indirect - github.com/cockroachdb/version v0.0.0-20250314144055-3860cd14adf2 // indirect - github.com/containerd/errdefs v1.0.0 // indirect - github.com/containerd/errdefs/pkg v0.3.0 // indirect - github.com/containerd/log v0.1.0 // indirect - 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.9.4 // indirect - github.com/distribution/reference v0.6.0 // indirect - github.com/docker/go-connections v0.8.2 // indirect - github.com/docker/go-units v0.5.0 // indirect - github.com/dromara/dongle v1.0.1 // indirect - github.com/geoarrow/geoarrow-go v0.0.0-20260403143023-f54751c3e3a1 // indirect - github.com/gin-gonic/gin v1.11.0 // indirect - github.com/go-asn1-ber/asn1-ber v1.5.8 // indirect - github.com/go-git/go-billy/v5 v5.9.0 // indirect - github.com/goccy/go-yaml v1.18.0 // indirect - github.com/golang/geo v0.0.0-20210211234256-740aa86cb551 // indirect - github.com/google/go-cmp v0.7.0 // indirect - github.com/gopherjs/gopherjs v1.17.2 // indirect - github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect - github.com/hashicorp/go-rootcerts v1.0.2 // indirect - github.com/hashicorp/go-secure-stdlib/parseutil v0.2.0 // indirect - 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-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 - github.com/jaegertracing/jaeger v1.47.0 // indirect - github.com/jhump/protoreflect/v2 v2.0.0-beta.1 // indirect - github.com/jtolds/gls v4.20.0+incompatible // indirect - github.com/kr/pretty v0.3.1 // indirect - github.com/kr/text v0.2.0 // indirect - github.com/lib/pq v1.12.3 // indirect - github.com/lithammer/shortuuid/v3 v3.0.7 // indirect - github.com/lpar/calendar v0.2.0 // indirect - github.com/magiconair/properties v1.18.12 // indirect - github.com/moby/docker-image-spec v1.3.1 // indirect - github.com/moby/go-archive v0.3.3 // indirect - github.com/moby/moby/api v1.56.1 // indirect - github.com/moby/moby/client v0.6.2 // indirect - github.com/moby/patternmatcher v0.6.1 // indirect - github.com/moby/sys/sequential v0.7.0 // indirect - github.com/moby/sys/user v0.4.1 // indirect - github.com/moby/sys/userns v0.1.0 // indirect - github.com/moby/term v0.5.2 // indirect - github.com/mschoch/smat v0.2.0 // indirect - github.com/oklog/ulid/v2 v2.1.2 // 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 - github.com/parquet-go/bitpack v1.0.0 // indirect - github.com/parquet-go/jsonlite v1.0.0 // indirect - github.com/petermattis/goid v0.0.0-20260113132338-7c7de50cc741 // indirect - github.com/pierrre/geohash v1.0.0 // indirect - github.com/pquerna/otp v1.5.0 // indirect - github.com/quic-go/qpack v0.6.0 // indirect - github.com/rclone/Proton-API-Bridge v1.0.5 // indirect - github.com/rclone/go-proton-api v1.0.4 // 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.1 // indirect - github.com/substrait-io/substrait-protobuf/go v0.85.0 // indirect - github.com/twpayne/go-geom v1.6.1 // indirect - github.com/twpayne/go-kml/v3 v3.2.1 // indirect - github.com/tyler-smith/go-bip39 v1.1.0 // indirect - github.com/ulikunitz/xz v0.5.15 // indirect - github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect - github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect - github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect - github.com/zeebo/xxh3 v1.1.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.47.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.47.0 // indirect - go.opentelemetry.io/otel/exporters/zipkin v1.45.0 // indirect - go.opentelemetry.io/otel/log v1.47.0 // indirect - go.opentelemetry.io/proto/otlp v1.11.1 // indirect - go.uber.org/mock v0.5.2 // indirect - go.yaml.in/yaml/v2 v2.4.4 // indirect - golang.org/x/mod v0.42.0 // indirect - gonum.org/v1/gonum v0.17.0 // indirect -) - require ( cel.dev/expr v0.25.3 // indirect + cloud.google.com/go v0.123.0 // indirect cloud.google.com/go/auth v0.24.1 // indirect cloud.google.com/go/auth/oauth2adapt v0.3.0 // indirect cloud.google.com/go/compute/metadata v0.10.0 // indirect cloud.google.com/go/iam v1.14.0 // indirect + cloud.google.com/go/longrunning v1.3.0 // indirect cloud.google.com/go/monitoring v1.31.0 // indirect + cloud.google.com/go/pubsub/v2 v2.7.0 // indirect + dario.cat/mergo v1.0.2 // indirect filippo.io/edwards25519 v1.2.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.24.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.14.1 github.com/Azure/azure-sdk-for-go/sdk/internal v1.13.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.8.3 + github.com/Azure/azure-sdk-for-go/sdk/keyvault/internal v0.7.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/storage/azfile v1.7.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/storage/internal v0.1.0 // indirect + github.com/Azure/go-ansiterm v0.0.0-20261006220739-8c912ac31dd4 // indirect github.com/Azure/go-ntlmssp v0.1.1 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.10.1 // indirect + github.com/FilenCloudDienste/filen-sdk-go v0.0.39 // indirect github.com/Files-com/files-sdk-go/v3 v3.3.194 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.62.0 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.62.0 // indirect @@ -313,10 +164,17 @@ require ( github.com/ProtonMail/gluon v0.17.1-0.20230724134000-308be39be96e // indirect github.com/ProtonMail/go-crypto v1.4.1 // indirect github.com/ProtonMail/go-srp v0.0.7 // indirect + github.com/ProtonMail/gopenpgp/v3 v3.4.1 // indirect github.com/PuerkitoBio/goquery v1.12.0 // indirect + github.com/RoaringBitmap/roaring/v2 v2.26.0 // indirect + github.com/a1ex3/zstd-seekable-format-go/pkg v0.10.0 // indirect github.com/abbot/go-http-auth v0.4.0 // indirect + github.com/adrg/xdg v0.5.3 // indirect + github.com/anchore/go-lzo v0.1.1 // indirect github.com/andybalholm/brotli v1.2.7 // indirect github.com/andybalholm/cascadia v1.3.4 // indirect + github.com/antlr4-go/antlr/v4 v4.13.1 // indirect + github.com/apache/thrift v0.24.0 // 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.27 // indirect @@ -329,42 +187,81 @@ require ( github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.11.13 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.12 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.20.12 // indirect + github.com/aws/aws-sdk-go-v2/service/signin v1.10.4 // indirect github.com/aws/aws-sdk-go-v2/service/sns v1.47.5 // indirect github.com/aws/aws-sdk-go-v2/service/sqs v1.52.4 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.38.4 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.43.4 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.51.6 - github.com/aws/smithy-go v1.28.9 + github.com/bahlo/generic-list-go v0.2.0 // indirect + github.com/bazelbuild/rules_go v0.46.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/biogo/store v0.0.0-20201120204734-aad293a2328f // indirect + github.com/bits-and-blooms/bitset v1.24.4 // indirect + github.com/blevesearch/snowballstem v0.9.0 // indirect github.com/boltdb/bolt v1.3.1 // indirect + github.com/boombuler/barcode v1.1.0 // indirect github.com/bradenaw/juniper v0.15.3 // indirect github.com/buengese/sgzip v0.1.1 // indirect + github.com/buger/jsonparser v1.2.0 // indirect github.com/calebcase/tmpfile v1.0.3 // indirect + github.com/cenkalti/backoff/v5 v5.0.3 // indirect github.com/chilts/sid v0.0.0-20190607042430-660e94789ec9 // indirect + github.com/clipperhouse/uax29/v2 v2.7.0 // 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/cockroachdb/apd/v3 v3.2.1 // indirect + github.com/cockroachdb/errors v1.14.0 // indirect + github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/version v0.0.0-20250314144055-3860cd14adf2 // indirect github.com/colinmarc/hdfs/v2 v2.4.0 // indirect + github.com/containerd/errdefs v1.0.0 // indirect + github.com/containerd/errdefs/pkg v0.3.0 // indirect + github.com/containerd/log v0.1.0 // indirect + github.com/containerd/platforms v1.0.0-rc.4 // indirect + github.com/coreos/go-semver v0.3.1 // indirect + github.com/coreos/go-systemd/v22 v22.7.0 // indirect + github.com/cpuguy83/dockercfg v0.3.2 // indirect github.com/creasty/defaults v1.8.0 // indirect github.com/cronokirby/saferith v0.33.1-0.20250226174546-1f11f94ce488 // indirect github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect github.com/d4l3k/messagediff v1.2.1 // indirect + github.com/dave/dst v0.27.2 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect + github.com/diskfs/go-diskfs v1.9.4 // indirect + github.com/distribution/reference v0.6.0 // indirect + github.com/docker/go-connections v0.8.2 // indirect + github.com/docker/go-units v0.5.0 // indirect + github.com/dromara/dongle v1.0.1 // indirect github.com/dropbox/dropbox-sdk-go-unofficial/v6 v6.4.0 // indirect + github.com/eapache/go-resiliency v1.6.0 // indirect + github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect + github.com/eapache/queue v1.1.0 // indirect github.com/ebitengine/purego v0.11.2 // 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-20260618161152-d854b7e0e2d3 // indirect github.com/envoyproxy/go-control-plane/envoy v1.40.1-0.20261014170222-9c4befd3c419 // indirect github.com/envoyproxy/protoc-gen-validate v1.3.3 // indirect + github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c // indirect + github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 // indirect + github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 // indirect github.com/fatih/color v1.19.0 // indirect github.com/felixge/httpsnoop v1.1.0 // indirect github.com/flynn/noise v1.1.0 // indirect + github.com/fsnotify/fsnotify v1.10.1 // indirect github.com/gabriel-vasile/mimetype v1.4.13 // indirect + github.com/geoarrow/geoarrow-go v0.0.0-20260403143023-f54751c3e3a1 // indirect github.com/geoffgarside/ber v1.2.0 // indirect + github.com/gin-gonic/gin v1.11.0 // indirect + github.com/go-asn1-ber/asn1-ber v1.5.8 // indirect github.com/go-chi/chi/v5 v5.4.0 // indirect github.com/go-darwin/apfs v0.0.0-20211011131704-f84b94dbf348 // indirect + github.com/go-git/go-billy/v5 v5.9.0 // indirect github.com/go-jose/go-jose/v4 v4.1.6 // indirect github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -376,47 +273,91 @@ require ( 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/go-zookeeper/zk v1.0.4 // indirect github.com/goccy/go-json v0.11.2 // indirect + github.com/goccy/go-yaml v1.18.0 // indirect github.com/gofrs/flock v0.13.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.2 // indirect + github.com/golang/geo v0.0.0-20210211234256-740aa86cb551 // indirect + github.com/google/go-cmp v0.7.0 // indirect github.com/google/s2a-go v0.1.11 // indirect + github.com/google/wire v0.7.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.24 // indirect + github.com/googleapis/gax-go/v2 v2.27.0 // indirect + github.com/gopherjs/gopherjs v1.17.2 // indirect github.com/gorilla/schema v1.4.1 // indirect github.com/gorilla/securecookie v1.1.2 // indirect - github.com/gorilla/sessions v1.4.0 github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect + github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.31.0 // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-msgpack/v2 v2.1.5 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-retryablehttp v0.7.8 // indirect + github.com/hashicorp/go-rootcerts v1.0.2 // indirect + github.com/hashicorp/go-secure-stdlib/parseutil v0.2.0 // indirect + github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect + github.com/hashicorp/go-sockaddr v1.0.7 // indirect + github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/hcl v1.0.1-vault-7 // 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 + github.com/jaegertracing/jaeger v1.47.0 // indirect github.com/jcmturner/aescts/v2 v2.0.0 // indirect github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect + github.com/jcmturner/gofork v1.7.6 // indirect github.com/jcmturner/goidentity/v6 v6.0.1 // indirect + github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect github.com/jcmturner/rpc/v2 v2.0.3 // indirect + github.com/jhump/protoreflect/v2 v2.0.0-beta.1 // indirect github.com/jlaffaye/ftp v0.2.1-0.20251026020404-6602e981a1bb // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jonboulle/clockwork v0.5.0 // indirect github.com/josharian/intern v1.0.0 // indirect + github.com/jtolds/gls v4.20.0+incompatible // indirect 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/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // 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/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.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/lib/pq v1.12.3 // indirect + github.com/lithammer/shortuuid/v3 v3.0.7 // indirect + github.com/lpar/calendar v0.2.0 // indirect github.com/lufia/plan9stats v0.0.0-20260627054121-477a66015f15 // indirect + github.com/magiconair/properties v1.18.12 // indirect + github.com/mailru/easyjson v0.9.2 // indirect github.com/mattn/go-colorable v0.1.15 // indirect + github.com/mattn/go-isatty v0.0.24 // indirect github.com/mattn/go-runewidth v0.0.31 // 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 + github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/moby/go-archive v0.3.3 // indirect + github.com/moby/moby/api v1.56.1 // indirect + github.com/moby/moby/client v0.6.2 // indirect + github.com/moby/patternmatcher v0.6.1 // indirect + github.com/moby/sys/sequential v0.7.0 // indirect + github.com/moby/sys/user v0.4.1 // indirect + github.com/moby/sys/userns v0.1.0 // indirect + github.com/moby/term v0.5.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect github.com/montanaflynn/stats v0.7.1 // indirect + github.com/mschoch/smat v0.2.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/nats-io/nats.go v1.54.0 // indirect github.com/nats-io/nkeys v0.4.16 // indirect @@ -425,80 +366,132 @@ require ( github.com/ncw/swift/v2 v2.0.5 // indirect github.com/nxadm/tail v1.4.11 // indirect github.com/oklog/ulid v1.3.1 // indirect + github.com/oklog/ulid/v2 v2.1.2 // indirect github.com/onsi/ginkgo/v2 v2.23.3 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.1 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect + github.com/openzipkin/zipkin-go v0.4.3 // indirect github.com/oracle/oci-go-sdk/v65 v65.121.0 // indirect github.com/panjf2000/ants/v2 v2.12.1 // indirect + github.com/parquet-go/bitpack v1.0.0 // indirect + github.com/parquet-go/jsonlite v1.0.0 // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect github.com/pelletier/go-toml/v2 v2.4.3 // indirect github.com/pengsrc/go-shared v0.2.1-0.20190131101655-1999055a4a14 // indirect + github.com/petermattis/goid v0.0.0-20260113132338-7c7de50cc741 // indirect github.com/philhofer/fwd v1.2.0 // indirect - github.com/pierrec/lz4/v4 v4.1.33 + github.com/pierrre/geohash v1.0.0 // indirect github.com/pingcap/errors v0.11.5-0.20211224045212-9687c2b0f87c // indirect github.com/pingcap/failpoint v0.0.0-20220801062533-2eaa32854a6c // indirect github.com/pingcap/kvproto v0.0.0-20230403051650-e166ae588106 // indirect github.com/pingcap/log v1.1.1-0.20221110025148-ca232912c9f3 // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect + github.com/pkg/errors v0.9.1 // indirect github.com/pkg/xattr v0.4.12 // indirect - github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20260805114148-88456608a4f6 // indirect + github.com/pquerna/otp v1.5.0 // indirect + github.com/prometheus/common v0.71.0 // indirect github.com/putdotio/go-putio/putio v0.0.0-20200123120452-16d982cac2b8 // indirect + github.com/quic-go/qpack v0.6.0 // indirect + github.com/rclone/Proton-API-Bridge v1.0.5 // indirect + github.com/rclone/go-proton-api v1.0.4 // indirect + github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/relvacode/iso8601 v1.7.0 // indirect + github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/rfjakob/eme v1.2.0 // indirect github.com/rivo/uniseg v0.4.7 // indirect + github.com/rogpeppe/go-internal v1.15.0 // indirect + github.com/ryanuber/go-glob v1.0.0 // 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.53.0 // indirect - github.com/seaweedfs/cockroachdb-parser v0.0.0-20260225204133-2f342c5ea564 + github.com/sasha-s/go-deadlock v0.3.1 // indirect + github.com/sirupsen/logrus v1.9.4 // indirect github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect + github.com/smarty/assertions v1.15.0 // indirect github.com/sony/gobreaker v1.0.0 // indirect + github.com/sony/gobreaker/v2 v2.4.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/afero v1.15.0 // indirect + github.com/spf13/cast v1.10.0 // indirect github.com/spf13/pflag v1.0.10 // indirect github.com/spiffe/go-spiffe/v2 v2.9.0 // indirect + github.com/stretchr/objx v0.5.3 // indirect github.com/subosito/gotenv v1.6.0 // indirect + github.com/substrait-io/substrait v0.87.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/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/tidwall/pretty v1.2.0 // indirect github.com/tikv/pd/client v0.0.0-20230329114254-1948c247c2b1 // 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/twpayne/go-geom v1.6.1 // indirect + github.com/twpayne/go-kml/v3 v3.2.1 // indirect + github.com/tyler-smith/go-bip39 v1.1.0 // indirect + github.com/ulikunitz/xz v0.5.15 // indirect github.com/unknwon/goconfig v1.0.0 // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect - github.com/winfsp/cgofuse v1.6.1-0.20260126094232-f2c4fccdb286 + github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect + github.com/xdg-go/pbkdf2 v1.0.0 // indirect + github.com/xdg-go/stringprep v1.0.4 // indirect + github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect + github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/yandex-cloud/go-genproto v0.0.0-20240819112322-98a264d392f6 // indirect github.com/ydb-platform/ydb-go-genproto v0.0.0-20260810122915-65bfd5c4b705 // indirect github.com/ydb-platform/ydb-go-yc v0.12.5 // indirect github.com/ydb-platform/ydb-go-yc-metadata v0.6.2 // indirect + github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect github.com/yunify/qingstor-sdk-go/v3 v3.2.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect github.com/zeebo/blake3 v0.2.4 // indirect github.com/zeebo/errs v1.4.0 // indirect + github.com/zeebo/xxh3 v1.1.0 // indirect go.etcd.io/bbolt v1.5.0 // indirect + go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/detectors/gcp v1.47.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.72.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.72.0 // indirect go.opentelemetry.io/otel v1.47.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.47.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.47.0 // indirect + go.opentelemetry.io/otel/exporters/zipkin v1.45.0 // indirect + go.opentelemetry.io/otel/log v1.47.0 // indirect go.opentelemetry.io/otel/metric v1.47.0 // indirect go.opentelemetry.io/otel/sdk v1.47.0 // indirect go.opentelemetry.io/otel/sdk/metric v1.47.0 // indirect go.opentelemetry.io/otel/trace v1.47.0 // indirect + go.opentelemetry.io/proto/otlp v1.11.1 // indirect + go.uber.org/mock v0.5.2 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.28.0 // indirect - golang.org/x/term v0.48.0 - golang.org/x/time v0.16.0 + go.yaml.in/yaml/v2 v2.4.4 // indirect + golang.org/x/mod v0.42.0 // indirect + golang.org/x/text v0.43.0 // indirect + golang.org/x/tools v0.52.0 // indirect + golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect + gonum.org/v1/gonum v0.17.0 // indirect + google.golang.org/genproto v0.0.0-20261019180522-ce908d29299b // indirect google.golang.org/genproto/googleapis/api v0.0.0-20261019180522-ce908d29299b // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20261019180522-ce908d29299b + gopkg.in/inf.v0 v0.9.1 // 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 gopkg.in/yaml.v3 v3.0.1 // indirect + modernc.org/b v1.0.0 // indirect modernc.org/libc v1.77.1 // indirect + modernc.org/mathutil v1.7.1 // indirect + modernc.org/memory v1.12.1 // indirect moul.io/http2curl/v2 v2.3.0 // indirect sigs.k8s.io/yaml v1.6.0 // indirect storj.io/common v0.0.0-20260629224719-ba1bff0a7846 // indirect diff --git a/telemetry/server/Dockerfile b/telemetry/server/Dockerfile index 759df98183..92b9dc35be 100644 --- a/telemetry/server/Dockerfile +++ b/telemetry/server/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.26-alpine AS builder +FROM golang:1.27-alpine AS builder WORKDIR /app diff --git a/telemetry/server/go.mod b/telemetry/server/go.mod index 42ef9718a3..b9b8b5330b 100644 --- a/telemetry/server/go.mod +++ b/telemetry/server/go.mod @@ -1,6 +1,6 @@ module github.com/seaweedfs/seaweedfs/telemetry/server -go 1.26.6 +go 1.27.4 require ( github.com/prometheus/client_golang v1.24.1 diff --git a/test/foundationdb/Dockerfile.build b/test/foundationdb/Dockerfile.build index b93ca74563..d305e61ceb 100644 --- a/test/foundationdb/Dockerfile.build +++ b/test/foundationdb/Dockerfile.build @@ -1,6 +1,6 @@ # Simplified single-stage build for SeaweedFS with FoundationDB support # Force x86_64 platform to use AMD64 FoundationDB packages -FROM --platform=linux/amd64 golang:1.26-bookworm +FROM --platform=linux/amd64 golang:1.27-bookworm ARG FOUNDATIONDB_VERSION=7.4.5 ENV FOUNDATIONDB_VERSION=${FOUNDATIONDB_VERSION} diff --git a/test/foundationdb/Dockerfile.build.arm64 b/test/foundationdb/Dockerfile.build.arm64 index 24c47f590d..3420992553 100644 --- a/test/foundationdb/Dockerfile.build.arm64 +++ b/test/foundationdb/Dockerfile.build.arm64 @@ -1,5 +1,5 @@ # Multi-stage Dockerfile to build SeaweedFS with FoundationDB support for ARM64 -FROM --platform=linux/arm64 golang:1.26-bookworm AS builder +FROM --platform=linux/arm64 golang:1.27-bookworm AS builder ARG FOUNDATIONDB_VERSION=7.4.5 ENV FOUNDATIONDB_VERSION=${FOUNDATIONDB_VERSION} diff --git a/test/foundationdb/Dockerfile.test b/test/foundationdb/Dockerfile.test index 3e16ff10d8..034435081c 100644 --- a/test/foundationdb/Dockerfile.test +++ b/test/foundationdb/Dockerfile.test @@ -1,5 +1,5 @@ # Test environment with Go and FoundationDB support -FROM golang:1.26-bookworm +FROM golang:1.27-bookworm # Install system dependencies RUN apt-get update && apt-get install -y \ diff --git a/test/fuse_integration/Makefile b/test/fuse_integration/Makefile index 1da4647dee..034d4fdeda 100644 --- a/test/fuse_integration/Makefile +++ b/test/fuse_integration/Makefile @@ -2,7 +2,7 @@ # Configuration WEED_BINARY := weed -GO_VERSION := 1.26 +GO_VERSION := 1.27 TEST_TIMEOUT := 30m COVERAGE_FILE := coverage.out diff --git a/test/kafka/Dockerfile.kafka-gateway b/test/kafka/Dockerfile.kafka-gateway index a1300b070b..2c9ab7297c 100644 --- a/test/kafka/Dockerfile.kafka-gateway +++ b/test/kafka/Dockerfile.kafka-gateway @@ -1,5 +1,5 @@ # Dockerfile for Kafka Gateway Integration Testing -FROM golang:1.26-alpine AS builder +FROM golang:1.27-alpine AS builder # Install build dependencies RUN apk add --no-cache git make gcc musl-dev sqlite-dev diff --git a/test/kafka/Dockerfile.seaweedfs b/test/kafka/Dockerfile.seaweedfs index 84ddac3a9f..a3526e7d48 100644 --- a/test/kafka/Dockerfile.seaweedfs +++ b/test/kafka/Dockerfile.seaweedfs @@ -1,5 +1,5 @@ # Dockerfile for building SeaweedFS components from the current workspace -FROM golang:1.26-alpine AS builder +FROM golang:1.27-alpine AS builder RUN apk add --no-cache git make gcc musl-dev sqlite-dev diff --git a/test/kafka/Dockerfile.test-setup b/test/kafka/Dockerfile.test-setup index d5026c0751..1dec30f56d 100644 --- a/test/kafka/Dockerfile.test-setup +++ b/test/kafka/Dockerfile.test-setup @@ -1,5 +1,5 @@ # Dockerfile for Kafka Integration Test Setup -FROM golang:1.26-alpine AS builder +FROM golang:1.27-alpine AS builder # Install build dependencies RUN apk add --no-cache git make gcc musl-dev diff --git a/test/kafka/go.mod b/test/kafka/go.mod index ccf9437988..f51355c8d1 100644 --- a/test/kafka/go.mod +++ b/test/kafka/go.mod @@ -1,6 +1,6 @@ module github.com/seaweedfs/seaweedfs/test/kafka -go 1.26.6 +go 1.27.4 require ( github.com/IBM/sarama v1.46.0 diff --git a/test/kafka/kafka-client-loadtest/Dockerfile.loadtest b/test/kafka/kafka-client-loadtest/Dockerfile.loadtest index 5e157744e0..fc17165779 100644 --- a/test/kafka/kafka-client-loadtest/Dockerfile.loadtest +++ b/test/kafka/kafka-client-loadtest/Dockerfile.loadtest @@ -2,7 +2,7 @@ # Multi-stage build for cross-platform support # Stage 1: Builder -FROM golang:1.26-alpine AS builder +FROM golang:1.27-alpine AS builder WORKDIR /app diff --git a/test/kafka/kafka-client-loadtest/go.mod b/test/kafka/kafka-client-loadtest/go.mod index d40ec326ff..f5da0f6ae6 100644 --- a/test/kafka/kafka-client-loadtest/go.mod +++ b/test/kafka/kafka-client-loadtest/go.mod @@ -1,6 +1,6 @@ module github.com/seaweedfs/seaweedfs/test/kafka/kafka-client-loadtest -go 1.26.6 +go 1.27.4 require ( github.com/IBM/sarama v1.46.1 diff --git a/test/postgres/Dockerfile.client b/test/postgres/Dockerfile.client index 53871de1c1..cfd63c76fe 100644 --- a/test/postgres/Dockerfile.client +++ b/test/postgres/Dockerfile.client @@ -1,4 +1,4 @@ -FROM golang:1.26-alpine AS builder +FROM golang:1.27-alpine AS builder # Set working directory WORKDIR /app diff --git a/test/postgres/Dockerfile.producer b/test/postgres/Dockerfile.producer index b64cd6a5c3..4bee9cd498 100644 --- a/test/postgres/Dockerfile.producer +++ b/test/postgres/Dockerfile.producer @@ -1,4 +1,4 @@ -FROM golang:1.26-alpine AS builder +FROM golang:1.27-alpine AS builder # Set working directory WORKDIR /app diff --git a/test/postgres/Dockerfile.seaweedfs b/test/postgres/Dockerfile.seaweedfs index b6f75d4dbe..c4fbf0ea94 100644 --- a/test/postgres/Dockerfile.seaweedfs +++ b/test/postgres/Dockerfile.seaweedfs @@ -1,4 +1,4 @@ -FROM golang:1.26-alpine AS builder +FROM golang:1.27-alpine AS builder # Install git and other build dependencies RUN apk add --no-cache git make diff --git a/test/s3/iam/Dockerfile.s3 b/test/s3/iam/Dockerfile.s3 index 75b86c3a1d..2d3856eac1 100644 --- a/test/s3/iam/Dockerfile.s3 +++ b/test/s3/iam/Dockerfile.s3 @@ -1,5 +1,5 @@ # Multi-stage build for SeaweedFS S3 with IAM -FROM golang:1.26-alpine AS builder +FROM golang:1.27-alpine AS builder # Install build dependencies RUN apk add --no-cache git make curl wget diff --git a/test/sftp/go.mod b/test/sftp/go.mod index 3c0e5f9273..b64a71b6ec 100644 --- a/test/sftp/go.mod +++ b/test/sftp/go.mod @@ -1,6 +1,6 @@ module seaweedfs-sftp-tests -go 1.26.6 +go 1.27.4 require ( github.com/pkg/sftp v1.13.7 diff --git a/weed/admin/plugin/worker_job_queues.go b/weed/admin/plugin/worker_job_queues.go index 0683e43ee8..5f6c7348ab 100644 --- a/weed/admin/plugin/worker_job_queues.go +++ b/weed/admin/plugin/worker_job_queues.go @@ -178,6 +178,7 @@ func (r *Plugin) assignJobsToWorkerQueues( // 1. own home queue // 2. steal from another home if len>=K, or orphan past OrphanRehomeGrace // 3. homeless leftover FIFO +// // No-home worker (no matching replica, no home-queue identity): // 1. homeless leftover FIFO // 2. only if leftover empty: steal (K / orphan), same rules diff --git a/weed/command/fuse_std.go b/weed/command/fuse_std.go index 5a8f7f558d..ead0f58f5c 100644 --- a/weed/command/fuse_std.go +++ b/weed/command/fuse_std.go @@ -369,6 +369,8 @@ func runFuse(cmd *Command, args []string) bool { } } + util.LogTransparentHugePages() + // just call "weed mount" command return runMount(cmdMount, []string{}) } diff --git a/weed/command/mini.go b/weed/command/mini.go index 416658bb85..2bdec985b2 100644 --- a/weed/command/mini.go +++ b/weed/command/mini.go @@ -1440,6 +1440,7 @@ func runMini(cmd *Command, args []string) bool { // flag (-v / -logtostderr / -alsologtostderr / -stderrthreshold) so they // can opt back into verbose output. quietMiniLogs() + util.LogTransparentHugePages() // Capture which flags were explicitly provided on the command line or via // WEED_* env vars BEFORE the saved options file is applied. Saved options diff --git a/weed/command/version.go b/weed/command/version.go index eda4576191..59dd5fd6f7 100644 --- a/weed/command/version.go +++ b/weed/command/version.go @@ -20,6 +20,7 @@ func runVersion(cmd *Command, args []string) bool { } fmt.Printf("version %s %s %s\n", version.Version(), runtime.GOOS, runtime.GOARCH) + fmt.Printf("go: %s\n", runtime.Version()) println() println("For enterprise users, please visit https://seaweedfs.com for the SeaweedFS Enterprise Edition,") println("which has advanced features, including data recovery, self-healing storage, customizable erasure coding, EC vacuum and repair, etc.") diff --git a/weed/iam/oidc/principal_tags_test.go b/weed/iam/oidc/principal_tags_test.go index 6444dec26f..bccd0a380b 100644 --- a/weed/iam/oidc/principal_tags_test.go +++ b/weed/iam/oidc/principal_tags_test.go @@ -8,8 +8,8 @@ import ( func TestExtractPrincipalTagsObjectShape(t *testing.T) { claims := map[string]interface{}{ PrincipalTagsClaim: map[string]interface{}{ - "team": "infra", - "env": "prod", + "team": "infra", + "env": "prod", "empty": "", // non-string values are dropped "count": 42, diff --git a/weed/iam/policy/jwt_claim_variables_test.go b/weed/iam/policy/jwt_claim_variables_test.go index b7d2935771..4a58f094a6 100644 --- a/weed/iam/policy/jwt_claim_variables_test.go +++ b/weed/iam/policy/jwt_claim_variables_test.go @@ -14,10 +14,10 @@ import ( // (int8..int64, uint..uint64, bool) values substitute correctly. func TestStringifyClaimValue(t *testing.T) { tests := []struct { - name string - value interface{} - want string - wantOk bool + name string + value interface{} + want string + wantOk bool }{ {name: "string", value: "alice", want: "alice", wantOk: true}, {name: "bool true", value: true, want: "true", wantOk: true}, diff --git a/weed/iamapi/iamapi_management_handlers_test.go b/weed/iamapi/iamapi_management_handlers_test.go index 3a85149fdf..bfca95a8aa 100644 --- a/weed/iamapi/iamapi_management_handlers_test.go +++ b/weed/iamapi/iamapi_management_handlers_test.go @@ -656,8 +656,8 @@ func TestCreateAccessKeyWithCallerSuppliedKeys(t *testing.T) { Identities: []*iam_pb.Identity{{Name: "alice"}}, } values := url.Values{ - "UserName": []string{"alice"}, - "AccessKeyId": []string{"myappkey"}, + "UserName": []string{"alice"}, + "AccessKeyId": []string{"myappkey"}, "SecretAccessKey": []string{"mysecret1234"}, } resp, iamErr := iama.CreateAccessKey(s3cfg, values) @@ -691,8 +691,8 @@ func TestCreateAccessKeyRejectsWeakKeys(t *testing.T) { } // Too short values := url.Values{ - "UserName": []string{"alice"}, - "AccessKeyId": []string{"ab"}, + "UserName": []string{"alice"}, + "AccessKeyId": []string{"ab"}, "SecretAccessKey": []string{"validsecret1"}, } _, iamErr := iama.CreateAccessKey(s3cfg, values) @@ -701,8 +701,8 @@ func TestCreateAccessKeyRejectsWeakKeys(t *testing.T) { // Short secret values = url.Values{ - "UserName": []string{"alice"}, - "AccessKeyId": []string{"validkey"}, + "UserName": []string{"alice"}, + "AccessKeyId": []string{"validkey"}, "SecretAccessKey": []string{"short"}, } _, iamErr = iama.CreateAccessKey(s3cfg, values) @@ -711,8 +711,8 @@ func TestCreateAccessKeyRejectsWeakKeys(t *testing.T) { // SigV4 delimiters values = url.Values{ - "UserName": []string{"alice"}, - "AccessKeyId": []string{"foo/bar=baz"}, + "UserName": []string{"alice"}, + "AccessKeyId": []string{"foo/bar=baz"}, "SecretAccessKey": []string{"validsecret1"}, } _, iamErr = iama.CreateAccessKey(s3cfg, values) diff --git a/weed/s3api/s3api_object_handlers_response_headers_test.go b/weed/s3api/s3api_object_handlers_response_headers_test.go index d2d010c5c2..3991a283fb 100644 --- a/weed/s3api/s3api_object_handlers_response_headers_test.go +++ b/weed/s3api/s3api_object_handlers_response_headers_test.go @@ -23,17 +23,17 @@ func TestSetResponseHeadersFiltersInternalExtendedKeys(t *testing.T) { Extended: map[string][]byte{ s3_constants.AmzObjectTaggingPrefix + "project": []byte("alpha"), s3_constants.AmzObjectTaggingPrefix + "owner": []byte("y"), - "x-amz-tagging-sneaky": []byte("z"), - "seaweed-x-amz-acl": []byte("z"), + "x-amz-tagging-sneaky": []byte("z"), + "seaweed-x-amz-acl": []byte("z"), s3_constants.ExtAmzAclKey: []byte(`[{"Permission":"FULL_CONTROL"}]`), s3_constants.ExtAmzOwnerKey: []byte("admin"), s3_constants.ExtVersionIdKey: []byte("version-1"), s3_constants.ExtObjectLockModeKey: []byte("COMPLIANCE"), s3_constants.ExtETagKey: []byte("d41d8cd98f00b204e9800998ecf8427e"), s3_constants.SeaweedFSWriteId: []byte("write-id"), - "X-Amz-Meta-Foo": []byte("bar"), - "Cache-Control": []byte("no-cache"), - "xattr-user.note": []byte("n"), + "X-Amz-Meta-Foo": []byte("bar"), + "Cache-Control": []byte("no-cache"), + "xattr-user.note": []byte("n"), }, } diff --git a/weed/server/volume_grpc_erasure_coding_recover.go b/weed/server/volume_grpc_erasure_coding_recover.go index 1ab3dee7ed..6c02647085 100644 --- a/weed/server/volume_grpc_erasure_coding_recover.go +++ b/weed/server/volume_grpc_erasure_coding_recover.go @@ -85,7 +85,9 @@ func (vs *VolumeServer) recoverEcIndexLocked(peers []pb.ServerAddress, m storage // the fetch, but its shards still need the mount. fetched := false current := vs.store.CollectEcVolumesMissingIndex(m.VolumeId) - if i := slices.IndexFunc(current, func(x storage.EcVolumeMissingIndex) bool { return x.VolumeId == m.VolumeId && x.Collection == m.Collection }); i >= 0 { + if i := slices.IndexFunc(current, func(x storage.EcVolumeMissingIndex) bool { + return x.VolumeId == m.VolumeId && x.Collection == m.Collection + }); i >= 0 { if len(peers) == 0 { glog.Warningf("ec volume %d: shards present locally but .ecx missing and no peer holds it; leaving shards unloaded", m.VolumeId) return false diff --git a/weed/storage/erasure_coding/ecbalancer/place_test.go b/weed/storage/erasure_coding/ecbalancer/place_test.go index 32eef6edba..59f813ce1a 100644 --- a/weed/storage/erasure_coding/ecbalancer/place_test.go +++ b/weed/storage/erasure_coding/ecbalancer/place_test.go @@ -843,12 +843,12 @@ func assertLiveGapFrozen(t *testing.T, before, after map[diskKey]int, placed map // Existing 4-1-2 / within-rack 2-disk cases stay in the tests above. func TestPlace10Plus4ImbalanceTiebreak(t *testing.T) { cases := []struct { - name string + name string racks, machines, disks int - remainderZero bool - fatFirstGetsZero bool - rackExtras bool - fatRacksTwoPlusOne bool + remainderZero bool + fatFirstGetsZero bool + rackExtras bool + fatRacksTwoPlusOne bool }{ {name: "1-1-4", racks: 1, machines: 1, disks: 4}, {name: "1-1-6", racks: 1, machines: 1, disks: 6}, diff --git a/weed/util/hugepage.go b/weed/util/hugepage.go new file mode 100644 index 0000000000..2566d92c13 --- /dev/null +++ b/weed/util/hugepage.go @@ -0,0 +1,62 @@ +package util + +import ( + "strconv" + "strings" +) + +// parseTHPMode extracts the active mode from a sysfs transparent huge page +// knob. The kernel prints every supported mode and brackets the active one, +// for example "always [madvise] never". +func parseTHPMode(content string) string { + for _, field := range strings.Fields(content) { + if strings.HasPrefix(field, "[") && strings.HasSuffix(field, "]") { + return strings.Trim(field, "[]") + } + } + return "" +} + +// parseTHPValue trims a plain sysfs value such as khugepaged/max_ptes_none. +func parseTHPValue(content string) string { + return strings.TrimSpace(content) +} + +// goHeapHugePagesDisabled reports whether GODEBUG sets disablethp, which makes +// the runtime map the heap with MADV_NOHUGEPAGE. Like the runtime, the last +// disablethp with an integer value wins. +func goHeapHugePagesDisabled(godebug string) bool { + disabled := false + for _, setting := range strings.Split(godebug, ",") { + key, value, ok := strings.Cut(setting, "=") + if !ok || key != "disablethp" { + continue + } + if n, err := strconv.ParseInt(value, 10, 32); err == nil { + disabled = n != 0 + } + } + return disabled +} + +// anonHugePagesAlways reports whether the host gives huge pages to anonymous +// memory that was not madvised, which is how the runtime maps the heap (it +// advises only GC metadata). Since Linux 6.8 each size has its own policy and +// only "inherit" follows the top-level one; older kernels have none. An empty +// size mode is one that could not be read, so known is false when it alone +// could have allowed huge pages. +func anonHugePagesAlways(enabled string, sizeModes []string) (always, known bool) { + if len(sizeModes) == 0 { + return enabled == "always", true + } + known = true + for _, mode := range sizeModes { + if mode == "always" || mode == "inherit" && enabled == "always" { + return true, true + } + if mode == "" { + known = false + } + } + return false, known +} diff --git a/weed/util/hugepage_linux.go b/weed/util/hugepage_linux.go new file mode 100644 index 0000000000..6f69c49f23 --- /dev/null +++ b/weed/util/hugepage_linux.go @@ -0,0 +1,105 @@ +//go:build linux + +package util + +import ( + "os" + "path/filepath" + + "github.com/seaweedfs/seaweedfs/weed/glog" + "golang.org/x/sys/unix" +) + +const ( + thpEnabledPath = "/sys/kernel/mm/transparent_hugepage/enabled" + thpDefragPath = "/sys/kernel/mm/transparent_hugepage/defrag" + thpMaxPtesPath = "/sys/kernel/mm/transparent_hugepage/khugepaged/max_ptes_none" + thpSizesGlob = "/sys/kernel/mm/transparent_hugepage/hugepages-*kB/enabled" +) + +// TransparentHugePages is the host's transparent huge page policy as the +// kernel reports it. +type TransparentHugePages struct { + Enabled string // always, madvise or never + Defrag string // always, defer, defer+madvise or madvise + MaxPtesNone string // khugepaged/max_ptes_none, empty when unreadable + SizeModes []string // hugepages-kB/enabled, Linux 6.8+; empty when unreadable +} + +func readTHPMode(path string) string { + content, err := os.ReadFile(path) + if err != nil { + return "" + } + return parseTHPMode(string(content)) +} + +func readTHPValue(path string) string { + content, err := os.ReadFile(path) + if err != nil { + return "" + } + return parseTHPValue(string(content)) +} + +func readTHPSizeModes() []string { + paths, _ := filepath.Glob(thpSizesGlob) + var modes []string + for _, path := range paths { + modes = append(modes, readTHPMode(path)) + } + return modes +} + +// ReadTransparentHugePages reports the host THP policy, or nil when the kernel +// does not expose it (non-Linux kernels and some sandboxes). +func ReadTransparentHugePages() *TransparentHugePages { + enabled := readTHPMode(thpEnabledPath) + if enabled == "" { + return nil + } + return &TransparentHugePages{ + Enabled: enabled, + Defrag: readTHPMode(thpDefragPath), + MaxPtesNone: readTHPValue(thpMaxPtesPath), + SizeModes: readTHPSizeModes(), + } +} + +// processHugePagesDisabled reports whether prctl(PR_SET_THP_DISABLE), which +// a launcher such as systemd can set and children inherit, turned THP off for +// this process. Its except-advised variant still covers the unadvised heap. +// known is false when the kernel refuses to answer. +func processHugePagesDisabled() (disabled, known bool) { + value, err := unix.PrctlRetInt(unix.PR_GET_THP_DISABLE, 0, 0, 0, 0) + return value != 0, err == nil +} + +// LogTransparentHugePages writes the host THP policy to the log once at +// startup. It deliberately changes nothing: THP is a host-wide setting that no +// process should rewrite, and GODEBUG=disablethp=1 is the only per-process +// control Go offers. Recommended host settings are in +// https://go.dev/doc/gc-guide#Linux_transparent_huge_pages +func LogTransparentHugePages() { + status := ReadTransparentHugePages() + if status == nil { + return + } + hostAllowsHeap, hostKnown := anonHugePagesAlways(status.Enabled, status.SizeModes) + if status.Enabled == "never" && hostKnown && !hostAllowsHeap { + glog.V(0).Infof("transparent huge pages: disabled by the host; the Go heap will not use them") + return + } + goHeapTHP := "false" + if (hostAllowsHeap || !hostKnown) && !goHeapHugePagesDisabled(os.Getenv("GODEBUG")) { + switch disabled, known := processHugePagesDisabled(); { + case known && disabled: + case !known || !hostKnown: + goHeapTHP = "unknown" + default: + goHeapTHP = "true" + } + } + glog.V(0).Infof("transparent huge pages: enabled=%s defrag=%s khugepaged.max_ptes_none=%s go_heap_thp=%s; see https://go.dev/doc/gc-guide#Linux_transparent_huge_pages", + status.Enabled, status.Defrag, status.MaxPtesNone, goHeapTHP) +} diff --git a/weed/util/hugepage_linux_test.go b/weed/util/hugepage_linux_test.go new file mode 100644 index 0000000000..65e780a747 --- /dev/null +++ b/weed/util/hugepage_linux_test.go @@ -0,0 +1,29 @@ +//go:build linux + +package util + +import ( + "testing" + + "golang.org/x/sys/unix" +) + +func TestProcessHugePagesDisabled(t *testing.T) { + if inherited, err := unix.PrctlRetInt(unix.PR_GET_THP_DISABLE, 0, 0, 0, 0); err != nil || inherited != 0 { + t.Skipf("PR_GET_THP_DISABLE = %d, %v; want a process with THP allowed", inherited, err) + } + t.Cleanup(func() { unix.Prctl(unix.PR_SET_THP_DISABLE, 0, 0, 0, 0) }) + + if err := unix.Prctl(unix.PR_SET_THP_DISABLE, 1, 0, 0, 0); err != nil { + t.Skipf("PR_SET_THP_DISABLE: %v", err) + } + if disabled, known := processHugePagesDisabled(); !disabled || !known { + t.Errorf("processHugePagesDisabled() = %t, %t after PR_SET_THP_DISABLE=1", disabled, known) + } + if err := unix.Prctl(unix.PR_SET_THP_DISABLE, 0, 0, 0, 0); err != nil { + t.Fatalf("clear PR_SET_THP_DISABLE: %v", err) + } + if disabled, known := processHugePagesDisabled(); disabled || !known { + t.Errorf("processHugePagesDisabled() = %t, %t after PR_SET_THP_DISABLE=0", disabled, known) + } +} diff --git a/weed/util/hugepage_other.go b/weed/util/hugepage_other.go new file mode 100644 index 0000000000..70933499d1 --- /dev/null +++ b/weed/util/hugepage_other.go @@ -0,0 +1,6 @@ +//go:build !linux + +package util + +// LogTransparentHugePages is a no-op: the sysfs knobs it reports are Linux only. +func LogTransparentHugePages() {} diff --git a/weed/util/hugepage_test.go b/weed/util/hugepage_test.go new file mode 100644 index 0000000000..517657781b --- /dev/null +++ b/weed/util/hugepage_test.go @@ -0,0 +1,88 @@ +package util + +import "testing" + +func TestParseTHPMode(t *testing.T) { + tests := []struct { + name string + content string + want string + }{ + {name: "always active", content: "[always] madvise never", want: "always"}, + {name: "madvise active", content: "always [madvise] never", want: "madvise"}, + {name: "never active", content: "always madvise [never]", want: "never"}, + {name: "trailing newline", content: "always [madvise] never\n", want: "madvise"}, + {name: "defer plus madvise active", content: "always defer [defer+madvise] madvise never", want: "defer+madvise"}, + {name: "no bracket", content: "always madvise never", want: ""}, + {name: "empty", content: "", want: ""}, + {name: "partial bracket", content: "[madvise never", want: ""}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + if got := parseTHPMode(tc.content); got != tc.want { + t.Errorf("parseTHPMode(%q) = %q, want %q", tc.content, got, tc.want) + } + }) + } +} + +func TestParseTHPValue(t *testing.T) { + if got := parseTHPValue("511\n"); got != "511" { + t.Errorf("parseTHPValue trimmed trailing newline: got %q, want %q", got, "511") + } + if got := parseTHPValue(""); got != "" { + t.Errorf("parseTHPValue of empty content: got %q, want empty", got) + } +} + +func TestGoHeapHugePagesDisabled(t *testing.T) { + tests := []struct { + godebug string + want bool + }{ + {godebug: "", want: false}, + {godebug: "disablethp=1", want: true}, + {godebug: "disablethp=0", want: false}, + {godebug: "disablethp=2", want: true}, + {godebug: "gctrace=1,disablethp=1", want: true}, + {godebug: "disablethp=1,disablethp=0", want: false}, + {godebug: "disablethp=0,disablethp=1", want: true}, + {godebug: "disablethp=1,disablethp=on", want: true}, + {godebug: "gctrace=1, disablethp=1", want: false}, + } + for _, tc := range tests { + if got := goHeapHugePagesDisabled(tc.godebug); got != tc.want { + t.Errorf("goHeapHugePagesDisabled(%q) = %t, want %t", tc.godebug, got, tc.want) + } + } +} + +func TestAnonHugePagesAlways(t *testing.T) { + tests := []struct { + name string + enabled string + sizeModes []string + want bool + wantKnown bool + }{ + {name: "no per-size policies, always", enabled: "always", want: true, wantKnown: true}, + {name: "no per-size policies, madvise", enabled: "madvise", want: false, wantKnown: true}, + {name: "default sizes, always", enabled: "always", sizeModes: []string{"never", "inherit", "never"}, want: true, wantKnown: true}, + {name: "default sizes, madvise", enabled: "madvise", sizeModes: []string{"never", "inherit", "never"}, want: false, wantKnown: true}, + {name: "small size always under madvise", enabled: "madvise", sizeModes: []string{"always", "inherit"}, want: true, wantKnown: true}, + {name: "small size always under never", enabled: "never", sizeModes: []string{"always", "never"}, want: true, wantKnown: true}, + {name: "pmd size never under always", enabled: "always", sizeModes: []string{"never", "never"}, want: false, wantKnown: true}, + {name: "per-size madvise under always", enabled: "always", sizeModes: []string{"madvise", "never"}, want: false, wantKnown: true}, + {name: "unreadable size under never", enabled: "never", sizeModes: []string{"", "never"}, want: false, wantKnown: false}, + {name: "unreadable size beside always", enabled: "never", sizeModes: []string{"", "always"}, want: true, wantKnown: true}, + {name: "all sizes unreadable", enabled: "always", sizeModes: []string{"", ""}, want: false, wantKnown: false}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + got, known := anonHugePagesAlways(tc.enabled, tc.sizeModes) + if got != tc.want || known != tc.wantKnown { + t.Errorf("anonHugePagesAlways(%q, %q) = %t, %t, want %t, %t", tc.enabled, tc.sizeModes, got, known, tc.want, tc.wantKnown) + } + }) + } +} diff --git a/weed/util/parse_test.go b/weed/util/parse_test.go index ba2708c330..49ec27e2fa 100644 --- a/weed/util/parse_test.go +++ b/weed/util/parse_test.go @@ -4,11 +4,11 @@ import "testing" func TestParseHostPort(t *testing.T) { tests := []struct { - name string - hostPort string - wantHost string - wantPort int64 - wantErr bool + name string + hostPort string + wantHost string + wantPort int64 + wantErr bool }{ { name: "hostname", diff --git a/weed/weed.go b/weed/weed.go index 17f6a44e18..ff0c2fea50 100644 --- a/weed/weed.go +++ b/weed/weed.go @@ -94,6 +94,9 @@ func main() { cmd.Flag.Parse(args[1:]) args = cmd.Flag.Args() IsDebug = cmd.IsDebug + if isLongRunningCommand(cmd.Name()) { + util.LogTransparentHugePages() + } if !cmd.Run(cmd, args) { fmt.Fprintf(os.Stderr, "\n") cmd.Flag.Usage() @@ -115,6 +118,22 @@ func main() { exit() } +// isLongRunningCommand reports whether the command keeps serving after +// startup. Only those report the host THP policy, so one-shot tools stay quiet. +// mini and fuse report it themselves: mini after quieting stderr, fuse only in +// the child that serves the mount, not in the parent that starts it. +func isLongRunningCommand(name string) bool { + switch name { + case "server", "master", "master.follower", "volume", "filer", "s3", "iam", + "admin", "worker", "webdav", "sftp", "mount", + "filer.sync", "filer.backup", "filer.meta.backup", "filer.replicate", + "filer.remote.sync", "filer.remote.gateway", + "mq.broker", "mq.agent", "mq.kafka.gateway": + return true + } + return false +} + var usageTemplate = ` SeaweedFS: store billions of files and serve them fast!