Avoiding duplicate vertex creation using unique indices

Umesh Gade <er.umeshgade@...>

Hi All,
        To avoid a situation of duplicate vertex creation due to parallel transactions, we are using index uniqueness over property which defines uniqueness of vertex. As per doc, we need to specify lock on index and property. (https://docs.janusgraph.org/advanced-topics/eventual-consistency/)
mgmt.setConsistency(name, ConsistencyModifier.LOCK) // Ensures only one name per vertex mgmt.setConsistency(index, ConsistencyModifier.LOCK) // Ensures name uniqueness in the graph

As per observation, specifying lock only on index blocks parallel transaction commit which avoids duplicate vertex creation. We didn't see any behavior change with or without lock on property.

Can anybody help me understand the significance of lock on property i.e. name in above example? 
Any example scenario to understand the meaning of "Ensures only one name per vertex" ? 

Umesh Gade

Join janusgraph-users@lists.lfaidata.foundation to automatically receive all group messages.