roc230 / spymemcached

Automatically exported from code.google.com/p/spymemcached
0 stars 0 forks source link

Incorrect data structure used in handleInputQueue() #233

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version of the product are you using? On what operating system?
2.7.0

Tell me more...

Collection<MemcachedNode> todo=new HashSet<MemcachedNode>();

Should be:

Collection<MemcachedNode> todo=new LinkedList<MemcachedNode>();

The reason is that you are pulling all the addedQueue into this data structure, 
and then only iterating over it. If you have a large addedQueue, your data 
structure resizes improperly.

Original issue reported on code.google.com by smye...@gmail.com on 5 Feb 2012 at 7:26

GoogleCodeExporter commented 9 years ago
I spoke too soon, as I realized that your addedQueue does not contain 
operations, it contains nodes. You rely on the Set behavior to find dupes. The 
proper data structure was used.

Unfortunately i can't figure out how to cancel tickets.

Original comment by smye...@gmail.com on 5 Feb 2012 at 7:29

GoogleCodeExporter commented 9 years ago
Thanks for raising what you thought was an issue.  Closed as invalid.

Original comment by ingen...@gmail.com on 5 Feb 2012 at 7:43