No such index found. Label: `User` Property name: `id` at IndexHintException

93 views
Skip to first unread message

Gwendal Mousset

unread,
Apr 18, 2014, 12:46:41 PM4/18/14
to ne...@googlegroups.com
Hi all, 

I'm using Neo4j 2.0.1 with SDN 3.0.1. Neo4j works IN HA mode with 2 server instances.

My application was working normally for days and until a problem appears.
I work with neo4j for 6 month and it's the first time get this exception.
I restart the web app and the neo4j instances without success, the database seems "broken".

What can I do to repaire and fix this problem ?

The stack trace :

An unexpected error has occured: No such index found. Label: `User` Property name: `id` at IndexHintException org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.EntityProducerFactory$$anonfun$7$$anonfun$13.apply(EntityProducerFactory.scala:141) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.EntityProducerFactory$$anonfun$7$$anonfun$13.apply(EntityProducerFactory.scala:141) scala.Option.getOrElse(Option.scala:120) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.EntityProducerFactory$$anonfun$7.applyOrElse(EntityProducerFactory.scala:140) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.EntityProducerFactory$$anonfun$7.applyOrElse(EntityProducerFactory.scala:119) scala.PartialFunction$OrElse.apply(PartialFunction.scala:162) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.EntityProducerFactory$$anonfun$2.applyOrElse(EntityProducerFactory.scala:61) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.EntityProducerFactory$$anonfun$2.applyOrElse(EntityProducerFactory.scala:61) scala.PartialFunction$OrElse.apply(PartialFunction.scala:162) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.EntityProducerFactory$$anonfun$1.applyOrElse(EntityProducerFactory.scala:49) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.EntityProducerFactory$$anonfun$1.applyOrElse(EntityProducerFactory.scala:49) scala.PartialFunction$OrElse.apply(PartialFunction.scala:162) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.EntityProducerFactory$$anonfun$3.applyOrElse(EntityProducerFactory.scala:70) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.EntityProducerFactory$$anonfun$3.applyOrElse(EntityProducerFactory.scala:70) scala.PartialFunction$OrElse.apply(PartialFunction.scala:162) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.MergeStartPointBuilder$$anonfun$5.apply(MergeStartPointBuilder.scala:103) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.MergeStartPointBuilder$$anonfun$5.apply(MergeStartPointBuilder.scala:102) scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) scala.collection.immutable.List.foreach(List.scala:318) scala.collection.TraversableLike$class.map(TraversableLike.scala:244) scala.collection.AbstractTraversable.map(Traversable.scala:105) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.MergeStartPointBuilder.org$neo4j$cypher$internal$compiler$v2_0$executionplan$builders$MergeStartPointBuilder$$findNodeProducer(MergeStartPointBuilder.scala:102) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.MergeStartPointBuilder$$anonfun$org$neo4j$cypher$internal$compiler$v2_0$executionplan$builders$MergeStartPointBuilder$$solveUnsolvedMergePoints$1.apply(MergeStartPointBuilder.scala:58) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.MergeStartPointBuilder$$anonfun$org$neo4j$cypher$internal$compiler$v2_0$executionplan$builders$MergeStartPointBuilder$$solveUnsolvedMergePoints$1.apply(MergeStartPointBuilder.scala:56) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.QueryToken.map(QueryToken.scala:30) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.MergeStartPointBuilder$$anonfun$1.apply(MergeStartPointBuilder.scala:50) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.MergeStartPointBuilder$$anonfun$1.apply(MergeStartPointBuilder.scala:50) scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) scala.collection.immutable.List.foreach(List.scala:318) scala.collection.TraversableLike$class.map(TraversableLike.scala:244) scala.collection.AbstractTraversable.map(Traversable.scala:105) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.MergeStartPointBuilder.apply(MergeStartPointBuilder.scala:49) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.MergeStartPointBuilder.canWorkWith(MergeStartPointBuilder.scala:117) org.neo4j.cypher.internal.compiler.v2_0.executionplan.Phase$$anonfun$1.apply(Phase.scala:33) org.neo4j.cypher.internal.compiler.v2_0.executionplan.Phase$$anonfun$1.apply(Phase.scala:33) scala.collection.TraversableLike$$anonfun$filter$1.apply(TraversableLike.scala:264) scala.collection.immutable.List.foreach(List.scala:318) scala.collection.TraversableLike$class.filter(TraversableLike.scala:263) scala.collection.AbstractTraversable.filter(Traversable.scala:105) org.neo4j.cypher.internal.compiler.v2_0.executionplan.Phase$class.apply(Phase.scala:33) org.neo4j.cypher.internal.compiler.v2_0.executionplan.ExecutionPlanBuilder$$anon$1.apply(ExecutionPlanBuilder.scala:192) org.neo4j.cypher.internal.compiler.v2_0.executionplan.Phase$$anon$1.apply(Phase.scala:53) org.neo4j.cypher.internal.compiler.v2_0.executionplan.Phase$$anon$1.apply(Phase.scala:53) org.neo4j.cypher.internal.compiler.v2_0.executionplan.Phase$$anon$1.apply(Phase.scala:53) org.neo4j.cypher.internal.compiler.v2_0.executionplan.Phase$$anon$1.apply(Phase.scala:53) org.neo4j.cypher.internal.compiler.v2_0.executionplan.ExecutionPlanBuilder.buildQuery(ExecutionPlanBuilder.scala:82) org.neo4j.cypher.internal.compiler.v2_0.executionplan.ExecutionPlanBuilder.buildPipes(ExecutionPlanBuilder.scala:56) org.neo4j.cypher.internal.compiler.v2_0.executionplan.ExecutionPlanBuilder.build(ExecutionPlanBuilder.scala:40) org.neo4j.cypher.internal.compiler.v2_0.CypherCompiler.prepare(CypherCompiler.scala:45) org.neo4j.cypher.internal.CypherCompiler$VersionProxy.prepare(CypherCompiler.scala:64) org.neo4j.cypher.ExecutionEngine$$anonfun$3.apply(ExecutionEngine.scala:83) org.neo4j.cypher.ExecutionEngine$$anonfun$3.apply(ExecutionEngine.scala:81) org.neo4j.cypher.internal.LRUCache.getOrElseUpdate(LRUCache.scala:34) org.neo4j.cypher.ExecutionEngine.prepare(ExecutionEngine.scala:81) org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:60) org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:65) org.neo4j.cypher.javacompat.ExecutionEngine.execute(ExecutionEngine.java:78) org.neo4j.server.rest.web.CypherService.cypher(CypherService.java:100) java.lang.reflect.Method.invoke(Method.java:606) org.neo4j.server.rest.transactional.TransactionalRequestDispatcher.dispatch(TransactionalRequestDispatcher.java:139) org.neo4j.server.rest.security.SecurityFilter.doFilter(SecurityFilter.java:112) java.lang.Thread.run(Thread.java:744)


