Skip to content

admin replicate resync status: Throughput overflows once more than ~8.6 GiB is transferred #48

Closed

Description

@MikeVL

Version: mcli RELEASE.2026-10-18T00-00-00Z, same code on main; server silo RELEASE.2026-10-18T00-00-00Z.

What happens

During a site replication resync, mcli admin replicate resync status <site1> <site2> shows a wrong throughput:

Transferred:   101 GiB
Throughput:    16 EiB/s
Elapsed:       1m35.5s

An earlier long resync (847 GiB in 13h45m) showed 114 KiB/s.

Cause

cmd/admin-replicate-resync-status.go#L237:

bytesTransferredPerSec := float64(int64(time.Second)*m.current.ReplicatedSize) / float64(accElapsedTime)

int64(time.Second) * ReplicatedSize is 1e9 × bytes. It overflows int64 once ReplicatedSize exceeds math.MaxInt64 / 1e9 ≈ 9.2e9 bytes (~8.6 GiB). L238 does the same with ReplicatedCount.

Suggested fix

secs := accElapsedTime.Seconds()
bytesTransferredPerSec := float64(m.current.ReplicatedSize) / secs
objectsPerSec := float64(m.current.ReplicatedCount) / secs

Activity

  1. Vonng commented on Oct 26, 2026

    @Vonng
    Member

    Fixed in 49dd7df7, merged into main.

    Throughput and IOPs now divide the counters by elapsed seconds as floating-point values, avoiding the overflowing int64 multiplication. The existing guard for nonpositive elapsed time is preserved. With the existing display rounding, 101 GiB in 95.5 seconds shows 1.1 GiB/s, and 847 GiB in 13h45m shows 18 MiB/s.

    The new regression test checks the actual rendered status table across 12 cases: byte and object counters immediately below, at, and above the overflow boundary; both reported workloads; subsecond timing; zero counters; and zero/negative elapsed time. Four cases fail with the previous implementation; all 12 pass with the fix. Local tests across all Go packages, race checks, lint, vet, repository checks, and make install also pass.

    GitHub CI passed for this commit: Go tests on Linux/macOS/Windows, including the SILO functional suite on Linux, cross-compilation, vulnerability analysis, and release pipeline validation.

    This fix will ship in the next release cycle. It is fixed in main but is not yet included in a published release. Closing as completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions