Open bserdar opened 8 years ago
I agree and I think I know how to implement it, after dealing with initial confusion. How about max(2s,
We can also try to interrupt the tread after timeout using https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Future.html#cancel(boolean).
When both LB and oracle calls are started at the same time, applying a 2sec timeout to LB calls is not fair when oracle call takes longer to complete. Instead, the 2 sec timeout should start after oracle call returns. I think if we issue LB call on a separate thread, then issue the oracle call, and when oracle call returns wait for 2 secs before logging a slow call, this can be done.