You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by GitBox <gi...@apache.org> on 2019/04/09 17:31:23 UTC

[GitHub] [tinkerpop] spmallette edited a comment on issue #1094: TINKERPOP-2195: Add finally block in HttpGremlinEndpointHandler to commit transaction

spmallette edited a comment on issue #1094: TINKERPOP-2195: Add finally block in HttpGremlinEndpointHandler to commit transaction
URL: https://github.com/apache/tinkerpop/pull/1094#issuecomment-481354208
 
 
   I think that your implementation should configure `ReferenceElementStrategy` (which for 3.4.0 is enabled by default in Gremlin Server sample init files):
   
   https://github.com/apache/tinkerpop/blob/7062595b72108e9545eaceb62e45b4ea7d946ed6/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/finalization/ReferenceElementStrategy.java
   
   and which will detach your elements at iteration time when building the `ResponseMessage`. No new transaction will be opened on serialization. If you don't like the "references" that `ReferenceElementStrategy` produces then you could write your own strategy to produce "detached" objects just as easily to same effect - just used `DetachedFactory` rather than `ReferenceFactory`:
   
   https://github.com/apache/tinkerpop/blob/7062595b72108e9545eaceb62e45b4ea7d946ed6/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/detached/DetachedFactory.java
   
   That should solve your problem without this change - right?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services