python - Deadlock when creating index -


i try create index cypher query using py2neo 1.6.2 , neo4j 2.0.1:

graph_db = neo4j.graphdatabaseservice() query = "create index on :label(prop)" neo4j.cypherquery(graph_db, query).run() 

the query works fine in neo4j web interface throws deadlock error in py2neo:


py2neo.neo4j.deadlockdetectedexception: don't panic.

a deadlock scenario has been detected , avoided. means 2 or more transactions, holding locks, wanting await locks held 1 another, have resulted in deadlock between these transactions. exception thrown instead of ending in deadlock.

see deadlock section in neo4j manual how avoid this: http://docs.neo4j.org/chunked/stable/transactions-deadlocks.html

details: 'transaction(15438, owner:"qtp1927594840-9525")[status_active,resources=1] can't wait on resource rwlock[schemalock]since => transaction(15438, owner:"qtp1927594840-9525")[status_active,resources=1] <-[:held_by]- rwlock[schemalock] <-[:waiting_for]- transaction(15233, owner:"qtp1927594840-9503")[status_active,resources=1] <-[:held_by]- rwlock[schemalock]'.


it doesn't make difference if label exists or not, request fails.

judging deadlock graph in details section, looks bug in 2.0.1. doing else database other running specific query, or starting fresh database , running code provided?

in case, since works in neo4j browser, i'd suggest swapping use transactional apis, browser uses. py2neo supports using "cypher transactions" feature, documented here:

http://book.py2neo.org/en/latest/cypher/#id2


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -