On Tue, Apr 11, 2000 at 01:53:58PM +0200, Oskar Sandberg wrote: > > On Tue, 11 Apr 2000, hal at finney.org wrote: > > I wrote: > <snip log> > > The problem here and in the other example I gave is that I sent two > > InsertReplies for the same message. The first one causes the node I sent > > it to to reverse the direction of forwarding, because it thinks the next > > message it will receive will be the DataInsert message. Hence when I > > send the second InsertReply it forwards it directly back to me, I echo > > it back, and we get stuck in a loop. > > This is right. > > > I think we need to change the state when we send an InsertReply back, > > not to send any other messages back. Ideally we would also terminate any > > efforts we are making to search. (We seem to accept an InsertReply from > > a node we have given up on, so we may have gone on to search other nodes.) > > When I originally wrote the code to send back the InsertReply, I was careful > enough to add the extra "dataRef" address to the MessageMemory, so that after > sending back an InsertReply, the "origRec" address can be set to null, and no > further messages would be sent down the stream (and then they would not be > sent > back). But when I wrote the code that used the open connection to send > instead, > I wasn't this careful (or, rather, I was getting more concerned about the > sheer > number of elements in the MM - but considering an extra pointer is is like 4 > kB > of memory for 100 elements, maybe that was having the wrong priority). I > changed this now, so it uses a "dataCon" which is "replyCon" exactly what > "dataRef" is "origRec" (which I guess should be called replyRef - but it > predates me). Passing an InsertReply now sets origRec and replyCon to null, so > no more messages will be passed back after that now. > > You might be right that we should increase the statefulness of the > MessageMemory so that it knows what messages it is expecting the whole time > instead. However, some people are against increased statefulness at all.
I think I saw something similar whilst shutting down my node early this morning.A huge herd of QueryRestarted messages, each with the same ID, each spawning a new thread. Eventually, memory became a vary scarce resource. Unfortunately, I didn't save my logs. I was doing this in my sleep. David Schutt _______________________________________________ Freenet-dev mailing list Freenet-dev at lists.sourceforge.net http://lists.sourceforge.net/mailman/listinfo/freenet-dev
