mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-03 05:26:58 +00:00
While MUTATION and MUTATION_DONE are asynchronous by nature (when a MUTATION completes, it sends a MUTATION_DONE message instead of responding synchronously), we still want them to be synchronous at the server side wrt. the RPC server itself. This is because RPC accounts for resources consumed by the handler only while the handler is executing; if we return immediately, and let the code execute asynchronously, RPC believes no resources are consumed and can instantiate more handlers than the shard has resources for. Fix by changing the return type of the handlers to future<no_wait_type> (from a plain no_wait_type), and making that future complete when local processing is over. Ref #596. Message-Id: <1453048967-5286-1-git-send-email-avi@scylladb.com>