Multi-key transactions

85 views
Skip to first unread message

Shahram

unread,
May 24, 2015, 5:01:08 PM5/24/15
to orient-...@googlegroups.com
Hi there,

Could you please tell me if OrientDB supports multi-key transactions or not?
if answer is yes. How?
If answer is no, so why we say that OrientDB is fully transactional?

Kind regards,
Shahram

Andrey Lomakin

unread,
May 25, 2015, 3:03:22 AM5/25/15
to orient-database
Hi,

OrientDB is not key value store so term of "multi-key transactions" is not applicable to it.
OrientDB uses classical transactional model, means all operations in batch form single atomic durable isolated unit of work.
Did I answer you question ?





--
Best regards,
Andrey Lomakin.

Shahram

unread,
May 25, 2015, 7:08:39 AM5/25/15
to orient-...@googlegroups.com
Hi Andrey,

Thanks for your reply. So by considering OrientDB as a hybrid document/graph store, Does it support multi-document transactions?

Kind regards,
Ali


--

---
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/Qc8HQoXxXfk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrey Lomakin

unread,
May 25, 2015, 7:19:44 AM5/25/15
to orient-database
Hi,
Yes, transaction may contain changes over several documents.

--

---
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.

Shahram

unread,
May 25, 2015, 7:52:34 AM5/25/15
to orient-...@googlegroups.com
Great,

So you mean if I have a document A in node#1, and document B in node#2, so I can update both of them atomically in one transaction. So may I ask you how? because I didn't find any relevant thing in the OrientDB documents.

BTW, which commit protocol (such as 2PC or RAFT) is using for implementing this distributed transaction?

Kind regards,
Ali Davoudian
Carleton University, Ottawa

Fabio Ricci

unread,
May 25, 2015, 2:41:22 PM5/25/15
to orient-...@googlegroups.com
Hello again

thank you for deploying rc3 - now RDF loading is running smoothly.

In order to promote orientDB I need to be able to use nodes and edges - I guess.