Michael Hunger

unread,
Apr 18, 2014, 3:28:04 PM4/18/14
to ne...@googlegroups.com
Does this happen on both machines?

Does it also happen on the store when you start it directly with shell or single instance when you try accessing the index?

Can you check your indexes with the schema command in the shell?

Thx

Sent from mobile device
--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gwendal Mousset

unread,
Apr 22, 2014, 4:48:58 AM4/22/14
to ne...@googlegroups.com
Hi Michael,

On my 2 instances I see the same things (the index on user has been created by I manually to make some test):

Indexes
  ON :User(id)  ONLINE  
  ON :_User(id) ONLINE  

Constraints
  ON (uip:Uip) ASSERT uip.id IS UNIQUE
  ON (abstractuuidnode:AbstractUUIDNode) ASSERT abstractuuidnode.id IS UNIQUE
  ON (i18nlocale:I18nLocale) ASSERT i18nlocale.language IS UNIQUE
  ON (user:User) ASSERT user.id IS UNIQUE
  ON (category:Category) ASSERT category.id IS UNIQUE
  ON (invitation:Invitation) ASSERT invitation.id IS UNIQUE
  ON (event:Event) ASSERT event.id IS UNIQUE
  ON (i18nresource:I18nResource) ASSERT i18nresource.id IS UNIQUE
  ON (purchasableitem:PurchasableItem) ASSERT purchasableitem.id IS UNIQUE
  ON (betcomment:BetComment) ASSERT betcomment.id IS UNIQUE
  ON (bet:Bet) ASSERT bet.id IS UNIQUE
  ON (betanswer:BetAnswer) ASSERT betanswer.id IS UNIQUE
  ON (abstractuuidrelationship:AbstractUUIDRelationship) ASSERT abstractuuidrelationship.id IS UNIQUE
  ON (country:Country) ASSERT country.code IS UNIQUE

It seems that all indexes have disappeared.

When I start my app on a clean db, the index status is:

Indexes
  ON :AbstractUUIDNode(id)         ONLINE (for uniqueness constraint) 
  ON :AbstractUUIDRelationship(id) ONLINE (for uniqueness constraint) 
  ON :Bet(id)                      ONLINE (for uniqueness constraint) 
  ON :BetAnswer(id)                ONLINE (for uniqueness constraint) 
  ON :BetComment(id)               ONLINE (for uniqueness constraint) 
  ON :Category(id)                 ONLINE (for uniqueness constraint) 
  ON :Country(code)                ONLINE (for uniqueness constraint) 
  ON :Event(id)                    ONLINE (for uniqueness constraint) 
  ON :I18nLocale(language)         ONLINE (for uniqueness constraint) 
  ON :I18nResource(id)             ONLINE (for uniqueness constraint) 
  ON :Invitation(id)               ONLINE (for uniqueness constraint) 
  ON :PurchasableItem(id)          ONLINE (for uniqueness constraint) 
  ON :Uip(id)                      ONLINE (for uniqueness constraint) 
  ON :User(id)                     ONLINE (for uniqueness constraint) 

Constraints
  ON (uip:Uip) ASSERT uip.id IS UNIQUE
  ON (abstractuuidnode:AbstractUUIDNode) ASSERT abstractuuidnode.id IS UNIQUE
  ON (i18nlocale:I18nLocale) ASSERT i18nlocale.language IS UNIQUE
  ON (user:User) ASSERT user.id IS UNIQUE
  ON (category:Category) ASSERT category.id IS UNIQUE
  ON (invitation:Invitation) ASSERT invitation.id IS UNIQUE
  ON (event:Event) ASSERT event.id IS UNIQUE
  ON (i18nresource:I18nResource) ASSERT i18nresource.id IS UNIQUE
  ON (purchasableitem:PurchasableItem) ASSERT purchasableitem.id IS UNIQUE
  ON (betcomment:BetComment) ASSERT betcomment.id IS UNIQUE
  ON (bet:Bet) ASSERT bet.id IS UNIQUE
  ON (betanswer:BetAnswer) ASSERT betanswer.id IS UNIQUE
  ON (abstractuuidrelationship:AbstractUUIDRelationship) ASSERT abstractuuidrelationship.id IS UNIQUE
  ON (country:Country) ASSERT country.code IS UNIQUE

So each unicity constraint has it own index.

I tried to manually drop index to make some tests:

drop index on :User(id) 
Neo4j throws an error.
Unable to drop index on :User(id): Index belongs to constraint: :User(id)

So, it's very strange, because neo4j doesn't accept to have a unicity constraint without corresponding index, but they have all been dropped...

Maybe a Neo4j bug ?

Thanks



On Friday, April 18, 2014 9:28:04 PM UTC+2, Michael Hunger wrote:
Does this happen on both machines?

Does it also happen on the store when you start it directly with shell or single instance when you try accessing the index?

Can you check your indexes with the schema command in the shell?

Thx

Sent from mobile device

Am 18.04.2014 um 18:46 schrieb Gwendal Mousset <gwendal...@gmail.com>:

Hi all, 

I'm using Neo4j 2.0.1 with SDN 3.0.1. Neo4j works IN HA mode with 2 server instances.

My application was working normally for days and until a problem appears.
I work with neo4j for 6 month and it's the first time get this exception.
I restart the web app and the neo4j instances without success, the database seems "broken".

What can I do to repaire and fix this problem ?

The stack trace :

An unexpected error has occured: No such index found. Label: `User` Property name: `id` at IndexHintException org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.EntityProducerFactory$$anonfun$7$$anonfun$13.apply(EntityProducerFactory.scala:141) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.EntityProducerFactory$$anonfun$7$$anonfun$13.apply(EntityProducerFactory.scala:141) scala.Option.getOrElse(Option.scala:120) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.EntityProducerFactory$$anonfun$7.applyOrElse(EntityProducerFactory.scala:140) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.EntityProducerFactory$$anonfun$7.applyOrElse(EntityProducerFactory.scala:119) scala.PartialFunction$OrElse.apply(PartialFunction.scala:162) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.EntityProducerFactory$$anonfun$2.applyOrElse(EntityProducerFactory.scala:61) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.EntityProducerFactory$$anonfun$2.applyOrElse(EntityProducerFactory.scala:61) scala.PartialFunction$OrElse.apply(PartialFunction.scala:162) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.EntityProducerFactory$$anonfun$1.applyOrElse(EntityProducerFactory.scala:49) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.EntityProducerFactory$$anonfun$1.applyOrElse(EntityProducerFactory.scala:49) scala.PartialFunction$OrElse.apply(PartialFunction.scala:162) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.EntityProducerFactory$$anonfun$3.applyOrElse(EntityProducerFactory.scala:70) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.EntityProducerFactory$$anonfun$3.applyOrElse(EntityProducerFactory.scala:70) scala.PartialFunction$OrElse.apply(PartialFunction.scala:162) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.MergeStartPointBuilder$$anonfun$5.apply(MergeStartPointBuilder.scala:103) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.MergeStartPointBuilder$$anonfun$5.apply(MergeStartPointBuilder.scala:102) scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) scala.collection.immutable.List.foreach(List.scala:318) scala.collection.TraversableLike$class.map(TraversableLike.scala:244) scala.collection.AbstractTraversable.map(Traversable.scala:105) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.MergeStartPointBuilder.org$neo4j$cypher$internal$compiler$v2_0$executionplan$builders$MergeStartPointBuilder$$findNodeProducer(MergeStartPointBuilder.scala:102) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.MergeStartPointBuilder$$anonfun$org$neo4j$cypher$internal$compiler$v2_0$executionplan$builders$MergeStartPointBuilder$$solveUnsolvedMergePoints$1.apply(MergeStartPointBuilder.scala:58) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.MergeStartPointBuilder$$anonfun$org$neo4j$cypher$internal$compiler$v2_0$executionplan$builders$MergeStartPointBuilder$$solveUnsolvedMergePoints$1.apply(MergeStartPointBuilder.scala:56) org.neo4j.cypher.internal.compiler.v2_0.executionplan.builders.QueryToken.map(QueryToken.scala:30) org.neo4j.cypher.internal.compiler<spa
...

Gwendal Mousset

unread,
Apr 22, 2014, 10:23:49 AM4/22/14
to ne...@googlegroups.com
to continue...

- >I try recreating constraint but no effect, may be because the constraint already exists (without the associated index).
-> I try drop constraint -> transaction error, Neo4j became unstable and need to be restarted.

So I don't see how to repair the db...

Gwendal Mousset

unread,
Apr 23, 2014, 7:27:15 AM4/23/14
to ne...@googlegroups.com
In reading the 2.0.2 changlog I see the fix "Fixes an issue where indexes that have been dropped would fail recovery if commands to activate them were run in recovery."

Can it be a solution to the issue I have ?

Michael Hunger

unread,
Apr 23, 2014, 8:22:25 AM4/23/14
to ne...@googlegroups.com
Thanks a lot for the detailed description

Can you reproduce it on a blank store? Otherwise would you be able to share the stores?

I asked the eng team for their feedback, 
Let's see

Sent from mobile device
--

Gwendal Mousset

unread,
Apr 23, 2014, 8:57:51 AM4/23/14
to ne...@googlegroups.com
Unfortunately, I don't know how to reproduce it.
We are investigating in logs if we see unusual elements.

We have totally reinitialized the databases yesterday and restarted the service tests, for the moment all works normally.
I'll send you the db by email.

Thanks a lot Michael for your help.

Gwendal Mousset

unread,
Apr 29, 2014, 3:52:31 AM4/29/14
to ne...@googlegroups.com
Hi Michael, 

Any news from the neo4j team ?

Thanks
Reply all
Reply to author
Forward
0 new messages