Cloud Firestore in datastore mode conversion questions

余生长醉 提交于 2020-01-06 04:14:25

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/52773542/cloud-firestore-in-datastore-mode-conversion-questions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!