Add Edge Query Failing: Best Approach / Fix?

55 views
Skip to first unread message

Simon L

unread,
Aug 18, 2014, 3:17:20 PM8/18/14
to orient-...@googlegroups.com
Original:
BEGIN
 LET vert
-func1 = CREATE vertex Post SET createdAt = "2014-08-18T16:42:13.725Z", updatedAt = "2014-08-18T16:42:13.725Z", note = "Some note" RETURN @rid
 LET edge
-func1 = CREATE edge UserWrotePost FROM #5:32 TO $vert-func1
 
COMMIT RETRY
100
 RETURN $vert
-func1

Here's the thing- when running this many times in a row, I sometimes get negative RIDs. It's unclear why, but it's some sort of result of failure.

How should I make the query using a pessimistic approach? (An approach which locks the vertex)

Also, is there anything else what could cause failure here in a high concurrency situation? Thanks!

Luca Garulli

unread,
Aug 19, 2014, 7:06:31 AM8/19/14
to orient-database
Hi Simon,
When you execute a transaction against a database with an open transaction, the transaction is committed when the last-outside transaction commits. Assure to execute these operation against a OrientGraphNoTx instance.

Are you working with plocal or remote protocol?

Lvc@



--

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

Simon L

unread,
Aug 20, 2014, 5:39:44 PM8/20/14
to orient-...@googlegroups.com
Hi Luca,

I don't quite understand. It should still eventually commit, shouldn't it? The test involves repeating the transaction about 30 times in multiple threads. It's heavy-ish but not mega heavy and ultimately things finish.

Also, what is the significance of the negative RID? Is that an error, and what type would it likely be?

I'm using Oriento.

Can you tell me more about OrientGraphNoTx, and do you have any idea how it might be used in Oriento?



--

---
You received this message because you are subscribed to a topic in the Google Groups "OrientDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orient-database/zg2gLSO6j_I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-databa...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages