Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
It's possible to wedge "snabb config listen" #668
"Snabb config listen" will attempt to pipeline requests to the leader. However it's possible to end up in a situation where "snabb config listen" deadlocks with the leader. Consider, the listener has many requests to the leader, and is just encoding them and writing them out. The leader will handle them one by one. So the leader polls and sees it has a request, cool, it goes into a state where it reads that request off in a non-blocking way; when it has the request, it runs it, then mkes a response, goes into a state of writing that response back, and when the response is gone, it goes back to listening for another request. Well what happens if the response is bigger than the request? In that case probably the leader could end up stuck in the writing state (which does not block the process but does block the handling of that client), whereas the "snabb config listen" might be in a writing state waiting for the leader to drain the write side!
Disabling pipelining is obviously a possibility, but it's not so nice. Not sure what to do here, or whose fault this is.