wolff
wolff copied to clipboard
feat: optimize disk buffer writes
Previously, the wolff_producer
implementation is aggresive when try to enqueue newly received calls, even when max_linger_ms is set to non-zero because the linger was implemented from the popping end of the queue.
This change moves the linger timer to the pushing end of the queue, that is, the process will delay enqueue to allow a larger collection of concurrent calls so the write batch towards disk can be larger
This also means when max_linger_ms
is not zero, the concurrent callers will get blocked while lingering.