google app engine

I serialize objects to blobstore in my app, and delete and recreate them whenever they change. I know this is not the best way, but I found that is good way for rapid prototyping.

Now I am in the phase to use datastore, however I have a problem. My datastore quota is full! :) I did alot of search for the issue, yet here I am.

Appearantly for every blob, __BlobInfo__ , and __BlobFileIndex__ kinds keep info about the blob. My problem is when I delete blob, info in __BlobInfo__ is deleted, but not the one in the __BlobFileIndex__

I desperately tried appcfg vacum_indexes, but that did not help as expected.

I use Java platform by the way.

Here are my questions

  • How can I clear unused __BlobFileIndex__ entries?
  • What is the proper way to handle this situation to not occur again?
  • Thank you.

    Edit: Woohooo! I now see that I cant delete these unwanted indexes a) Datastore admin does not list them b) Manual deletion code throws Exception(java.lang.IllegalArgumentException: illegal key.path.element.type: BlobFileIndex ) Since entities starting with double underscore are app engine reserved entities, it doesnt allow me delete it. Guys at google, I AM STUCK HERE :)


    You can star this issue to get notified as soon as there's a solution to this...
    http://code.google.com/p/googleappengine/issues/detail?id=6849


    I had this problem, but found a solution:

    For anyone trying to delete the BlobFileIndex programatically you can do it thus:

    query = datastore.Query("__BlobFileIndex__",{'blob_key': a_blob_key}, keys_only=True)
        key = query.Get(1)
        key_y = key[0]
        datastore.Delete(key_y)
    
    链接地址: http://www.djcxy.com/p/11560.html

    上一篇: 按SQL升序中的数值排序

    下一篇: Google应用引擎