-
Notifications
You must be signed in to change notification settings - Fork 51
Allows non ancestor queries inside a transaction #366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
the Firestore in Datastore mode allows to perform queries without an ancestor inside a transaction
…ction the new Firestore in Datastore mode allows not ancestor queries in transaction so the local datastore is changed to accept this behaviour
Anyway we can add a test via the local appengine datastore dev emulator? |
I also changed the emulator. The change was pretty trivial. There was a point where the code assumed there was an ancestor in a transaction context, trusting the checks done in the library, so I changed that check to separate the transaction logic and the ancestor logic. The emulator implementation remained the same. |
Maybe I am way off here...but doesn't this change enforce the |
As far as I know all the datastore instsances were automatically migrated to the new Firestore in Datastore mode. |
Thanks, just so that I have all the context, where "I also changed the emulator...." did you do the change? |
I'm talking about the local dev server contained in this project. One of the three files I've changed in this PR i about the local dev server. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approval, but still need to wait for extra internal tests done inside Google code base.
We have more internal tests still using TRANSACTION_REQUIRES_ANCESTOR that are now failing, so we also need to propagate this change internally, |
Hello,
As stated here, the new Firestore in Datastore mode allows executing non-ancestor queries inside a transaction. The library enforces the previous behaviour, so these changes allow leveraging the new feature using the legacy bundle.
This could be useful for many people still using the legacy bundle.