Is there a way to set R/W consistency levels for a specific transaction?

15 views
Skip to first unread message

Bharat Dighe

unread,
Jan 11, 2018, 2:30:17 PM1/11/18
to Aurelius
We have ability to specify consistency levels while opening the connection to the graph.

Titan creates a transactions 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
Reply all
Reply to author
Forward
0 new messages