Cloud Firestore in datastore mode conversion quest

2019-07-29 13:35发布

The documentation says that in the near future exiting Datastore's will be converted to Cloud Firestore in Datastore mode. The added benefits are shown as:

Cloud Firestore in Datastore mode Cloud Firestore in Datastore mode uses Cloud Datastore system behavior but accesses Cloud Firestore's storage layer, removing the following Cloud Datastore limitations:

  • Eventual consistency, all Cloud Datastore queries become strongly consistent.

  • Transactions are no longer limited to 25 entity groups.

  • Writes to an entity group are no longer limited to 1 per second.

When this change happens, will one be able to continue to use the same code for datastore and then "magically" transactions will no longer have a limit and writes won't be limited to 1 second? Or will there be a SDK upgrade required to leverage those new upgrades?

Another question: What will the new limit be to writes to entity groups? Or will it just be unlimited thus eliminating things like shared counters?

2条回答
Deceive 欺骗
2楼-- · 2019-07-29 14:00

According to the documentation: yes.

Once Cloud Firestore reaches General Availability, GCP will begin notifying Datastore users about scheduling an update from Datastore to Cloud Firestore in Datastore mode. In theory, this update doesn't require down time.

Once the update is done, you won't require changing your code at all.

查看更多
冷血范
3楼-- · 2019-07-29 14:15

Another question: What will the new limit be to writes to entity groups? Or will it just be unlimited thus eliminating things like shared counters?

You still shouldn't write to a single document more than once per second. So, you'll still want to use sharded counters for a high write rate.

查看更多
登录 后发表回答