英文:
Appengine datastore is corrupted, how to reset
问题
我正在使用Go + Google AppEngine,似乎导致我的数据存储出现了损坏。我运行了一个带有Filter("ContentId !=", val)
的查询,显然这不是一个支持的操作。而且,它损坏了我的数据库!当我访问localhost:8000/datastore时,我得到了一个以以下内容结尾的长堆栈跟踪:
File "/Users/me/go_appengine/google/appengine/api/yaml_listener.py", line 177, in _HandleEvents
raise yaml_errors.EventError(e, event_object)
EventError: could not determine a constructor for the tag '!ContentId'
in "<string>", line 15, column 11:
- name: !ContentId
^
in "<string>", line 15, column 11:
- name: !ContentId
看起来它创建了一个标记为!ContentId
的标签。
我的问题是,如何重置数据存储以删除这个损坏的dev_appserver.py --clear_datastore=yes myapp
,但这并没有解决问题。
英文:
I am using Go + Google AppEngine, and it seems like I have caused my datastore to become corrupted. I ran a query with Filter("ContentId !=", val)
, and apparently that is not a supported operation. Moreover, it corrupted my database! When I go to localhost:8000/datastore, I get a long stack trace that ends with:
File "/Users/me/go_appengine/google/appengine/api/yaml_listener.py", line 177, in _HandleEvents
raise yaml_errors.EventError(e, event_object)
EventError: could not determine a constructor for the tag '!ContentId'
in "<string>", line 15, column 11:
- name: !ContentId
^
in "<string>", line 15, column 11:
- name: !ContentId
It looks like it made a tag labeled !ContentId
.
My question is, how do I reset the datastore to remove this corrupted dev_appserver.py --clear_datastore=yes myapp
, but that does not fix it.
答案1
得分: 0
要删除标签,请在项目根目录下编辑您的 index.yaml
文件,然后重新部署它。
对于 golang,!=
不在支持的属性过滤器列表中。
如果您提供完整的查询和一些上下文,我们可能会提出一个很好的解决方法。
英文:
To remove the tag edit your index.yaml
file in your project root and deploy it again.
!=
is not in the list of supported property filters for golang.
If you'd provide your full query and some context we may come up with a good workaround.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论