mumoshu / play2-memcached

A memcached plugin for Play 2.x
Other
161 stars 66 forks source link

Fix frozen future in 2.6 API #56

Closed halfninja closed 6 years ago

halfninja commented 6 years ago

result.get can throw an exception in various situations, like if a class definition has changed, and in this case the Promise or the resulting Future was never being completed, causing frozen requests for us when fetching old definitions from cache.

Only affects 2.6 as older code uses future.get which is wrapped in a try/catch.

hayd commented 6 years ago

We are also seeing this, it's pretty nasty. To confirm, with this fix, will getOrElseUpdate clear the bad data?

halfninja commented 6 years ago

It doesn't currently clear any data automatically but will at least reject the Future properly so that you could recover and do whatever.

mkurz commented 6 years ago

@mumoshu Can you have a look and merge?

mumoshu commented 6 years ago

@halfninja Good catch, and awesome work! Thanks for your contribution 👍