Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2751

Transaction: tx.commit() hangs up in javascript client-lib

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      Hi,

      I am trying to get transactions working for a while now, but no matter what i do, i can't get the transaction to commit.

      My Setup:

      • Running gremlin-server 3.6.0 in Docker on localhost using the default-configuration.
        version: '3.7'
        
        services:
          gremlin:
            image: tinkerpop/gremlin-server:3.6.0
            container_name: gremlin
            restart: always
            ports:
              - "8182:8182"
        
        
        
      • Javascript-Gremlin-lib 3.6.0

      Problem:

      Im executing the following code:

       

      const dc = new DriverRemoteConnection('ws://localhost:8182/gremlin', { 'rejectUnauthorized': false});
      const g = traversal().withRemote(dc);
      
      const tx = g.tx();
      const gtx = tx.begin();
      
      try {
        await gtx.addV('person').iterate();
        await gtx.addV('software').iterate();
        await tx.commit();
        // stuck here
        console.log('here')
      } catch (err) {
        await tx.rollback();
      } finally {
        await dc.close();
      }

      The code just will never get past 'await tx.commit()', no error, nothing. It just hangs up there. The code before that is properly executed and the Graph contains both vertices.

      Am I doing anything wrong there, or are transactions not working properly?

      Hope you can help me with that.

       

      Kind regards,
      Stefan

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            bechbd Dave Bechberger
            kuche1991 Stefan Templin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment