RE: [Memcacheddotnet-devel] Re: memcache patch
Status: Beta
Brought to you by:
timiscool999
From: Tim G. <ti...@ge...> - 2006-01-18 16:31:42
|
Overriding the GetHashCode method was a holdover from when I ported the library from the Java version. I think you may be right and we don't need it so I removed it. I will redeploy the download today with three new items: -Enabled log4net to work in the MemCachedBench program (or any other program interested in logging memcacheddotnet). -Removed the GetHashCode method from the SockIO class. -Fixed a bug closing down the connection pool that would occur because I was removing items from a hashtable being iterated over. -Tim _____ From: mem...@li... [mailto:mem...@li...] On Behalf Of Maxim Mass Sent: Wednesday, January 18, 2006 1:05 AM To: ti...@ge... Cc: mem...@li... Subject: [Memcacheddotnet-devel] Re: memcache patch After a bit more digging this seems to be happening because the socket is not removed from the availPool. The reason it's not removed is because the objects hash code changes as a result of the TrueClose method. The GetHashCode method is overriden in SockIO and changes based on the private Socket variable. Once the socket is closed, gethashcode returns 0. Was there a reason for overriding the default gethashcode method? It appears to be working fine without it. Max On 1/17/06, Maxim Mass < mm...@um...> wrote: There appears to be another bug in that maintenance thread. It's still not closing connections but this time due to a different exception. This line: DateTime expire = (DateTime) sockets[ socket ]; throws a null ref exception since that socket doesn't exist in the hash. socket comes from a foreach loop that iterates over all the keys... So looking at this for about 10 mins now seems like there are a couple issues.. For some reason, it's iterating over keys (sockets) that have been already removed. Or it's not removing and closing correctly. I'm going to look at this further but let me know if you come up with a fix for it Max On 1/17/06, Tim Gebhardt <ti...@ge... <mailto:ti...@ge...> > wrote: The patch looks good. The timing stuff is a lot easier to read now. I redeployed the SourceForge.net download. -Tim _____ From: max...@gm... [mailto: <mailto:max...@gm...> max...@gm...] On Behalf Of Maxim Mass Sent: Monday, January 16, 2006 9:04 PM To: ti...@ge... Subject: memcache patch I fixed a few things in the SockIOPool.. Take a look and sanity check this please.. |