{"action":"created","issue":{"url":"https://api.github.com/repos/objectify/objectify/issues/224","labels_url":"https://api.github.com/repos/objectify/objectify/issues/224/labels{/name}","comments_url":"https://api.github.com/repos/objectify/objectify/issues/224/comments","events_url":"https://api.github.com/repos/objectify/objectify/issues/224/events","html_url":"https://github.com/objectify/objectify/issues/224","id":67291146,"number":224,"title":"result of ofy().cache(true).consistency(STRONG).load().key(k).now() is inconsistent","user":{"login":"stickfigure","id":162508,"avatar_url":"https://avatars.githubusercontent.com/u/162508?v=3","gravatar_id":"","url":"https://api.github.com/users/stickfigure","html_url":"https://github.com/stickfigure","followers_url":"https://api.github.com/users/stickfigure/followers","following_url":"https://api.github.com/users/stickfigure/following{/other_user}","gists_url":"https://api.github.com/users/stickfigure/gists{/gist_id}","starred_url":"https://api.github.com/users/stickfigure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stickfigure/subscriptions","organizations_url":"https://api.github.com/users/stickfigure/orgs","repos_url":"https://api.github.com/users/stickfigure/repos","events_url":"https://api.github.com/users/stickfigure/events{/privacy}","received_events_url":"https://api.github.com/users/stickfigure/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/objectify/objectify/labels/invalid","name":"invalid","color":"e6e6e6"},{"url":"https://api.github.com/repos/objectify/objectify/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/objectify/objectify/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-09T06:30:40Z","updated_at":"2015-10-08T02:06:01Z","closed_at":"2015-10-08T02:06:01Z","body":"Original [issue 210](https://code.google.com/p/objectify-appengine/issues/detail?id=210) created by objectify on 2014-06-19T14:14:25.000Z:\n\nI 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.\r\n\r\nI then tried: ofy().cache(false).consistency(STRONG).load().key(k).now()\r\n8 times in succession and it retrieved the correct values every time.\r\n\r\nI then tried: ofy().cache(true).load().key(k).now() 8 times in succession -- it retrieved the correct values every time.\r\n\r\nThe 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).\r\n\r\nI am using the following:\r\n  1) GAE SDK 1.9.6\r\n  2) Objectify 5.0.2\r\n  3) Running using Java JDK 1.7.0_55\r\n\r\nI 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).\r\n\r\nAlthough I believe I have found the problem and resolved it by removing call to &quot;.consistency(STRONG)&quot;, it should probably be resolved in Objectify so that some other newbie (like I am) doesn't inadvertently trigger the problem.\r\n\r\nThanks,\r\nTony\r\n"},"comment":{"url":"https://api.github.com/repos/objectify/objectify/issues/comments/146393311","html_url":"https://github.com/objectify/objectify/issues/224#issuecomment-146393311","issue_url":"https://api.github.com/repos/objectify/objectify/issues/224","id":146393311,"user":{"login":"stickfigure","id":162508,"avatar_url":"https://avatars.githubusercontent.com/u/162508?v=3","gravatar_id":"","url":"https://api.github.com/users/stickfigure","html_url":"https://github.com/stickfigure","followers_url":"https://api.github.com/users/stickfigure/followers","following_url":"https://api.github.com/users/stickfigure/following{/other_user}","gists_url":"https://api.github.com/users/stickfigure/gists{/gist_id}","starred_url":"https://api.github.com/users/stickfigure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stickfigure/subscriptions","organizations_url":"https://api.github.com/users/stickfigure/orgs","repos_url":"https://api.github.com/users/stickfigure/repos","events_url":"https://api.github.com/users/stickfigure/events{/privacy}","received_events_url":"https://api.github.com/users/stickfigure/received_events","type":"User","site_admin":false},"created_at":"2015-10-08T02:06:01Z","updated_at":"2015-10-08T02:06:01Z","body":"You are all mistaken. Look your own code over or seek assistance in stackoverflow or the Google Group.\r\n\r\nThis is an invalid bug. The default for consistency() *is* STRONG; `ofy().consistency(Consistency.STRONG)` is a no-op.\r\n\r\n@juanjoitc Your problem is that you are comparing a filtered query (which is eventually consistent) with a get-by-key (which is strongly consistent by default). Apples and oranges.\r\n\r\n@CristianKrieger there's not enough information in your post to answer.\r\n\r\nPlease use the Google Group for support."}}