MergeE using the gremlin javascript client on AWS Neptune don't work

Doing a mergeE when using the javascript client (bytecode option) don't work coming back a Invalid OpProcessor requested [null] with code UnsupportedOperationException and 499 as status. The basic mergeE was:
javascriptconst
mergeEMap = new Map();
mergeEMap.set(t.id, "teste-edge");
mergeEMap.set(t.label, "edge-label");
mergeEMap.set(direction.from_, "test-vertex");
mergeEMap.set(direction.to, "test-vertex2");
await g.mergeE(mergeEMap).iterate();
javascriptconst
mergeEMap = new Map();
mergeEMap.set(t.id, "teste-edge");
mergeEMap.set(t.label, "edge-label");
mergeEMap.set(direction.from_, "test-vertex");
mergeEMap.set(direction.to, "test-vertex2");
await g.mergeE(mergeEMap).iterate();
where t and direction comes from gremlin.process with package version 3.6.2. Doing the same in a jupyter notebook just works proving that vertexes exists for example
g.mergeE([(T.id): 'teste-edge', (T.label): 'edge-label', (Direction.from): 'test-vertex', (Direction.to): 'test-vertex2'])
g.mergeE([(T.id): 'teste-edge', (T.label): 'edge-label', (Direction.from): 'test-vertex', (Direction.to): 'test-vertex2'])
mergeV is working as expected 🙏 Anyone have the same problem or had the same issue that could help me on that matter?
9 Replies
kelvinl2816
kelvinl28162y ago
Took a quick look at this - I think you need direction.from_ - if you console.log your map you will see that key is undefined otherwise. Still digging into the 499 part.
jp_amis
jp_amisOP2y ago
copied wrong, it is direction.from_ yeah. with direction.from is a different error edited the question to not mislead on this. Just tested that instead of creating a DriverRemoteClient I use Client and submit the query in plain string it works too. The other issue with that approach is that apparently Neptune don't support bindings (or I couldn't use it at all) so it's a no go.
kelvinl2816
kelvinl28162y ago
Neptune does not need bindings as it does not use the GremlinGroovyScriptEngine, so you don't pay the overhead of "compiling" the query each time. It uses the Antlr parser for text queries. This feels like an issue specific to when the query is sent as bytecode. Need to figure out if it is the JavaScript driver messing up or something server side. Have you by chance tested this against a GremlinServer also?
jp_amis
jp_amisOP2y ago
Didn't tested on GremlinServer only on neptune
kelvinl2816
kelvinl28162y ago
Did some additional testing - this also fails with a Gremlin Server. We need to look into what the Gremlin JS client is doing.
jp_amis
jp_amisOP2y ago
oh, at least it's not a neptune issue
jp_amis
jp_amisOP2y ago
I don't know if related but I think it maybe help with something in this issue but I reported on re:Post an issue with gremlin js and neptune engine 1.2.1.0 https://repost.aws/questions/QUcPpJIEOsRWiIHdqob9aq8g/neptune-engine-1-2-1-0-hangs-with-gremlin-javascript-client Anyway just getting more possible info into this question
Amazon Web Services, Inc.
Neptune Engine 1.2.1.0 hangs with gremlin javascript client | AWS r...
When using gremlin npm package with exact version 3.6.2 with a brand new Neptune cluster with engine version 1.2.1.0 simple queries hangs even after default timeout from Neptune (2 minutes). ###...
kelvinl2816
kelvinl28162y ago
Thanks for the extra clues - we need to dig into the Gremlin JS client and see if anything is unique to Neptune or common across all servers.
spmallette
spmallette2y ago
as a workaround does Direction.OUT happen to fix the problem? (created https://issues.apache.org/jira/browse/TINKERPOP-2925 to track - a release has been proposed, so we had to code freeze at end of week. this fix will be included for 3.6.3)
Want results from more Discord servers?
Add your server