Hi,
I've been trying to make a JVM-based app have better error recovery when
the Riak cluster is still in a starting-up state.
I have a fairly naive wait-loop that tries to connect and list buckets, and
if there's an exception, retry again after a short delay.

However once the Riak cluster comes good, the java client hangs on the
first operation it makes, for a really long time. Minutes.
 -- in particular, at
com.basho.riak.client.core.RiakCluster.retryOperation(RiakCluster.java:479)

I've tried shutting down and recreating the RiakClient between attempts,
but this doesn't seem to help.
I guess the node manager has its own back-offs and delays.. Is there a way
to reduce these timeouts?

Thanks,
Toby

"pool-4-thread-1" #102 prio=5 os_prio=0 tid=0x00007f813478e000 nid=0x5517
waiting on condition [0x0
0007f8110e2d000]
  java.lang.Thread.State: WAITING (parking)
       at sun.misc.Unsafe.park(Native Method)
       - parking to wait for  <0x000000076d707b38> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
       at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
       at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)

       at
java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
       at
com.basho.riak.client.core.RiakCluster.retryOperation(RiakCluster.java:479)
       at
com.basho.riak.client.core.RiakCluster.access$1000(RiakCluster.java:44)
       at
com.basho.riak.client.core.RiakCluster$RetryTask.run(RiakCluster.java:580)
       at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
       at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)

       at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)

       at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

       at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

       at java.lang.Thread.run(Thread.java:748)
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to