[
https://issues.apache.org/jira/browse/TINKERPOP-3252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18090261#comment-18090261
]
ASF GitHub Bot commented on TINKERPOP-3252:
-------------------------------------------
kenhuuu opened a new pull request, #3471:
URL: https://github.com/apache/tinkerpop/pull/3471
https://issues.apache.org/jira/browse/TINKERPOP-3252
open() and begin() were redundant ways to start a transaction, and the
strict "throw if already open" contract was incompatible with the embedded AUTO
behavior: a read opens the transaction implicitly, so a later explicit begin()
would throw even though the caller did nothing wrong. Collapsing to a single
idempotent begin() makes explicit and implicit opens compose, and gives one
consistent transaction-start verb across embedded, remote, and all GLVs.
close() is made idempotent for the same reason — so the common
try-with-resources / double-close patterns are safe rather than surprising.
The base AbstractTransaction.begin() now opens via a guarded doOpen() so the
contract holds for every provider (not just TinkerGraph) and MANUAL mode is no
longer broken in the base class.
VOTE +1
<!--
Thanks for contributing! Reminders:
+ TARGET the earliest branch where you want the change
3.7-dev -> 3.7.7 (non-breaking only)
3.8-dev -> 3.8.2 (non-breaking only)
master -> 4.0.0
+ Committers will MERGE the PR forward to newer versions
+ ADD entry to the CHANGELOG.asciidoc for the targeted version
Do not reference a JIRA number there
+ ADD JIRA number to title and link in description
+ PRs requires 3 +1s from committers OR
1 +1 and 7 day wait to merge.
+ MORE details: https://s.apache.org/rtnal
-->
> Remove open from transaction API
> --------------------------------
>
> Key: TINKERPOP-3252
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3252
> Project: TinkerPop
> Issue Type: Improvement
> Components: process
> Affects Versions: 4.0.0
> Reporter: Ken Hu
> Priority: Major
>
> The Transaction API has both an open() and begin() which are effectively the
> same except begin also returns a GraphTraversalSource. They aren't both
> needed and clutter the API so remove open().
> Discussed in: https://lists.apache.org/thread/khnz10j0ox640ch2ooq3zkpy4kmo6wxj
--
This message was sent by Atlassian Jira
(v8.20.10#820010)