hector-client / hector

a high level client for cassandra
http://prettyprint.me/2010/02/23/hector-a-java-cassandra-client/
MIT License
644 stars 299 forks source link

DynamicLoadBalancingPolicy: LatencyAwareHClientPool may throw NoSuchElementException under certain circumstances #650

Open jsbret opened 10 years ago

jsbret commented 10 years ago

In version 1.1-4, the call to "latencies.remove()" (LatencyAwareHClientPool line 48) may throw a NoSuchElementException if the "resetThread" (See DynamicLoadBalancingPolicy instantiation line 62-74) clear the "latencies" LinkedBlockingDeque just before.

Using the poll() method instead of remove() should fix the issue.

How can i submit a patch ?

Thanks

canadianveggie commented 10 years ago

Looks like it's been fixed. https://github.com/hector-client/hector/commit/07f271c555a243a551af53e0392295058cc9d627 Any chance this will be ported into a 1.1 release? Or is support for Cassandra 1.1 essentially deprecated?