Gremlin (with Python + Neptune) Out of Memory Error with .toList()[0], .next() Fixes It. But Why?
This is not really a question, but more of a discussions on how internally this would cause an out of memory error.
I have the following construct and last night, it resulted in out of memory error.
*
path_v
is a single well defined V. I am expecting it is returning a single V.
* All values in valueMap() I wanted were single cardinality string values.
* I know that it is obvious that toList() will not be efficient if I am only interested in one value, however, this only should return a single record set, so even though it isn't efficient, it should not blow up the memory.
The change to the following seems to fix this. Obviously this will be asking for a single value from a cursor
type interaction
Very intriguing...1 Reply
hmm, that's strange. you stated it pretty plainly but I feel like I have to ask: are you completely certain that "path_v" is returning one vertex? what happens if you do:
does that return 1?