英文:
Datastore read policy setting in Go
问题
在Google App Engine中,我正在尝试使用Go设置Datastore的读取策略。
Python可以使用read_policy = db.EVENTUAL_CONSISTENCY
来实现,但是似乎没有Go的等效方法。你可以看到Go文档中缺少了这一部分。
https://developers.google.com/appengine/docs/python/datastore/queries#Python_Data_consistency
https://developers.google.com/appengine/docs/go/datastore/queries#Go_Data_consistency
有人可以帮忙吗?
英文:
In Google App Engine I'm trying to set the Datastore read policy using Go.
Python has this ability using read_policy = db.EVENTUAL_CONSISTENCY
but there seems to be no Go equivalent. You can see that this section is missing from the Go documentation.
https://developers.google.com/appengine/docs/python/datastore/queries#Python_Data_consistency
https://developers.google.com/appengine/docs/go/datastore/queries#Go_Data_consistency
Can anyone help?
答案1
得分: 1
这个功能现在已经添加了。
https://developers.google.com/appengine/docs/go/datastore/reference#Query.EventualConsistency
英文:
This functionality has now been added.
https://developers.google.com/appengine/docs/go/datastore/reference#Query.EventualConsistency
答案2
得分: 0
是的,目前似乎没有办法为祖先查询指定“最终一致性”(其他类型的查询始终是强一致性或最终一致性)。
您可以在https://code.google.com/p/googleappengine/issues/entry?template=Feature%20request上创建一个新问题。
如果您创建了一个问题,请在这里发布ID,以便其他人可以给它加星。
英文:
Yeah, it seems there's currently no way to specify eventual consistency for ancestor queries (other kinds of queries are always either strong or eventually consistent).
You could create a new issue on https://code.google.com/p/googleappengine/issues/entry?template=Feature%20request
If you do create one, please post here the ID so that others can star it.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论