In a graphDB instance I loaded through the SAIL interface an RDF Thesaurus (http://zbw.eu/stw) and exposed the database to studio.

Studio is able to display results of simple queres like "select * from V limit 10" or "select * from V where value like '%Economics%' "

But as soon as I want to select (under BROWSE but also under GRAPH Tab) some vertex which are linked with other ones through Edges it gets (to me) difficult. The selectors IN(), OUT() seem not to functions. e.g. "select OUT() from V where name like '%Economics%'"delivers records with only [] values under BROWSE and "UNKNOWN" nodes under GRAPH. I do not see any names on the displayed (temporary) nodes.

Even the most simple query like "select OUT() from V limit 10" delivers [] records. It should delivers several records with edge values.

Maybe RDF imported triples are not processable as a graph under studio (my assumption)?

Is this so correct? How shell I understand the semantics of these sql-like selections?

How can I formulate a query to see some verteces and edges (all with lables) connecting them ?

Thanks
Fabio

PS: I submitted a graph instance with the thesaurus to Luigi, so the content should be available to you in case you ask.
signature.asc

Fabio Ricci

unread,
May 25, 2015, 3:09:26 PM5/25/15
to orient-...@googlegroups.com
Dear community

please see attached file.

Why are the values shown in the image displaying an "U" as property value? is U=URL ? Is this intended to be so or is it just some effect of the use of the SAIL interface?

Thanks
Fabio
Screen Shot 2015-05-25 at 21.07.01.png
signature.asc

Fabio Ricci

unread,
May 25, 2015, 3:14:26 PM5/25/15
to orient-...@googlegroups.com
in SQL qualifiers are used to qualify one or several records or fields inside them.

Are qualifiers useful in OrientDB?

Is the semantics of the following two queries the same?
select c, cp, label from E
select E.c, E.cp, E.label from E

Furthermore: How can be formulated a query like

select E1.label, 2.label  from E1.E, E2E where E.label like "%somevalue%" AND E1.out = E2.in

?

Thanks
Regards
Fabio

signature.asc

Fabio Ricci

unread,
May 25, 2015, 3:45:09 PM5/25/15
to orient-...@googlegroups.com
https://github.com/orientechnologies/orientdb/issues/4220

Hi

OrientDB rc3 is using openrdf 2.6

Loading RDF with a reduced file containing one single line like
http://dbpedia.org/resource/Futurama_(TV_series) http://www.w3.org/1999/02/22-rdf-syntax-ns#typehttp://www.w3.org/2004/02/skos/core#Concept .

And having put each URL in a structure spo,

The code
sc.addStatement(
    vf.createURI(spo.s), 
    vf.createURI(spo.p), 
   
vf.createURI(spo.o), 
    importgraphurl );
sc.commit();

generates the exception below (because of the parenthesis in the url).

I opened an issue because I think, this and other "specialities" like "Commas in URL, Semicolon in URL" in URL should be handled properly - without exceptions.
Is there any workaround for me in order to get
triples containing parenthesis/commas/semicolon in URL loaded?

URL encoding is here not the solution -> it generates another kind of exception.

Thanks
Regards
Fabio


com.orientechnologies.orient.core.index.OIndexException: Error during insertion of key in index
at com.orientechnologies.orient.core.index.OIndexMultiValues.put(OIndexMultiValues.java:141)
at com.orientechnologies.orient.core.index.OIndexMultiValues.put(OIndexMultiValues.java:52)
at com.orientechnologies.orient.core.index.OIndexAbstract.putInSnapshot(OIndexAbstract.java:871)
at com.orientechnologies.orient.core.index.OIndexAbstract.applyIndexTxEntry(OIndexAbstract.java:1051)
at com.orientechnologies.orient.core.index.OIndexAbstract.addTxOperation(OIndexAbstract.java:685)
at com.orientechnologies.orient.core.tx.OTransactionOptimistic$CommitIndexesCallback.run(OTransactionOptimistic.java:99)
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.commit(OAbstractPaginatedStorage.java:927)
at com.orientechnologies.orient.core.tx.OTransactionOptimistic.doCommit(OTransactionOptimistic.java:491)
at com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:148)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2412)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2382)
at com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph.commit(OrientTransactionalGraph.java:161)
at com.tinkerpop.blueprints.oupls.sail.GraphSailConnection.commitInternal(GraphSailConnection.java:74)
at org.openrdf.sail.helpers.SailConnectionBase.commit(SailConnectionBase.java:305)
at com.semweb.load.OrientDBLoader.load_nt_file(OrientDBLoader.java:357)
at com.semweb.load.OrientDBLoader.traverse_dir(OrientDBLoader.java:517)
at com.semweb.load.OrientDBLoader.main(OrientDBLoader.java:177)
Caused by: com.orientechnologies.orient.core.index.sbtree.local.OSBTreeException: Error during index update with key #10:20178499 and value true
at com.orientechnologies.orient.core.index.sbtreebonsai.local.OSBTreeBonsaiLocal.put(OSBTreeBonsaiLocal.java:308)
at com.orientechnologies.orient.core.db.record.ridbag.sbtree.OIndexRIDContainerSBTree.add(OIndexRIDContainerSBTree.java:137)
at com.orientechnologies.orient.core.db.record.ridbag.sbtree.OIndexRIDContainerSBTree.add(OIndexRIDContainerSBTree.java:47)
at com.orientechnologies.orient.core.db.record.ridbag.sbtree.OIndexRIDContainer.add(OIndexRIDContainer.java:146)
at com.orientechnologies.orient.core.db.record.ridbag.sbtree.OIndexRIDContainer.add(OIndexRIDContainer.java:44)
at com.orientechnologies.orient.core.index.OIndexMultiValues.put(OIndexMultiValues.java:133)
... 16 more
Caused by: java.lang.NullPointerException
at com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations.OAtomicOperation.releasePage(OAtomicOperation.java:151)
at com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurableComponent.releasePage(ODurableComponent.java:128)
at com.orientechnologies.orient.core.index.sbtreebonsai.local.OSBTreeBonsaiLocal.findBucket(OSBTreeBonsaiLocal.java:1241)
at com.orientechnologies.orient.core.index.sbtreebonsai.local.OSBTreeBonsaiLocal.put(OSBTreeBonsaiLocal.java:262)
... 21 more


signature.asc

Shahram

unread,
May 25, 2015, 5:06:09 PM5/25/15
to orient-...@googlegroups.com
Hi there,

distributed transactions had not been implemented till June 2013. What about now?

Kind regards,
Shahram

Andrey Lomakin

unread,
May 26, 2015, 2:27:35 AM5/26/15
to orient-database
Hi,
I think that Luca may answer this question.

--

---
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.

Shahram

unread,
May 26, 2015, 11:35:48 AM5/26/15
to orient-...@googlegroups.com
Hi there,

I am comparing OrientDB with other multi-model databases. However, I am stuck with the following question:
Is it right? --> OrientDB guarantees ACID properties for just single-document transactions through using the MVCC concurrency control method.

Could you please answer the question?

Many thanks,
Shahram

On Sunday, May 24, 2015 at 5:01:08 PM UTC-4, Shahram wrote:

Luca Garulli

unread,
May 26, 2015, 12:29:26 PM5/26/15
to orient-...@googlegroups.com
Hi Shahram,
OrientDB has MVCC on single document, but if you use Transactions, then multiple documents are involved (like with RDBMS).



Best Regards,

Luca Garulli
CEO at Orient Technologies LTD
the Company behind OrientDB


--

Shahram

unread,
May 26, 2015, 1:12:59 PM5/26/15
to orient-...@googlegroups.com
Hi Luca,

Thanks for your reply. So could you please tell me what kind of distributed commit protocol (such as Paxos or Two Phase Commit) is used for implementing that? Because nowhere has mentioned about that.

Many thanks,
Shahram

--

---
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/Qc8HQoXxXfk/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