Files
BackupX/server/internal/backup
Awuqing f388b98943 refactor: single-pass hashing during upload via TeeReader
Previous approach read the file twice (once for SHA-256, once for upload),
doubling disk I/O. Under concurrent multi-target uploads this becomes a
bottleneck.

New design — hashingReader wraps io.TeeReader + sha256.Hash:
  file.Read() → TeeReader → sha256.Write() (hash) + provider (upload)
Single read pass yields both byte count and SHA-256 simultaneously.

Each upload goroutine independently opens the file and computes its own
hash. The first successful target writes checksum to the record via
sync.Once. Zero extra disk I/O, zero extra memory copies, fully
concurrent-safe.
2026-03-31 13:08:10 +08:00
..
2026-03-17 13:29:09 +08:00
2026-03-17 13:29:09 +08:00
2026-03-17 13:29:09 +08:00
2026-03-17 13:29:09 +08:00
2026-03-17 13:29:09 +08:00
2026-03-17 13:29:09 +08:00
2026-03-17 13:29:09 +08:00
2026-03-17 13:29:09 +08:00
2026-03-17 13:29:09 +08:00
2026-03-17 13:29:09 +08:00
2026-03-17 13:29:09 +08:00
2026-03-17 13:29:09 +08:00
2026-03-17 13:29:09 +08:00
2026-03-17 13:29:09 +08:00
2026-03-17 13:29:09 +08:00
2026-03-17 13:29:09 +08:00
2026-03-17 13:29:09 +08:00
2026-03-17 13:29:09 +08:00