1

I am having trouble with gremlin .NET

Gremlin server: 3.6.0 Gremlin .NET: 3.6.0

Code:

var gremlinServer = new GremlinServer("localhost", 8182);
ConnectionPoolSettings connectionPoolSettings = new ConnectionPoolSettings()
{
    MaxInProcessPerConnection = 10,
    PoolSize = 30,
    ReconnectionAttempts = 3,
    ReconnectionBaseDelay = TimeSpan.FromMilliseconds(500)
};

var webSocketConfiguration =
    new Action<ClientWebSocketOptions>(options =>
    {
        options.KeepAliveInterval = TimeSpan.FromSeconds(10);
    });


var gremlinClient = new GremlinClient(
    gremlinServer);
var driverRemoteConnection = new DriverRemoteConnection(gremlinClient);
var anonymousTraversalSource = AnonymousTraversalSource.Traversal().WithRemote(driverRemoteConnection);
var remoteTransaction = anonymousTraversalSource.Tx();
var graphTraversalSource = remoteTransaction.Begin();
await graphTraversalSource.AddV("person").Property("name", "jorge").Promise(t => t.Iterate());
await graphTraversalSource.AddV("person").Property("name", "josh").Promise(t => t.Iterate());
await remoteTransaction.CommitAsync().ConfigureAwait(false); // Even without this, vertices are getting created

How I start server: Run "bin\gremlin-server.bat conf\gremlin-server.yaml" on command prompt

Issue: The issue is with "await remoteTransaction.CommitAsync().ConfigureAwait(false);"

  1. Even without this line the vertices are created and I could see it with gremlin console and graphexp enter image description here
  2. This line does not complete, its stuck

Can someone guide on what I am doing incorrect.

1 Answers1

0

CosmosDB does not support newer versions of TinkerPop. You should stick to the 3.4.x line of releases as described in their documentation.

stephen mallette
  • 45,298
  • 5
  • 67
  • 135
  • Actually I think they're using TinkerGraph here. At least I don't see any indication that CosmosDB is used, except for the tag. So, this probably simply fails because TinkerGraph doesn't support transactions, similar to how it's described here: https://issues.apache.org/jira/browse/TINKERPOP-2751 – Florian Hockmann Jun 07 '22 at 08:02