[
https://issues.apache.org/jira/browse/TINKERPOP-3252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18090694#comment-18090694
]
ASF GitHub Bot commented on TINKERPOP-3252:
-------------------------------------------
spmallette commented on code in PR #3471:
URL: https://github.com/apache/tinkerpop/pull/3471#discussion_r3454358593
##########
docs/src/upgrade/release-4.x.x.asciidoc:
##########
@@ -151,6 +151,22 @@ Key behaviors consistent across all GLVs:
See the <<gremlin-drivers-variants,Gremlin Drivers and Variants>> reference
documentation for language-specific
syntax and examples.
+==== `Transaction.open()` Replaced by `begin()`
+
+The `open()` method has been removed from the `Transaction` API. Use `begin()`
instead, which is now the single
+transaction-start method for both embedded and remote contexts. Replace any
`tx.open()` or `g.tx().open()` calls with
+`begin()`. This is a compile-time break and is straightforward to find and fix.
+
+In addition, `begin()` is idempotent: calling it when a transaction is already
open does not start a new transaction
+and does not throw, returning a `TraversalSource` bound to the existing
transaction. For embedded graphs this replaces
+the previous behavior where opening an already-open transaction threw
`transactionAlreadyOpen()`; that exception
Review Comment:
Do we need to say:
> that exceptionfactory (`Transaction.Exceptions.transactionAlreadyOpen()`)
has been removed,
That detail points to something internal to TinkerPop. Doesn't really seem
relevant to me how the exception raises - it's just relevant that the exception
isn't thrown.
> 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)