google-code-export / objectify-appengine

Automatically exported from code.google.com/p/objectify-appengine
MIT License
1 stars 0 forks source link

objectify methods should never fail in case of MemcacheServiceException #139

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. introduce an environment where every memcache operation fail
2. call objectify.get()

What is the expected output? What do you see instead?
I expect to return the entity from the datastore without caching and ignore the 
memcache errors. 
Instead I get a MemcacheServiceException.

What version of the product are you using? On what operating system?
objectify 3.1, app engine sdk 1.7.1, deployed application to the app engine

Please provide any additional information below.
The problem is in:
com.googlecode.objectify.cache.EntityMemcache 
public Map<Key, Bucket> getAll(Iterable<Key> keys)
at line 230 here the memcache.putAll() is not wrapped in a try catch block so 
when it fails the whole method fails

at line 213 and 233 the memcache.getIdentifiables() are correctly wrapped into 
a try catch

Original issue reported on code.google.com by tamas.to...@doctusoft.com on 24 Oct 2012 at 3:41

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This is very problematic bug, currently is happening a lot even with Appengine 
SDK 1.9.0, because Google has some Memcache problems.

Original comment by d...@black.si on 12 Mar 2014 at 10:48

GoogleCodeExporter commented 9 years ago
I can confirm this with objectify 3.1 and GAE 1.9.0. Also it seems the source 
of v4 contains the same problem.

Original comment by pe...@iddiction.com on 12 Mar 2014 at 10:49

GoogleCodeExporter commented 9 years ago
Objectify uses the memcache service's LogAndContinueErrorHandler. This means 
memcache should not produce exceptions. If you are seeing an exception thrown 
out of the memcache layer, please include a stacktrace.

Original comment by lhori...@gmail.com on 12 Mar 2014 at 6:25

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Sorry I was mistaken. I didn't realize the LogAndContinueErrorHandler is the 
default and you don't have to set it.

Original comment by tamas.to...@doctusoft.com on 12 Mar 2014 at 7:08

GoogleCodeExporter commented 9 years ago
I'm going to close this as Fixed. You should not get an exception in 4.0

Original comment by lhori...@gmail.com on 12 Mar 2014 at 7:21