Shush
ATApache TinkerPop
•Created by Shush on 12/17/2023 in #questions
AWS Neptune: Pong fails and close event not emitted
Hey guys, long time no see.
We have an issue which occurred a few times in the last couple weeks and we've been investigating for a while; posting here in case the issue is maybe known.
We are using the
gremlin-aws-sigv4
in a NodeJS project. We occasionally do a ping to the server and wait for a Pong with a timeout of 3 seconds.
If a pong times out, we decide that the connection is not doing well and close it. We do it by accessing the websocket and calling terminate()
on it. Along the process, this begins the close()
function to close the connection to the server, which then waits for the close
event. However, it seems like the event is sometimes never actually emitted, which leaves the connection open for a long time. Either the connection is not being closed properly, or the connection is not emitting the event for some reason, leaving the connection open and is in memory forever. This causes a memory leak over time.
Any ideas what we could do to handle those issues?5 replies
ATApache TinkerPop
•Created by Shush on 4/20/2023 in #questions
Testing new Neptune version
Hey all,
We're currently in Neptune 1.1.0.0. To prepare for the next Neptune version, 1.2.0.2, we made a pretty big test that covers up most of what is happening that utilizes Neptune.
Doing extensive testing in our developer environment which doesn't have Neptune, we instead used a local Tinkerpop server of version 3.5.4, which according to the notes is the latest version utilized by Neptune.
After a month of testing and making sure everything works as intended, we went ahead and upgraded our Staging environment from 1.1.0.0 to 1.2.0.2. However, we quickly started seeing issues, and had to roll back ASAP to prevent issues for our developers.
Is testing via a local Tinkerpop server not good enough to gain confidence? What can we do to have a good understanding of the differences between Neptune and a Tinkerpop server? Should we make a developer-environment based Neptune server to be used by the devs testing it?
Please advise.
34 replies
ATApache TinkerPop
•Created by Shush on 2/27/2023 in #questions
Exporting current DB to JSON
Hey,
We want to export the current DB to a JSON file. This is used for small scale copy of the DB that includes a small number of users that can be used for unit tests.
This does not use any product (e.g. Neptune) but just plain Tinkerpop server/client.
I used to export it using Graphson:
graph.io(graphson()).writeGraph("data/defaultDB.json");
However, since there are some vertices that are too big (and by that I mean that they have a lot of edges), longer lines are trimmed with a ..
at the end, essentially breaking the JSON file. Even if you fix the formatting, there is still omitted information.
Is there a better way to do it for small-medium sized DBs with complicated vertices and edges?7 replies
ATApache TinkerPop
•Created by Shush on 2/7/2023 in #questions
upsert not working properly in specific cases
Hello,
We have a upsert utility function in Gremlin that gets a name and a label, then either fetches it if it exists or creates it, then sets it with specific values.
The query looks like this:
It usually works just fine, however in some cases it seems to not find existing vertices that have this label and name combo. It then creates a new vertex which is identical, minus the ID which is generated.
We're only seeing this happen in Neptune - no such occurrences in Tinkerpop's local server/client. We have an old version of Neptune (1.0.3.0) and are in the process of upgrading it to the latest version - could this be the cause? Please advise.
12 replies
ATApache TinkerPop
•Created by Shush on 1/30/2023 in #questions
Concatenating details with specified property key
Hey all,
I'm trying to get an array of objects back from Gremlin that looks like the following:
Where
id
, label
and name
are the result of valueMap(true)
, but services
are a result of a out('hasService').hasLabel('Service').fold()
for each service group.
I managed to come close by doing a project
:
However that ends up with a properties
object that I do not want.
What can I do to be able to get the above object? I thought about trying unions, but was not successful - maybe I didn't use it correctly.
Any advice would be appreciated.
Thanks in advance!18 replies
ATApache TinkerPop
•Created by Shush on 1/19/2023 in #questions
Neptune - multiple labels
Hey,
For some reason we had a few objects that had multiple labels. This was done via a huge script and we couldn't find anything that caused it.
Now that the vertices have multiple labels, one of which is correct, is there a way to remove the other labels, or do we have to remove them and recreate the vertices?
From what I could find, the only way to have multiple labels in Neptune is
g.addV('label1'::'label2')
but I'm certain my script never did that. Is there another way in which it's possible?
Please advise.9 replies
ATApache TinkerPop
•Created by Shush on 1/17/2023 in #questions
identity() on Neptune on a vertex
Hey all, hope you're doing well.
I'm seeing an interesting behavior in Neptune (and also local gremlin server) where doing identity() on a vertex returns its id, label and the "properties" object. However the object is undefined even though it has some properties such as userId.
Is this a known behavior?
7 replies