简体   繁体   English

数据存储查询的到期速度有多快?

[英]How fast data store query expires?

How fast data store query expires ? 数据存储查询的到期速度有多快? I googled but didn't find number in documentation. 我用谷歌搜索,但没有在文档中找到数字。

Code throws: 代码抛出:

com.google.appengine.api.datastore.DatastoreFailureException: query has expired or is invalid. Please restart it with the last cursor to read more results.

It's 30 seconds. 这是30秒。

Semi-official answer was given by Google employee in their bugtracking system here . 半官方的回答是由谷歌员工在他们的bug追踪系统给出这里

A query cursor can last hours. 查询游标可以持续数小时。 If you're getting this error consistently in a short amount of time after performing the query for the first time, it may mean your cursor string is incorrect, or you are using the cursor with an incorrect query. 如果您在第一次执行查询后在短时间内始终获得此错误,则可能意味着您的游标字符串不正确,或者您使用的游标查询不正确。 (The query must be identical to the one used to generate the cursor.) (查询必须与用于生成游标的查询相同。)

If you change the configuration of a composite index that powers a query, all existing cursors are invalidated. 如果更改为查询提供动力的组合索引的配置,则所有现有游标都将失效。 The docs suggest that a change to the underlying implementation (by the App Engine team) can also invalidate cursors. 文档表明,对底层实现的更改(由App Engine团队进行)也可能使游标无效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM