It's quite some time that setnonblock() was commented out, and dw_node is only used in --per-client-thread mode, basically not using epoll()-based interactions. Those should be restored, where one critical point is the FORWARD at the moment, that needs 3 different substates:
CONNECTING to the forwarded IP:port
SENDING data to the forwarded socket
RECEIVING a reply from the forwarded socket
Further attention is needed by LOAD and particularly STORE, that need further substates as well:
LOADING or STORING data
syncing writes on disk (for STORE)
Furthermore, process_messages() needs to keep track of the specific command in m->cmds[] that is being processed in the current state, so to be able to keep going from where it left off.
It's quite some time that setnonblock() was commented out, and dw_node is only used in --per-client-thread mode, basically not using epoll()-based interactions. Those should be restored, where one critical point is the FORWARD at the moment, that needs 3 different substates:
Further attention is needed by LOAD and particularly STORE, that need further substates as well:
Furthermore, process_messages() needs to keep track of the specific command in m->cmds[] that is being processed in the current state, so to be able to keep going from where it left off.