mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-22 17:40:34 +00:00
The complete() function loops around, waiting for notifications and cleaning up the ring when they happen. However, we also call it opportunistically from produce(), and each time this happens, it starts another loop in the background, leaking memory. Fix by splitting complete() into do_complete(), which doesn't loop, and complete(), which does, and only call do_complete() from the produce() loop.