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

Add finally block in HttpGremlinEndpointHandler to commit transaction

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Do
    • Affects Version/s: 3.4.2
    • Fix Version/s: None
    • Component/s: server
    • Labels:
      None

      Description

      The HttpGremlinEndpointHandler is attempting to commit the transaction before serialisation to be consistent with how things work for websocket, so the transaction will be committed regardless of the serialisation result.

      This's causing a performance problem to our implementation which depends on JPA, because serialisation will require to read the entities again from the database since the transaction has been committed and the objects are still managed by the entity manager.

      An improvement is to do the serialisation first, and add a finally block to the try...catch statement, where transaction commit can take place.

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                moayad86 Moayad Alyaghshi
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: