copy-store fails when graph size is greater than Integer.MAXVALUE
gmann11 opened this issue · 4 comments
gmann11 commented
copy-store fails on a large graph where the max id > max integer with:
Copying from /x/graph.db to /y/graph.db ingoring rel-types [] ignoring properties [false] ignoring labels [] removing nodes with labels [] keep node ids false
Exception in thread "main" java.lang.IllegalArgumentException: initial capacity cannot be less than 0
at org.eclipse.collections.impl.map.mutable.primitive.LongLongHashMap.<init>(LongLongHashMap.java:87)
at org.neo4j.tool.StoreCopy.copyNodes(StoreCopy.java:219)
at org.neo4j.tool.StoreCopy.copyStore(StoreCopy.java:82)
at org.neo4j.tool.StoreCopy.main(StoreCopy.java:49)
It looks like there is a cast from long to int on StoreCopy.java:219 causing the issue.
jexp commented
@gmann11 where do you see this cast? Can't see it? There is only one cast to int for a percentage output.
Which version are you looking at?
jexp commented
Ah found it here in the 3.5 branch:
https://github.com/jexp/store-utils/blob/3.5/src/main/java/org/neo4j/tool/StoreCopy.java#L219
jexp commented
I pushed a fix to the 3.5 branch, could you try to build and use that?
jexp commented