简体   繁体   中英

Is there any limit for the local datastore running Google App Engine Python?

I have a simple model:

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

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)

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?

Thanks.

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

App Engine Datastore - devserver limits

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

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM