Appengine数据存储已损坏,如何重置?

huangapple go评论87阅读模式
英文:

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(&quot;ContentId !=&quot;, 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 &quot;/Users/me/go_appengine/google/appengine/api/yaml_listener.py&quot;, line 177, in _HandleEvents
raise yaml_errors.EventError(e, event_object)
EventError: could not determine a constructor for the tag &#39;!ContentId&#39;
  in &quot;&lt;string&gt;&quot;, line 15, column 11:
      - name: !ContentId
              ^
  in &quot;&lt;string&gt;&quot;, 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.

huangapple
  • 本文由 发表于 2014年1月6日 07:23:29
  • 转载请务必保留本文链接:https://go.coder-hub.com/20940537.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定