On Tue, Feb 19, 2002 at 11:25:21AM +0100, Niklas Mehner wrote:
> Hi !
> 
> Question regarding the ticker:
> 
> ConnectionHandler.java line 270 sais:
>   t.add(0, msg);
> 
> which does nothing more, but start a new thread to handle the msg.
> Why not start the thread at once ?

Because the ticker already has an execution queue and handles thread
overflows etc. 

> I think many of the BadStateExceptions (I get quite some under load in
> my log), are caused my messages overtaking each other.
> Placing messages in a heap (in the ticker) does not improve this.
> I do not know if the protocol depends on the order of messages (I think 
> it does ?), but if
> so, this has to be changed.

The states and protocol are meant to not depend on the order of messages
(beyond that action precedes reaction). Since messages related to the
same query can be sent down the different connections, subject to
different delays, etc, it would be wrong to assume they could be handled
in the correct order even if we were very strict about their order
internally. 

I think your BadStateExceptions are just coming from Tavin's habit of
leaving some internal message lying around after the query ends. What
messages are most commonly mentioned?

-- 

Oskar Sandberg
oskar at freenetproject.org

_______________________________________________
Devl mailing list
Devl at freenetproject.org
http://lists.freenetproject.org/mailman/listinfo/devl

Reply via email to