Ability to override CL during transactions?


bdi...@...
 

We have ability to specify consistency levels while opening the connection to the graph.

Transaction is created in thread scope with the first graph operation. 
Is there a way to override the consistency levels specified while opening the graph during beginning of the thread local transaction?

Something like following:

//Automatically opens a new transaction, is there a way to set R/W CL=QUORUM?
v1=juno = graph.addVertex() 
v1.property("k1", "v1");
graph.tx().commit() //Ends transaction

try {
//Automatically opens a new transaction, is there a way to set R/W CL=LOCAL_QUORUM?
    if (!g.V().has("k2", "v2").iterator().hasNext()) {
v2 = graph.addVertex()
v2.property("k2", "v2")
}
    graph.tx().commit()
} catch (Exception e) {
    println(e.getMessage())
}

Thanks
Bharat


Keith Lohnes <loh...@...>
 

These types of questions should be directed janusgraph-users group.https://groups.google.com/forum/#!forum/janusgraph-users


On Thu, Jan 11, 2018 at 2:53 PM <bdi...@...> wrote:
We have ability to specify consistency levels while opening the connection to the graph.

Transaction is created in thread scope with the first graph operation. 
Is there a way to override the consistency levels specified while opening the graph during beginning of the thread local transaction?

Something like following:

//Automatically opens a new transaction, is there a way to set R/W CL=QUORUM?
v1=juno = graph.addVertex() 
v1.property("k1", "v1");
graph.tx().commit() //Ends transaction

try {
//Automatically opens a new transaction, is there a way to set R/W CL=LOCAL_QUORUM?
    if (!g.V().has("k2", "v2").iterator().hasNext()) {
v2 = graph.addVertex()
v2.property("k2", "v2")
}
    graph.tx().commit()
} catch (Exception e) {
    println(e.getMessage())
}

Thanks
Bharat

--
You received this message because you are subscribed to the Google Groups "JanusGraph developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgr...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-dev/83342af0-8116-4a57-bd9d-a2e1a16a65ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.