Skip to content
Snippets Groups Projects
Commit 2d266be4 authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

box: respond to signals during recovery from a local snapshot/xlog.

We already install signal handlers, but don't give them a chance
to execute, since don't yield during recovery. Add yields once
per a few tens of thousands of events.

Deploy a special hack with an idle watcher to make sure that
fiber_sleep(0) doesn't sleep for too long (1 ms without this
watcher).

libev sleeps for at least 1 ms (backend_mintime) unless there are
idle watchers. The logic of this behaviour is obscure to say the
least.

Since the upstream is also using *screw-the-community* cvs for
revision control, maintaining an own patch set on top of the
upstream is also a pain in the neck.

So, instead of patching libev (I hesitate to simply remove the
obscure logic since I don't understand the reason for it from the
comments, and I don't think making this logic optional is worth
the hassle, given also that we will diverge even more from the
upstream), create an idle watcher in fiber_sleep(), as a
workaround, to make sure backend_mintime is not looked at when
calculating sleep time for poll(), and zero timeout is used
instead.
parent abe81847
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment