Increased timeout on `getOrSet` lock

Description

The default lock timeout for `getOrSet` is a static 10. We need to find a way to make this dynamic.

A `timeout` argument is already available in the method signature. Suggest using that value and add a bit of extra time for the additional get() call within the request.

Activity

Show:
Brad Wood
April 3, 2019, 10:27 PM

Good idea. In this case, the timeout needs to take as long as it might take for another thread to fully produce the item being cached. if there was something being cached that took 15 seconds to generate, it would cause timeouts on all the other threads waiting for the generation of the data.

Luis Majano
April 4, 2019, 1:36 PM

I am thinking that maybe this timeout should be around 45 seconds or so. In reality, if it goes beyond it then you can’t really produce the item and it should throw the exception. I am not sure anymore of making this dynamic, because in reality it should just be high enough to produce a result.

Assignee

Luis Majano

Reporter

Jon Clausen

Labels

None

Fix versions

Priority

Major
Configure