[sheepdog] [PATCH V5] [PATCH V5] sheep: remove unregister_event from process_event_queue()

Liu Yuan namei.unix at gmail.com
Fri May 18 04:24:53 CEST 2012


On 05/17/2012 11:01 PM, Yunkai Zhang wrote:

> Changes in V5:
> - use update_node_info() helper to make sd_leave_handler more cleanly
> --------------------------------------------------------------------- >8
> 
> In old code, we call unregister_event(cdrv_fd, ...) in process_event_queue()
> when sheep receives cluster EVENT, we will register cdrv_fd into epoll again
> in event_done() after __sd_xxx() finished.
> 
> This is dangerous! In our testing, for some reason, __sd_xxx() may be blocked
> by network issue, as a result event_done() would not be executed, and cdrv_fd
> would keep outstanding from epoll, then all new coming EVENT could not be
> process immediately. This will make sheep hard to complete recovery.
> 
> Now, we call update_cluster_info() in sd_xxx_handler() directly so that we can
> process new EVENT one by one immediately, and needn't to wait previous EVENT's
> __sd_xxx() finished.  So we can remove unregister_event() from
> process_event_queue() safely.


Applied, thanks.

Yuan



More information about the sheepdog mailing list