Re: Graph corruption?


Kevin Schmidt
 

Joe,

See https://groups.google.com/g/janusgraph-users/c/foaqfG-MB5E/m/tsNnkhPtBwAJ for a discussion on perhaps the same issue you are running into.

Long story short, it appears you have a unique index, but if you are using locking you can end up with duplicates, but using locking slows things down.  If possible, reorganize things or your traversals so you don't rely on the graph to enforce the unique index.

Kevin

On Mon, Jun 27, 2022 at 1:44 PM Joe Obernberger <joseph.obernberger@...> wrote:
Hi all - I'm seeing this from a recent graph I built:

gremlin> :> g.V(4162).valueMap()
==>{source=[DS_106], sourceName=[GDELTRecord3]}
gremlin> :> g.V(4146).valueMap()
==>{source=[DS_106], sourceName=[GDELTRecord3]}
gremlin> :> g.V(4226).valueMap()
==>{source=[DS_106], sourceName=[GDELTRecord3]}
gremlin> :> g.V(4250).valueMap()
==>{source=[DS_106], sourceName=[GDELTRecord3]}
gremlin>
gremlin>
gremlin> :> g.V().has("source","DS_106")
==>v[4226]

The graph has an index on source like this:

PropertyKey sourceProperty =
mgmt.makePropertyKey("source").dataType(String.class).cardinality(Cardinality.SINGLE).make();
JanusGraphIndex sourceIndex = mgmt.buildIndex("bySourceComposite",
Vertex.class).addKey(sourceProperty).unique().buildCompositeIndex();
mgmt.setConsistency(sourceProperty, ConsistencyModifier.LOCK);
mgmt.setConsistency(sourceIndex, ConsistencyModifier.LOCK);

How could the graph end up with several vertices with the same source
string?  Still learning graphs...

Thank you!

-Joe


--
This email has been checked for viruses by AVG.
https://www.avg.com






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