I use JDO and I update an Entity like this:
pm.currentTransaction().begin();
Contact c = (Contact) pm.getObjectById(Contact.class,
encodedKey);
//JDOHelper.makeDirty(c, "groups");//Make a field
dirty --
Comment 1
c.setGroups(groupsNew);
pm.makePersistent(c);
pm.currentTransaction().commit();
// Contact c1 = (Contact)
pm.getObjectById(Contact.class, encodedKey); -- Comment 2: This is
making the read consistent
then I use Request Factory to read this Entity. 50% of the times I get
the Old value and not the New one.
I know that is due to the High Replication Datastore (HRD). How can I
force the read always to be consistent?
One way I managed to do it is by adding an extra read of the entity
right after its update. I do not like this approach. Why exactly is
this happening?
I also noticed that the makeDirty approach does not resolve the issue
(see Comment 1).
I believe that forcing all the entities in the same entity group will
not be a good solution for my context either
(as it is described here
https://developers.google.com/appengine/docs/java/datastore/structuring_for_strong_consistency).
I have User Accounts one User Account might have up to 30.000
contacts. A typical query would be fetch a range of 100 contacts for a
specific User Account.
Entity Group will move parsing from Datastore to my application (since
I have no join facility in datastore). Is this correct?
I would much appreciate some input from an HRD guru or anyone who has/
d a similar issue.
Thanks
Savilak
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.