tinkerpop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmallette (GitHub) <git...@apache.org>
Subject [GitHub] [tinkerpop] spmallette commented on issue #1094: TINKERPOP-2195: Add finally block in HttpGremlinEndpointHandler to commit transaction
Date Tue, 09 Apr 2019 17:30:43 GMT
I think that your implementation should configure `ReferenceElementStrategy` (which for 3.4.0
is enabled by default):

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?

[ Full content available at: https://github.com/apache/tinkerpop/pull/1094 ]
This message was relayed via gitbox.apache.org for dev@tinkerpop.apache.org

Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message