At Google Cloud Next '18, we announced that all Cloud Datastore users will be automatically upgraded to Cloud Firestore in Datastore mode once Cloud Firestore becomes generally available.
The upgrade to the Cloud Firestore storage engine brings the following benefits:
- Entity groups are no longer restricted to 1 transaction/second
- Transactions are no longer limited to 25 entity-groups
- All queries, not just ancestor queries, are strongly consistent
With the removal of the 1 transaction/second restriction, however, the entity group is no longer a unit of consistency.
When you request an entity group version, Cloud Firestore returns a monotonically increasing number. This number is guaranteed to increase on new writes to the entity group, but it also increases independently of user updates to the entity group. In Cloud Datastore, the entity group version changed only on writes to the entity group.
This new behavior might affect functionality that depends on the current behavior. For example, this would affect application logic like caching that depends on the entity group version updating only on new writes.
As a workaround, you can maintain the current behavior by keeping track of the entity group version manually. Whenever a change is made to entities in a group whose version needs to be tracked, increment a property of a specially designated entity.