mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-11-01 19:56:37 +08:00
When using S3/MinIO backend, the progress callback in AcquireImage was called synchronously on every 4KB read chunk (via StreamPipe2). Each call invokes UpdateServerProgress which makes a blocking HTTP PUT to the compute API (~50ms), capping download speed at ~0.65 Mbps regardless of available bandwidth. Fix: throttle the callback to fire at most once every 5 seconds and make the HTTP call asynchronous (goroutine), matching the behavior of v3.11.x which used a 1-second ticker with async callbacks. Fixes #24897 Co-authored-by: Mrliuch <liu15094534492@gmail.com>