3
votes

On the announcement of Automatic Upgrade to Cloud Firestore for Google Datastore projects.

Benefits including:

  • Queries are no longer eventually consistent; instead, they are all strongly consistent.
  • Transactions are no longer limited to 25 entity groups.
  • Writes to an entity group are no longer limited to 1 per second.

In the current active app, some logic was implemented to ensure strong consistency using cross group Transaction operations, creation of ancestor queries & entity groups.

What will happen to all this app logic & DB data structure when it is automatically migrated to Firestore? Since data would be strongly consistent, it seems there will no longer be a need for entity groups & ancestor queries! ...Unless used inside a cross group transaction for atomic behavior across multiple entities

Any thoughts on that and what to expect? Also anyone knows when is the automatic migration expected to finish?

1

1 Answers

2
votes

My interpretation of the announcement in your context:

  • Your existing cross-group transactions don't touch more than 25 entity groups due to current limit. Dropping the 25 groups limit won't have any influence on them, they should continue to work as before
  • ancestor queries remain supported
  • structuring/grouping your data in entity groups remains supported, regardless of the reason behind it. Your particular split may have been driven by current limits - the migration may make that reason disappear, but that's about it.

So I'm almost certain your app will continue to function unaffected (except maybe in performance/response times?). The difference will be that you will have the option of dropping workarounds for the no longer applicable limitations and maybe further optimize your app.

In general I believe all existing applications will remain unaffected, otherwise Google wouldn't make the upgrades automatic - they would simply notify the app owners to make the necessary changes by a certain date, with a migration guide in place - like they did with other non-backwards-compatible changes.