运行Google App Engine Python的本地数据存储是否有限制? [英] Is there any limit for the local datastore running Google App Engine Python?

查看:58
本文介绍了运行Google App Engine Python的本地数据存储是否有限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的模型:

class MyEntry(db.Model):
    keyName = db.StringProperty()
    valuesList = db.StringListProperty()

,我想用文件中的该实体的大约7000个实例填充数据存储区.(我有一个从文件读取,创建实体并将其放入数据库的函数)

and I want to populate the datastore with about 7000 instances of this entity from a file. (I have a function that reads from the file, creates the entities and puts them to the db)

我正在使用SDK控制台中的Interactive Console进行导出(或更好的是实例化).但是,即使我尝试以400为批次导出实例,在创建1000个实例后,数据存储区也会停止接受新实例.我不认为这是超时问题,因为我有意小批量地做事(在一次尝试所有事情之后).

I'm using the Interactive Console from the SDK Console to do the exporting (or better, the instantiation). However, even when I try to export the instances in batches of 400, after 1000 instances are created the datastore stops accepting new instances. I don't think this is a timeout problem, because I am deliberately doing things in small batches (after I tried the whole things at once).

这是一个已知问题吗?我找不到任何记录此信息的信息.还有其他将数据导出到本地数据存储中的方法吗?

Is this a known problem? I wasn't able to find any info that documents this. Is there some other way to export data into the local datastore?

谢谢.

推荐答案

我能够在较早的帖子中找到答案:

I was able to find the answer in an older post:

App Engine数据存储区-devserver限制

很显然,几年前有一个1000的限制被取消,但是开发服务器仍然以某种方式拥有它.

Apparently, years ago there has been a 1000 limit, which was lifted, but the dev-server still has it somehow.

因此,我对数据存储进行了不同的测试(通过访问MyEntry的每个实例),结果发现所有实例都在那里,但是,开发服务器控制台仅显示1000个实例.

So, I tested the datastore differently (by accessing every instance of MyEntry) and it turns out that all instances are there, however, the development server console only shows 1000 instances.

实际上,MyEntry.all().count()也将返回1000.

In fact, MyEntry.all().count() will also return 1000.

这篇关于运行Google App Engine Python的本地数据存储是否有限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