App engine bulk loader download warning “No descending index on __key__, performing serial download”

僤鯓⒐⒋嵵緔 提交于 2019-12-01 06:47:30

As the error describes, without a descending index on __key__ for the model you're downloading, the bulkloader has to download serially. If you add the index as described, it will be able to download in parallel. If you don't, it will work fine, but will be slower to download, as it operates serially.

Note that an additional index has only a small impact on latency, as index rows are written in parallel to the entity write, meaning the write only takes as long as the slowest update.

I've solved this problem by add this code to index.yaml

kind: books
- properties:
  name: __key__
    - direction: desc
kind: books
- properties:
  name: another_indexes_here

If your using JAVA and the datastore-indexes.xml file.

Add this (Assuming the name of the kind is "Books") to the datastore-indexes.xml file:

<datastore-index kind="Books" ancestor="false" source="auto"> 
    <property name="__key__" direction="desc"/> 
</datastore-index>

Then redeploy your app. Ensure you check the datastore index tab to see that the __key__ is serving. Then you can try your download again.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!