impactrudia / objectify-appengine

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

result of ofy().cache(true).consistency(STRONG).load().key(k).now() is inconsistent #210

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I noticed that entities were not always consistently retrieved.  Fields that 
were set yesterday sometimes were retrieved empty and sometimes have the 
correct values in them.  I just retrieved one particular entity 8 times -- half 
the time it had the new value, half the time it did not.

I then tried: ofy().cache(false).consistency(STRONG).load().key(k).now()
8 times in succession and it retrieved the correct values every time.

I then tried: ofy().cache(true).load().key(k).now() 8 times in succession -- it 
retrieved the correct values every time.

The values are properly filled in when I look at the object in the GAE 
datastore viewer.  The implementation is an applet with virtually all code 
server-side (i.e., no logic other than user-interaction resident on the client).

I am using the following:
  1) GAE SDK 1.9.6
  2) Objectify 5.0.2
  3) Running using Java JDK 1.7.0_55

I am beginning to wonder if there is a problem in the GAE datastore itself.  
The problem does not seem to occur in the GAE development server (but it's hard 
to tell because of the small dataset size that one can readily use in the 
development server).

Although I believe I have found the problem and resolved it by removing call to 
".consistency(STRONG)", it should probably be resolved in Objectify so that 
some other newbie (like I am) doesn't inadvertently trigger the problem.

Thanks,
Tony

Original issue reported on code.google.com by tony.m.c...@tmcarter-engg.com on 19 Jun 2014 at 2:14

GoogleCodeExporter commented 9 years ago
Are you sure you have the ObjectifyFilter installed?

Original comment by lhori...@gmail.com on 19 Jun 2014 at 4:43

GoogleCodeExporter commented 9 years ago
I wasn't aware of the existence of ObjectifyFilter ... -- so I'm sure it
isn't installed.

*Tony M. Carter, Ph.D*., President and Chief Engineer
tmCarter Engineering, Inc.
6188 Newhaven Drive ۰ Salt Lake City, UT ۰ 84121-6527
Cell: 801-824-1290 ۰ Fax: 801-278-4628 ۰ E-Mail:
tony.m.carter@tmcarter-engg.com

On Thu, Jun 19, 2014 at 10:43 AM, <objectify-appengine@googlecode.com>
wrote:

Original comment by tony.m.c...@tmcarter-engg.com on 19 Jun 2014 at 6:19

GoogleCodeExporter commented 9 years ago
Prominent in the Setup docs :-)

https://code.google.com/p/objectify-appengine/wiki/Setup

Original comment by lhori...@gmail.com on 19 Jun 2014 at 6:51

GoogleCodeExporter commented 9 years ago
OK -- idiot oversight on my part.  I started back with Objectify 3 and didn't 
read the Objectify 4 and 5 setup instructions.

Original comment by tony.m.c...@tmcarter-engg.com on 19 Jun 2014 at 6:57