0
我们正在从数据存储中获取命名空间的列表,该数据存储的数量高达30k。Google Appengine数据存储超时异常
每天运行提取命名空间的cron。但有一天它工作正常,有一天它抛出数据存储超时异常。
com.google.appengine.api.datastore.DatastoreTimeoutException:所述数据存储 操作超时,或者数据是暂时 不可用。
相关代码:
DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
FetchOptions options = FetchOptions.Builder.withChunkSize(150);
Query q = new Query(Entities.NAMESPACE_METADATA_KIND);
for (Entity e : ds.prepare(q).asIterable(options)){
// A nonzero numeric id denotes the default namespace;
// see Namespace Queries, below
if (e.getKey().getId() != 0){
continue;
}else{
namespaces.add(e.getKey().getName());
}
}
可能是什么问题?