为什么我的查询和批处理并行执行?

时间:2016-08-05 18:35:59

标签: google-app-engine objectify google-cloud-datastore google-cloud-trace

根据Objectify和Google Cloud Datastore的文档,我希望以下代码中的查询和批处理加载能够并行执行:

List<Iterable<Key<MyType>>> results = new ArrayList<>();
for (...) {
  results.add(ofy().load()
      .type(MyType.class)
      .filter(...)
      .keys()
      .iterable());
}
...
Iterable<MyType> keys = ...;
Collection<MyType> c = ofy().load().keys(keys).values();

但是跟踪使得它看起来像每个查询和每个实体加载按顺序执行:

Trace

是什么给出了?

0 个答案:

没有答案