Hi Team,
We are using Hazelcast distributed object i.e. IMap for locking mechanism via IMap.trylock() API. we have to obtain and release a lock for each rest call. we observed a significant impact on our rest calls. On thread dump analysis we see that most of time is being spent on LockSupport.park() as mentioned in below different threads
"qtp1073885358-4211" - Thread t@4211
java.lang.Thread.State: WAITING
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:304)
at com.hazelcast.spi.impl.AbstractInvocationFuture.get(AbstractInvocationFuture.java:161)
at com.hazelcast.concurrent.lock.LockProxySupport.tryLock(LockProxySupport.java:138)
at com.hazelcast.map.impl.proxy.MapProxyImpl.tryLock(MapProxyImpl.java:483)
java.lang.Thread.State: WAITING
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:304)
at com.hazelcast.internal.util.concurrent.MPSCQueue.takeAll(MPSCQueue.java:231)
at com.hazelcast.internal.util.concurrent.MPSCQueue.take(MPSCQueue.java:153)
at com.hazelcast.spi.impl.operationservice.impl.InboundResponseHandlerSupplier$ResponseThread.doRun(InboundResponseHandlerSupplier.java:283)
at com.hazelcast.spi.impl.operationservice.impl.InboundResponseHandlerSupplier$ResponseThread.run(InboundResponseHandlerSupplier.java:272)
java.lang.Thread.State: WAITING
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:304)
at com.hazelcast.internal.util.concurrent.MPSCQueue.takeAll(MPSCQueue.java:231)
at com.hazelcast.internal.util.concurrent.MPSCQueue.take(MPSCQueue.java:153)
at com.hazelcast.spi.impl.operationexecutor.impl.OperationQueueImpl.take(OperationQueueImpl.java:85)
at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.run(OperationThread.java:105)
These calls are consuming a lot of time.
When this issue will be fixed? what can be done to improve the performance.
Thanks,
Shivi Garg