Re: [Neo4j] TransactionEventHandler bug?

2015-07-10 Thread ducky
Could this be related to this bug:

https://github.com/neo4j/neo4j/issues/4910

On Tuesday, 7 July 2015 16:59:32 UTC+1, Clark Richey wrote:
>
> I have confirmed the same behavior on 2.2.3 as well.
>
> Clark Richey
> clark@gmail.com 
>
>
>  
> On Jul 6, 2015, at 5:20 PM, Clark Richey  > wrote:
>
> Sorry. I’m running 2.2.2 enterprise.
>
> I do have a test which I have attached. In creating this test I can see 
> that events actually don’t seem to be firing consistently at all. If I 
> delete the DB on disk between runs I can get it to fire but if I run it a 
> second time without deleting the DB on disk it never fires.
>
> When the events do fire you will see that iterating through either the 
> assignedNodeProperties or the createdRelationships yields no data.
>
>
>
> 
>
> Clark Richey
> clark@gmail.com 
>
>
>  
> On Jul 6, 2015, at 4:24 PM, Michael Hunger  > wrote:
>
> Hey Clark,
>
> do you have a small test that reproduces the issue? And which version are 
> you testing it with?
>
> thanks a lot
>
> Michael
>
> Am 06.07.2015 um 18:37 schrieb Clark Richey  >:
>
> Hello,
> I’m implementing a TransactionEventHandler in much the same way that is 
> presented here: http://maxdemarzi.com/2015/03/25/triggers-in-neo4j/.
>
>
> When I have transactions that create relationships, I can correctly view 
> those relationships by calling transactionData.createdRelationships().
>
> However, if inside of a relationship I simply set a node property by 
> invoking node.setProperty(key,value) then the TransactionData object that 
> is passed to the afterCommit method of my TransactionEventHandler does not 
> list any data when the transactionData.assignedNodeProperties() method is 
> invoked. The transaction did commit successfully because I can retrieve the 
> node in a separate transaction and see the update value.
>
> Is this a bug or am I misunderstanding the expected behavior? Thanks!
>
> ---
>
>
> 
>
>
> Clark D. Richey, Jr
> CHIEF TECHNOLOGY OFFICER
> 240.252.7507
> cl...@factgem.com 
> WWW.FACTGEM.COM 
>  
>
> -- 
> 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.
>
>
>
> -- 
> 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.
>
>
>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Versioning neo4j data, checkpointing

2015-07-04 Thread ducky
 I've been working on a kernel extension 
 which pushes all the changes being 
made to the data in a Neo4j database to a Kafka  
server. All the changes have a timestamp attached to them.

So theoretically it should be possible to play back all the messages till a 
point in time from Kafka to get a Neo4j database till that point in time.

Its similar to Graphaware's changefeed 
 except that the data is 
structured and sent to Kafka for storage.

I'm in the process of writing a blog post explaining more about it. WIP.

On Saturday, 4 July 2015 11:49:37 UTC+1, Michael Hunger wrote:
>
> It's planned as a feature for Neo4 itself.
>
> I'm not aware of other variants, although there might be that the xnLogic 
> framework would help you.
>
> Michael
>
> Am 01.07.2015 um 20:14 schrieb Abhishek Agarwal  >:
>
> Hello all,
>
> We would like to keep snapshots/versions of the graph(or just versions of 
> a specific node). We would want to switch to any version (like in a git 
> repo).
>
> We tried using GraphAware's ChangeFeed but that doesn't solve our purpose.
>
> We have also found this github project: 
> https://github.com/dmontag/neo4j-versioning. But it is too outdated.
>
> Are there any plugins which can help us in achieving this?
>
> -- 
> 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.
>
>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] Re: Neo4j browser 2.2 heisenbug?

2015-04-08 Thread ducky
Hi Oskar,
I have just tried this but it doesn't have any effect. 

The strange things:

1) I get net:ERR_CONNECTION_RESET pretty much instantly. 
2) I can visit the two files by putting their URLs in address bar.

If it helps, I can share the IP address of the server privately with you.

cheers



On Wednesday, 8 April 2015 15:15:13 UTC+1, Oskar Hane wrote:
>
> Hey ducky,
>
> Thanks for the report.
> Somehow I get the feeling that this is due to aggressive browser caching 
> even though you get the same result in incognito mode.
> Could you open the inspector in Chrome and check the "Disable cache" 
> checkbox located at the top of the Network tab and then reload the page 
> with the inspector open?
>
>
> Cheers,
> Oskar
>
> On Wednesday, April 8, 2015 at 12:15:34 PM UTC+2, ducky wrote:
>>
>> Hi,
>> I am trying to test deploying the new Neo4j (2.2.0) browser on a Digital 
>> Ocean droplet.
>>
>> I've done all the basic tuning and I am having some issues using the 
>> browser.
>>
>> When I visit http://:7474/browser, the browser loads up only 
>> partially. See attached image.
>>
>> When I open up the dev tools on Chrome, I noticed that the following two 
>> files have had their connection reset:
>>
>> 1) scripts/47f46c27.scripts.js
>> 2) scripts/3dd12436.components.js
>>
>> The exact error is: "Failed to load resource: net::ERR_CONNECTION_RESET".
>>
>> I've tested the browser using Firefox and Chrome [both latest and 
>> incognito/normal modes] on a linux machine and I get the error.
>>
>> The strange thing is that it works fine on my mac on the same browser 
>> configurations but not on a colleagues mac. I don't have any firewall in 
>> place on the server.
>>
>> Does anyone have any experience with this issue? Any help would be 
>> appreciated
>>
>> Thanks
>>
>>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] Neo4j browser 2.2 heisenbug?

2015-04-08 Thread ducky
Hi,
I am trying to test deploying the new Neo4j (2.2.0) browser on a Digital 
Ocean droplet.

I've done all the basic tuning and I am having some issues using the 
browser.

When I visit http://:7474/browser, the browser loads up only partially. 
See attached image.

When I open up the dev tools on Chrome, I noticed that the following two 
files have had their connection reset:

1) scripts/47f46c27.scripts.js
2) scripts/3dd12436.components.js

The exact error is: "Failed to load resource: net::ERR_CONNECTION_RESET".

I've tested the browser using Firefox and Chrome [both latest and 
incognito/normal modes] on a linux machine and I get the error.

The strange thing is that it works fine on my mac on the same browser 
configurations but not on a colleagues mac. I don't have any firewall in 
place on the server.

Does anyone have any experience with this issue? Any help would be 
appreciated

Thanks

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Re: Neo4j 2.2M02 and Cypher START clause

2015-01-14 Thread ducky
Thanks a lot Andrés. Looking forward to the new release!

On Wednesday, 14 January 2015 05:50:14 UTC, Andres Taylor wrote:
>
> Hiya!
>
> We just merged in code that should make this simpler in our next release. 
> https://github.com/neo4j/neo4j/pull/3794
>
> Thanks for letting us know about it.
>
> Andrés
>
> On Mon, Dec 22, 2014 at 12:28 PM, ducky  > wrote:
>
>> Thanks for the suggestion Dmitry.
>>
>> I was hoping for a solution which didn't involve changing the 
>> configuration or the query.
>>
>>
>>
>> On Monday, 22 December 2014 09:56:11 UTC+5:30, Dmitry Davletbaev wrote:
>>>
>>> Hello Ducky!
>>>
>>> You can edit a cypher_parser_version option in ./conf/neo4j.properties 
>>> to force Neo4j to use specific Cypher version parser, e.g.:
>>>
>>> # Enable this to specify a parser other than the default one.
>>> cypher_parser_version=2.0
>>>
>>> I hope this helps you.
>>>
>>> Dmitry Davletbaev
>>> Software Developer
>>> dmitry.d...@maginfo.com
>>> http://www.maginfo.com/
>>>
>>> On Sunday, December 21, 2014 2:36:01 PM UTC+5, ducky wrote:
>>>>
>>>> While testing some code against Neo4j 2.2M02, I realised that cypher 
>>>> queries of type "START n=node(1) RETURN n" are all breaking with error:
>>>>
>>>> Using 'START x = node(1)' is no longer supported.  Please instead use 
>>>> 'MATCH x WHERE id(x) = 1' (line 1, column 7) "START x = node(1) RETURN x;"
>>>>
>>>> Neo.ClientError.Statement.InvalidSyntax
>>>>
>>>>
>>>>
>>>> This is a big breaking change. I understand that I can prepend the 
>>>> query with "CYPHER 2.1" to get the old behaviour.
>>>>
>>>> I remember talking to Chris Leishman about it at Neo4j GraphDay and he 
>>>> suggested that the 2.2 query engine would fallback to 2.1 engine if it 
>>>> encounters queries which it can't parse but would parse in 2.1 engine.
>>>>
>>>> Is that fallback still on cards?
>>>>
>>>> cheers
>>>>
>>>  -- 
>> 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.
>>
>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] Re: Neo4j 2.2M02 and Cypher START clause

2014-12-22 Thread ducky
Thanks for the suggestion Dmitry.

I was hoping for a solution which didn't involve changing the configuration 
or the query.



On Monday, 22 December 2014 09:56:11 UTC+5:30, Dmitry Davletbaev wrote:
>
> Hello Ducky!
>
> You can edit a cypher_parser_version option in ./conf/neo4j.properties to 
> force Neo4j to use specific Cypher version parser, e.g.:
>
> # Enable this to specify a parser other than the default one.
> cypher_parser_version=2.0
>
> I hope this helps you.
>
> Dmitry Davletbaev
> Software Developer
> dmitry.d...@maginfo.com 
> http://www.maginfo.com/
>
> On Sunday, December 21, 2014 2:36:01 PM UTC+5, ducky wrote:
>>
>> While testing some code against Neo4j 2.2M02, I realised that cypher 
>> queries of type "START n=node(1) RETURN n" are all breaking with error:
>>
>> Using 'START x = node(1)' is no longer supported.  Please instead use 'MATCH 
>> x WHERE id(x) = 1' (line 1, column 7) "START x = node(1) RETURN x;"
>>
>> Neo.ClientError.Statement.InvalidSyntax
>>
>>
>>
>> This is a big breaking change. I understand that I can prepend the query 
>> with "CYPHER 2.1" to get the old behaviour.
>>
>> I remember talking to Chris Leishman about it at Neo4j GraphDay and he 
>> suggested that the 2.2 query engine would fallback to 2.1 engine if it 
>> encounters queries which it can't parse but would parse in 2.1 engine.
>>
>> Is that fallback still on cards?
>>
>> cheers
>>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] Neo4j 2.2M02 and Cypher START clause

2014-12-21 Thread ducky
While testing some code against Neo4j 2.2M02, I realised that cypher 
queries of type "START n=node(1) RETURN n" are all breaking with error:

Using 'START x = node(1)' is no longer supported.  Please instead use 'MATCH x 
WHERE id(x) = 1' (line 1, column 7) "START x = node(1) RETURN x;"

Neo.ClientError.Statement.InvalidSyntax



This is a big breaking change. I understand that I can prepend the query 
with "CYPHER 2.1" to get the old behaviour.

I remember talking to Chris Leishman about it at Neo4j GraphDay and he 
suggested that the 2.2 query engine would fallback to 2.1 engine if it 
encounters queries which it can't parse but would parse in 2.1 engine.

Is that fallback still on cards?

cheers

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] EntityNotFoundException while running a cypher query

2014-08-08 Thread ducky
Hi,
I am using Neo4j 2.1.3. After I deleted some nodes of a particular label, 
when I try to count the number of nodes of that particular label using 
cypher, I get an error: 'EntityNotFoundException: Node with id x'. After 
checking  SO 
,
 
I deleted the graph.db/schema/label folder and the queries started working 
again.

Is this something which is a known bug in neo4j? I wasn't updating the 
database and the data was all imported using Neo4j 2.1.3.

cheers

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Deadlock Detected while creating edges in concurrent transactions

2014-07-04 Thread ducky
Thanks. I understand the necessity of having no data corruption and hence 
the need for locks. But if we can get slightly less locking without giving 
up any of the goodness which comes with it, it'll be awesome!

I've had a look at Max's latest post. I've signed up for his kickstarter as 
well. Really looking forward to it now that it has raised all the necessary 
funds.

cheers

