mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
When uploading an object part, client spawns a background fiber that keeps the buffers with data on the http request's write_body() lambda capture. This generates unbound usage of memory with uploaded buffers which is not nice. Even though s3 client is limited with http's client max-connections parallelism, waiting for the available connection still happens with buffers held in memory. This patch makes the client claim the background memory from the provided semaphore (which, in turn, sits on the shard-wide storage manager instance). Once body writing is complete, the claimed units are returned back to the semaphore allowing for more background writes. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
3.9 KiB
3.9 KiB