Replay progress report
Eric S. Raymond
esr at thyrsus.com
Thu Dec 31 20:50:15 UTC 2015
Hal Murray <hmurray at megapathdsl.net>:
>
> esr at snark.thyrsus.com said:
> > Still trying to get the peer structures set up properly in replay mode.
> > It's pretty clear that a prerequisite for this is having the DNS lookups
> > done, and we don't want replay to depend on being able to do DNS lookups.
>
> > So, my latest set of changes adds the capability to force synchronous DNS
> > lookup before the main loop gets started. This is used in capture mode to
> > log the lookups. Their captures look like this:
>
> > Replay mode picks these up from the capture, so it never actually calls
> > getaddrinfo.
>
> Right. But it doesn't need to do that before the main loop gets started.
> The pool code probably depends on doing DNS lookups from the main thread.
>
> DNS lookups should be handled similar to receiving packets. Record needs to
> intercept the place in the main thread where it gets the answer from the
> helper thread and replay needs to call the code that processes the answer
> when it finds the info in the replay log.
I considered doing it that way. The problem is that if you multithread
the DNS lookups, the order in which the capture events land is no longer
deterministic. At that point the minimum complexity required of the
replay interpreter *explodes*. I chose to dodge that lest I find
myself down a rathole.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
More information about the devel
mailing list