1

我的数据库似乎被搞砸了。约束失败,相应的索引被标记为“FAILED”(见下文)。

我认为删除/重新创建约束或索引会重建它,但是没有 - 当我尝试创建时,我被告知它已经存在,而当我删除时,我被告知它不存在。

关于如何(a)避免陷入这种情况以及(b)如何摆脱这种情况的任何想法?

Neo 的任何人都希望我的数据库查看(它不是很大 - 可能是 50MB)?

neo4j-sh (?)$ schema
Indexes
  ON :Interest(uvid) FAILED (for uniqueness constraint) 
  ON :Interest(uiid) ONLINE (for uniqueness constraint) 
  ON :Offer(uoid)    ONLINE (for uniqueness constraint) 
  ON :Product(upid)  ONLINE (for uniqueness constraint) 
  ON :User(uuid)     ONLINE (for uniqueness constraint) 

Constraints
  ON (user:User) ASSERT user.uuid IS UNIQUE
  ON (product:Product) ASSERT product.upid IS UNIQUE
  ON (interest:Interest) ASSERT interest.uiid IS UNIQUE
  ON (offer:Offer) ASSERT offer.uoid IS UNIQUE

neo4j-sh (?)$ create constraint on (i:Interest) assert i.uvid is unique;
CypherExecutionException: Already constrained CONSTRAINT ON ( interest:Interest ) ASSERT interest.uvid IS UNIQUE.
neo4j-sh (?)$ drop constraint on (i:Interest) assert i.uvid is unique;  
CypherExecutionException: Unable to drop CONSTRAINT ON ( interest:Interest ) ASSERT interest.uvid IS UNIQUE:
No such constraint CONSTRAINT ON ( interest:Interest ) ASSERT interest.uvid IS UNIQUE.

neo4j-sh (?)$ drop index on :Interest(uvid);
CypherExecutionException: Unable to drop index on :Interest(uvid): Index belongs to constraint: :Interest(uvid)
neo4j-sh (?)$ create index on :Interest(uvid);
CypherExecutionException: Already constrained CONSTRAINT ON ( interest:Interest ) ASSERT interest.uvid IS UNIQUE.
4

3 回答 3

0

感谢您报告此事。这是一个我们希望尽快解决的错误。目前您无法使用公共 API 修复它。抱歉给您添麻烦了,这绝对在我们的待办事项清单上。

斯特凡

于 2013-11-16T17:27:29.373 回答
0

发布为https://github.com/neo4j/neo4j/issues/1492,以及创建错误数据库的方法。

后续里程碑或发布的任何时间表?

于 2013-11-18T09:44:58.090 回答
0

这听起来确实像一个错误。您能否在http://www.github.com/neo4j/neo4j上为此提出问题?

于 2013-11-14T21:33:20.400 回答