Re: [objectify-appengine] How will traditional Datastore auto-upgrading to Firestore in Datastore affect users of objectify 5?

133 views
Skip to first unread message

Jeff Schnitzer

unread,
Dec 28, 2020, 12:43:29 PM12/28/20
to objectify-appengine
Objectify tries to be as obvious as possible to that kind of thing. Transaction rules are enforced by the lower-level google code that objectify is built on top of, so if they drop some restrictions, it should just work. That said, nothing beats trying it.

The only thing that looks like a potential breaking change is the switch from optimistic to pessimistic concurrency. It won't hurt Objectify; the code that handles transaction retries on ConcurrentModificationException will simply never execute. But depending how you have written your transactions, you could conceivably see deadlocks. It's just one of the inherent risks of pessimistic locking.

Jeff

On Sun, Dec 27, 2020 at 3:09 PM Drake-2 <roman...@gmail.com> wrote:
How will traditional Datastore auto-upgrading to Firestore in Datastore affect users of objectify 5? Will there be any changes we will need to make in our code to take advantage of the features Firestore in Datastore offers?

For example, one such feature is "Queries in transactions are no longer required to be ancestor queries." - Does this mean we will no longer get an error if trying to run a non-ancestor query inside a transaction with objectify?

Or will we need to upgrade our objectify version and maybe change some code around?

--
You received this message because you are subscribed to the Google Groups "objectify-appengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to objectify-appen...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/objectify-appengine/e954882c-2fea-435c-94f2-a4223ddf9a6an%40googlegroups.com.

Drake-2

unread,
Dec 31, 2020, 2:12:06 AM12/31/20
to objectify-appengine
I tried it. I made a new project and even though it says my datastore is "Cloud Firestore in Datastore mode" in the google console I still get "Only ancestor queries are allowed inside transactions." error. I also noticed that non-ancestor queries are not strongly consistent. I am using objectify-5. Any idea why this may be?

Jeff Schnitzer

unread,
Dec 31, 2020, 1:42:08 PM12/31/20
to objectify-appengine
Absolutely no idea :-(

Whatever is going on, it's somewhere in Google's part of the stack underneath Objectify. Try doing your experiments with the low-level API (com.google.appengine.datastore.*).

Jeff

Andreas Be

unread,
Mar 12, 2021, 2:03:39 AM3/12/21
to objectify-appengine
We are currently migration to a new project, it says  Cloud Firestore in Datastore mode on the entitites view, so it looks like new datastores are created in the new format.

We wrote some demo code, it still says: 

Objectify Concurrent Modification Exception.png

No sign of an absent of eventual consistency, it still throws Optimistic Concurrency Exception
An you see Firestore in the exception message.

--> So to us it looks like behavior is unchanged?

@Jeff 
Am I right?
Reply all
Reply to author
Forward
0 new messages