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());
}
}
可能是什麼問題?