On Friday, 4 July 2014 13:27:32 UTC+1, Chris Vest wrote:
>
> You can’t manually release locks from on-going transactions. Write-locks 
> protects writes that you logically only intend to do, until the transaction 
> commits or rolls back.
>
> It might be possible to add a feature like that, but we’d have to keep the 
> write-locks on the entities that are actually written to, or else the 
> database would almost certainly allow conflicting transactions to commit. 
> That would ruin someones day.
>
> --
> Chris Vest
> System Engineer, Neo Technology
> [ skype: mr.chrisvest, twitter: chvest ]
>
>  
> On 04 Jul 2014, at 13:50, ducky > 
> wrote:
>
> Thanks Chris. 
>
> What I meant was that a read-write lock on a node when an edge is being 
> created felt heavy. If thats what is required for a transactional database 
> like neo4j, so be it.
>
> I understand how I can handle this in my user code (by retrying or 
> structuring my data differently). 
>
> If I know the domain of my problem well, is it possible to release the 
> locks manually?
>
> Thanks
>
> On Friday, 4 July 2014 09:33:36 UTC+1, Chris Vest wrote:
>>
>> Hi,
>>
>> This is expected behaviour for transactional databases with pessimistic 
>> concurrency control. You usually handle this in user-code by retrying the 
>> transaction, making sure that external side-effects, such as sending emails 
>> and processing payments, only happen after the transaction has committed, 
>> or as participants in a distributed transaction, e.g. two-phase commit.
>>
>> --
>> Chris Vest
>> System Engineer, Neo Technology
>> [ skype: mr.chrisvest, twitter: chvest ]
>>
>>
>> On 04 Jul 2014, at 09:53, ducky  wrote:
>>
>> Hi Chris,
>> i) I do create more than 1 relationship per transaction.
>> ii) As you suggest, the nodes b, c are involved in creating other 
>> relationships but not between each other.
>>
>> This is a real bummer. So in my case, creating locks on the nodes when 
>> creating relationships and the locks only being released at the end of the 
>> transaction is the source of the problem. 
>>
>> This seems quite heavy to me and I am guessing that this has the 
>> potential for effecting the unmanaged extensions and even the REST API 
>> based transactions pretty badly in a multiprocessing environment. Is it 
>> worth raising on the github?
>>
>> Thanks a lot for your help!
>>
>> On Thursday, 3 July 2014 22:14:02 UTC+1, Chris Vest wrote:
>>>
>>> Do you create more than one relationship per transaction? Both the start 
>>> and the end node have to be lock to create a relationship between them, and 
>>> locks are not released until the transaction commits. It could also be that 
>>> you have some other transaction that happens to work with the start and end 
>>> nodes.
>>>
>>>
>>> --
>>> Chris Vest
>>> System Engineer, Neo Technology
>>> [ skype: mr.chrisvest, twitter: chvest ]
>>>
>>>
>>> On 03 Jul 2014, at 18:13, ducky  wrote:
>>>
>>> Hi,
>>> I am using Neo4j 2.1.2 and I have an unmanaged extension in which I am 
>>> trying to create the following relationships in separate concurrent 
>>> transactions:
>>>
>>> 1) (b)-[:REL]->(a)
>>> 2) (c)-[:REL]->(a)
>>>
>>> I am never deleting any relationship and I am getting this error:
>>>
>>> org.neo4j.kernel.DeadlockDetectedException: LockClient[118] can't wait 
>>> on resource RWLock[NODE(429288), hash=1375407138] since => LockClient[118] 
>>> <-[:HELD_BY]- RWLock[NODE(429304), hash=1035143818] <-[:WAITING_FOR]- 
>>> LockClient[119] <-[:HELD_BY]- RWLock[NODE(429288), hash=1375407138]
>>> at 
>>> org.neo4j.kernel.impl.locking.community.RagManager.checkWaitOnRecursive(RagManager.java:211)
>>> at 
>>> org.neo4j.kernel.impl.locking.community.RagManager.checkWaitOnRecursive(RagManager.java:238)
>>> at 
>>> org.neo4j.kernel.impl.locking.community.RagManager.checkWaitOn(RagManager.java:178)
>>> at 
>>> org.neo4j.kernel.impl.locking.community.RWLock.deadlockGuardedWait(RWLo

Re: [Neo4j] Deadlock Detected while creating edges in concurrent transactions

2014-07-04 Thread ducky
Thanks Chris. 

What I meant was that a read-write lock on a node when an edge is being 
created felt heavy. If thats what is required for a transactional database 
like neo4j, so be it.

I understand how I can handle this in my user code (by retrying or 
structuring my data differently). 

If I know the domain of my problem well, is it possible to release the 
locks manually?

Thanks

On Friday, 4 July 2014 09:33:36 UTC+1, Chris Vest wrote:
>
> Hi,
>
> This is expected behaviour for transactional databases with pessimistic 
> concurrency control. You usually handle this in user-code by retrying the 
> transaction, making sure that external side-effects, such as sending emails 
> and processing payments, only happen after the transaction has committed, 
> or as participants in a distributed transaction, e.g. two-phase commit.
>
> --
> Chris Vest
> System Engineer, Neo Technology
> [ skype: mr.chrisvest, twitter: chvest ]
>
>  
> On 04 Jul 2014, at 09:53, ducky > 
> wrote:
>
> Hi Chris,
> i) I do create more than 1 relationship per transaction.
> ii) As you suggest, the nodes b, c are involved in creating other 
> relationships but not between each other.
>
> This is a real bummer. So in my case, creating locks on the nodes when 
> creating relationships and the locks only being released at the end of the 
> transaction is the source of the problem. 
>
> This seems quite heavy to me and I am guessing that this has the potential 
> for effecting the unmanaged extensions and even the REST API based 
> transactions pretty badly in a multiprocessing environment. Is it worth 
> raising on the github?
>
> Thanks a lot for your help!
>
> On Thursday, 3 July 2014 22:14:02 UTC+1, Chris Vest wrote:
>>
>> Do you create more than one relationship per transaction? Both the start 
>> and the end node have to be lock to create a relationship between them, and 
>> locks are not released until the transaction commits. It could also be that 
>> you have some other transaction that happens to work with the start and end 
>> nodes.
>>
>>
>> --
>> Chris Vest
>> System Engineer, Neo Technology
>> [ skype: mr.chrisvest, twitter: chvest ]
>>
>>
>> On 03 Jul 2014, at 18:13, ducky  wrote:
>>
>> Hi,
>> I am using Neo4j 2.1.2 and I have an unmanaged extension in which I am 
>> trying to create the following relationships in separate concurrent 
>> transactions:
>>
>> 1) (b)-[:REL]->(a)
>> 2) (c)-[:REL]->(a)
>>
>> I am never deleting any relationship and I am getting this error:
>>
>> org.neo4j.kernel.DeadlockDetectedException: LockClient[118] can't wait on 
>> resource RWLock[NODE(429288), hash=1375407138] since => LockClient[118] 
>> <-[:HELD_BY]- RWLock[NODE(429304), hash=1035143818] <-[:WAITING_FOR]- 
>> LockClient[119] <-[:HELD_BY]- RWLock[NODE(429288), hash=1375407138]
>> at 
>> org.neo4j.kernel.impl.locking.community.RagManager.checkWaitOnRecursive(RagManager.java:211)
>> at 
>> org.neo4j.kernel.impl.locking.community.RagManager.checkWaitOnRecursive(RagManager.java:238)
>> at 
>> org.neo4j.kernel.impl.locking.community.RagManager.checkWaitOn(RagManager.java:178)
>> at 
>> org.neo4j.kernel.impl.locking.community.RWLock.deadlockGuardedWait(RWLock.java:547)
>> at 
>> org.neo4j.kernel.impl.locking.community.RWLock.acquireWriteLock(RWLock.java:319)
>> at 
>> org.neo4j.kernel.impl.locking.community.LockManagerImpl.getWriteLock(LockManagerImpl.java:68)
>> at 
>> org.neo4j.kernel.impl.locking.community.CommunityLockClient.acquireExclusive(CommunityLockClient.java:73)
>> at 
>> org.neo4j.kernel.impl.api.LockingStatementOperations.relationshipCreate(LockingStatementOperations.java:215)
>> at 
>> org.neo4j.kernel.impl.api.OperationsFacade.relationshipCreate(OperationsFacade.java:515)
>> at 
>> org.neo4j.kernel.impl.core.NodeProxy.createRelationshipTo(NodeProxy.java:455)
>>...(snipped)...
>>
>> I've read the section called Deadlocks 
>> <http://docs.neo4j.org/chunked/milestone/transactions-deadlocks.html> in 
>> the documentation but I don't think what I am doing should lead to the 
>> deadlock.
>>
>> Any help would be appreciated.
>>
>> Thanks!
>>
>> -- 
>> 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.
>>
>>
>>
> -- 
> 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.
>
>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Deadlock Detected while creating edges in concurrent transactions

2014-07-04 Thread ducky
Hi Chris,
i) I do create more than 1 relationship per transaction.
ii) As you suggest, the nodes b, c are involved in creating other 
relationships but not between each other.

This is a real bummer. So in my case, creating locks on the nodes when 
creating relationships and the locks only being released at the end of the 
transaction is the source of the problem. 

This seems quite heavy to me and I am guessing that this has the potential 
for effecting the unmanaged extensions and even the REST API based 
transactions pretty badly in a multiprocessing environment. Is it worth 
raising on the github?

Thanks a lot for your help!

On Thursday, 3 July 2014 22:14:02 UTC+1, Chris Vest wrote:
>
> Do you create more than one relationship per transaction? Both the start 
> and the end node have to be lock to create a relationship between them, and 
> locks are not released until the transaction commits. It could also be that 
> you have some other transaction that happens to work with the start and end 
> nodes.
>
>
> --
> Chris Vest
> System Engineer, Neo Technology
> [ skype: mr.chrisvest, twitter: chvest ]
>
>  
> On 03 Jul 2014, at 18:13, ducky > 
> wrote:
>
> Hi,
> I am using Neo4j 2.1.2 and I have an unmanaged extension in which I am 
> trying to create the following relationships in separate concurrent 
> transactions:
>
> 1) (b)-[:REL]->(a)
> 2) (c)-[:REL]->(a)
>
> I am never deleting any relationship and I am getting this error:
>
> org.neo4j.kernel.DeadlockDetectedException: LockClient[118] can't wait on 
> resource RWLock[NODE(429288), hash=1375407138] since => LockClient[118] 
> <-[:HELD_BY]- RWLock[NODE(429304), hash=1035143818] <-[:WAITING_FOR]- 
> LockClient[119] <-[:HELD_BY]- RWLock[NODE(429288), hash=1375407138]
> at 
> org.neo4j.kernel.impl.locking.community.RagManager.checkWaitOnRecursive(RagManager.java:211)
> at 
> org.neo4j.kernel.impl.locking.community.RagManager.checkWaitOnRecursive(RagManager.java:238)
> at 
> org.neo4j.kernel.impl.locking.community.RagManager.checkWaitOn(RagManager.java:178)
> at 
> org.neo4j.kernel.impl.locking.community.RWLock.deadlockGuardedWait(RWLock.java:547)
> at 
> org.neo4j.kernel.impl.locking.community.RWLock.acquireWriteLock(RWLock.java:319)
> at 
> org.neo4j.kernel.impl.locking.community.LockManagerImpl.getWriteLock(LockManagerImpl.java:68)
> at 
> org.neo4j.kernel.impl.locking.community.CommunityLockClient.acquireExclusive(CommunityLockClient.java:73)
> at 
> org.neo4j.kernel.impl.api.LockingStatementOperations.relationshipCreate(LockingStatementOperations.java:215)
> at 
> org.neo4j.kernel.impl.api.OperationsFacade.relationshipCreate(OperationsFacade.java:515)
> at 
> org.neo4j.kernel.impl.core.NodeProxy.createRelationshipTo(NodeProxy.java:455)
>...(snipped)...
>
> I've read the section called Deadlocks 
> <http://docs.neo4j.org/chunked/milestone/transactions-deadlocks.html> in 
> the documentation but I don't think what I am doing should lead to the 
> deadlock.
>
> Any help would be appreciated.
>
> Thanks!
>
> -- 
> 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.
>
>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] Deadlock Detected while creating edges in concurrent transactions

2014-07-03 Thread ducky
Hi,
I am using Neo4j 2.1.2 and I have an unmanaged extension in which I am 
trying to create the following relationships in separate concurrent 
transactions:

1) (b)-[:REL]->(a)
2) (c)-[:REL]->(a)

I am never deleting any relationship and I am getting this error:

org.neo4j.kernel.DeadlockDetectedException: LockClient[118] can't wait on 
resource RWLock[NODE(429288), hash=1375407138] since => LockClient[118] 
<-[:HELD_BY]- RWLock[NODE(429304), hash=1035143818] <-[:WAITING_FOR]- 
LockClient[119] <-[:HELD_BY]- RWLock[NODE(429288), hash=1375407138]
at 
org.neo4j.kernel.impl.locking.community.RagManager.checkWaitOnRecursive(RagManager.java:211)
at 
org.neo4j.kernel.impl.locking.community.RagManager.checkWaitOnRecursive(RagManager.java:238)
at 
org.neo4j.kernel.impl.locking.community.RagManager.checkWaitOn(RagManager.java:178)
at 
org.neo4j.kernel.impl.locking.community.RWLock.deadlockGuardedWait(RWLock.java:547)
at 
org.neo4j.kernel.impl.locking.community.RWLock.acquireWriteLock(RWLock.java:319)
at 
org.neo4j.kernel.impl.locking.community.LockManagerImpl.getWriteLock(LockManagerImpl.java:68)
at 
org.neo4j.kernel.impl.locking.community.CommunityLockClient.acquireExclusive(CommunityLockClient.java:73)
at 
org.neo4j.kernel.impl.api.LockingStatementOperations.relationshipCreate(LockingStatementOperations.java:215)
at 
org.neo4j.kernel.impl.api.OperationsFacade.relationshipCreate(OperationsFacade.java:515)
at 
org.neo4j.kernel.impl.core.NodeProxy.createRelationshipTo(NodeProxy.java:455)
   ...(snipped)...

I've read the section called Deadlocks 
 in 
the documentation but I don't think what I am doing should lead to the 
deadlock.

Any help would be appreciated.

Thanks!

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] 'Using Periodic Commit' throws a invalid syntax exception

2014-06-17 Thread ducky
oh, that was a really useful command when updating large datasets. +1 for 
this feature please. 


On Tuesday, 17 June 2014 14:08:08 UTC+1, Michael Hunger wrote:
>
> Sorry, that feature was removed between M06 and 2.1.0 :(
>
> So what you have to do is to run this repeatedly:
>
> MATCH (a)
>
> LIMIT 1
>
> OPTIONAL MATCH (a)-[r]-()
> DELETE a,r
>
> RETURN count(*);
>
> until it returns 0.
>
> You can try higher limits though, depeding on the number of relationships 
> per node, with 10 rels per node this will be 100k ops, with 100 -> 1M ops.
>
> Michael
>
> Am 17.06.2014 um 15:05 schrieb ducky >:
>
> Hi,
> I am using Neo4j 2.1.2 and when I try to run the example given by Michael 
> Hunger here <http://jexp.de/blog/2014/02/cleaning-out-your-graph/>: 
>
> Query:
> USING PERIODIC COMMIT
> MATCH (a)
> OPTIONAL MATCH (a)-[r]-()
> DELETE a,r;
>
> Error:
> Neo.ClientError.Statement.InvalidSyntax
>
> Invalid input 'M': expected whitespace, comment, an integer or LoadCSVQuery 
> (line 2, column 1)
> "MATCH (a)"
>
>
> My question is: has the use of this command changed since this blog post?
>
> cheers
>
>
> -- 
> 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.
>
>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] 'Using Periodic Commit' throws a invalid syntax exception

2014-06-17 Thread ducky
Hi,
I am using Neo4j 2.1.2 and when I try to run the example given by Michael 
Hunger here : 

Query:
USING PERIODIC COMMIT
MATCH (a)
OPTIONAL MATCH (a)-[r]-()
DELETE a,r;

Error:
Neo.ClientError.Statement.InvalidSyntax

Invalid input 'M': expected whitespace, comment, an integer or LoadCSVQuery 
(line 2, column 1)
"MATCH (a)"


My question is: has the use of this command changed since this blog post?

cheers

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.