ons 2009-02-25 klockan 12:10 +1100 skrev Mark Nottingham:
> What am I missing? The most straightforward way that I can see to do
> this is to add an identifier to clientHttpRequest and pass that to
> debug where available...
That is what ctx_enter is about... There is not a single location where
ctx_enter needs to be called, there is many..
Remember that Squid is a big bunch of event driven state machines, doing
a little bit of processing at a time interleaved with many other
unrelated things. ctx_enter indicates which state transition is
currently being processed, ctx_leave when that state transition has
completed waiting for next event (even if still at the same state..)
So you need ctx_enter in quite many places, providing a reasonable trace
of the processing within the state machine so far, based on whatever
identifier the current small step is about. Each time the processing
returns to the comm loop you are back at ctx level 0 with no context.
Sometimes the ctx level may be quite high, having many loosely related
state transitions in the trace, sometimes even almost completely
unrelated requests.
Most of the time the state machine starts with something directly
related to a specific request (read/write on http sockets) however, but
there is also many other kinds of state transitions like DNS, timers
etc.
Regards
Henrik
Received on Wed Feb 25 2009 - 07:41:01 MST
This archive was generated by hypermail 2.2.0 : Wed Feb 25 2009 - 12:00:03 MST