升级Greemlin会断开连接

时间:2019-01-16 15:51:53

标签: gremlin amazon-neptune

对于gremlin javascript3.2.10,以下功能可以正确连接到我的Neptune群集:

export const initGremlinClient = () => {
  try {
    const dc = new DriverRemoteConnection(
      `ws://${process.env.NEPTUNE_ENDPOINT_URI}:${
        process.env.NEPTUNE_ENDPOINT_PORT
      }/gremlin`
    );
    const graph = new Graph();
    return {
      g: graph.traversal().withRemote(dc),
      closeGremlinConnection: () => dc.close()
    };
  } catch (error) {
    console.log("[GREMLIN INIT ERROR]", error);
    throw new Error(error);
  }
};

如果我升级到版本^3.4.0,则会引发以下错误:

  

“错误:TypeError:无法读取未定义的属性'reader'”

这在NodeJS 8.10上的Lambda函数中运行。该文档似乎并未指示该版本中有任何新内容,AWS也未指定与Neptune的兼容性问题。我是否配置错误?

编辑:添加堆栈跟踪

{
  "errorMessage": "Cannot read property 'reader' of undefined",
  "errorType": "TypeError",
  "stackTrace": [
    "new Connection (/var/task/gremlinTest/node_modules/gremlin/lib/driver/connection.js:77:28)",
    "new Client (/var/task/gremlinTest/node_modules/gremlin/lib/driver/client.js:46:24)",
    "new DriverRemoteConnection (/var/task/gremlinTest/node_modules/gremlin/lib/driver/driver-remote-connection.js:53:20)",
    "exports.handler (/var/task/gremlinTest/index.js:6:14)"
  ]
}

1 个答案:

答案 0 :(得分:2)

最近已接受了此补丁程序,根据此issue report,该补丁应会尽快在3.3.6和3.4.1中着陆。