Thanks for the suggestion, Ryan. I checked my code, and all my JDO calls go
through one function that has all the boilerplate. The last three four
lines of that function are,
} finally {
pm.close();
}
}
so we can safely assume that the persistence manger always gets closed.
But let me emphasize again, my original post on this was outright wrong:
it's *not *ancestor queries that are giving me the problem, it is
specifically the JDO function GetObjectById. That begs the question, of
course, if GetObjectById is even *supposed* to give strong consistency.
Re-reading the documentation very carefully, I found that the chapter on
the low-level datastore access states that getting entities by id via get()
gives strong consistency. But the chapter on JDO does *not* make a similar
statement about GetObjectById! On the other hand, when you set the option
"Unapplied job percentage" to 100% in the development environment, the
function GetObjectById will still act strongly consistent. So perhaps that
is the only problem here, that the SDK erroneously treats GetObjectById as
strongly consistent, when really it is not.
Thomas
On Wed, Aug 5, 2015 at 1:23 PM, Ryan (Cloud Platform Support) <
[email protected]> wrote:
> Check out this link
> <https://cloud.google.com/appengine/docs/java/datastore/jdo/creatinggettinganddeletingdata#Updating_an_Object>
> specifically:
>
> "Changes are persisted when the PersistenceManager is closed"
>
>
> I ran some test to confirm and not closing resulted in eventual while
> closing resulted in strong consistency. Give it a try and let me know if
> that helps.
>
> On Saturday, August 1, 2015 at 6:24:55 PM UTC-4, Thomas Becker wrote:
>>
>> I am using the app engine datastore with Java JDO. According to the
>> documentation, ancestor queries are always strongly consistent. Recently,
>> however, I've been seeing a lot of stale data from ancestor queries. It
>> seems to happen randomly. A query may return the most recent data, and a
>> moment later, the same query returns stale data.
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Google App Engine" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-appengine/1re1FtqllnQ/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/google-appengine.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-appengine/96de2818-896a-4877-aaa0-d496cc81dc06%40googlegroups.com
> <https://groups.google.com/d/msgid/google-appengine/96de2818-896a-4877-aaa0-d496cc81dc06%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/CAPxj-GBL-NZU0c8Bo2zLtaEUryAWVXfmUVeEk%3DNicecR9kAx_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.