You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2017/06/28 17:50:17 UTC

[1/2] tinkerpop git commit: TINKERPOP-741 Deprecated Transaction.submit(Function)

Repository: tinkerpop
Updated Branches:
  refs/heads/tp32 943658531 -> aa81313ba


TINKERPOP-741 Deprecated Transaction.submit(Function)


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/eba0a2c0
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/eba0a2c0
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/eba0a2c0

Branch: refs/heads/tp32
Commit: eba0a2c0a3dbb8ea1bb4d5358b8c7445cad15c85
Parents: 9af4cce
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Jun 19 11:45:32 2017 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Jun 19 11:51:51 2017 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 docs/src/reference/the-graph.asciidoc           | 20 --------------------
 .../gremlin/structure/Transaction.java          |  4 ++++
 .../structure/util/AbstractTransaction.java     |  2 ++
 4 files changed, 7 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/eba0a2c0/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 4e6dc16..bfb7aa9 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -28,6 +28,7 @@ TinkerPop 3.2.6 (Release Date: NOT OFFICIALLY RELEASED YET)
 
 This release also includes changes from <<release-3-1-8, 3.1.8>>.
 
+* Deprecated `Transaction.submit(Function)`.
 * Fixed `HADOOP_GREMLIN_LIBS` parsing for Windows.
 * Improved GraphSON serialization performance around `VertexProperty`.
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/eba0a2c0/docs/src/reference/the-graph.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-graph.asciidoc b/docs/src/reference/the-graph.asciidoc
index 063c174..b66f5bd 100644
--- a/docs/src/reference/the-graph.asciidoc
+++ b/docs/src/reference/the-graph.asciidoc
@@ -280,26 +280,6 @@ NOTE: It may be important to consult the documentation of the `Graph` implementa
 specifics of how transactions will behave.  TinkerPop allows some latitude in this area and implementations may not have
 the exact same behaviors and link:https://en.wikipedia.org/wiki/ACID[ACID] guarantees.
 
-Retries
-~~~~~~~
-
-There are times when transactions fail.  Failure may be indicative of some permanent condition, but other failures
-might simply require the transaction to be retried for possible future success. The `Transaction` object also exposes
-a method for executing automatic transaction retries:
-
-[gremlin-groovy]
-----
-graph = Neo4jGraph.open('/tmp/neo4j')
-graph.tx().submit {it.addVertex("name","josh")}.retry(10)
-graph.tx().submit {it.addVertex("name","daniel")}.exponentialBackoff(10)
-graph.close()
-----
-
-As shown above, the `submit` method takes a `Function<Graph, R>` which is the unit of work to execute and possibly
-retry on failure.  The method returns a `Transaction.Workload` object which has a number of default methods for common
-retry strategies.  It is also possible to supply a custom retry function if a default one does not suit the required
-purpose.
-
 Threaded Transactions
 ~~~~~~~~~~~~~~~~~~~~~
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/eba0a2c0/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Transaction.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Transaction.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Transaction.java
index 82f3820..ff4232d 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Transaction.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Transaction.java
@@ -63,7 +63,9 @@ public interface Transaction extends AutoCloseable {
     /**
      * Submit a unit of work that represents a transaction returning a {@link Workload} that can be automatically
      * retried in the event of failure.
+     * @deprecated As of release 3.2.6, not replaced.
      */
+    @Deprecated
     public <R> Workload<R> submit(final Function<Graph, R> work);
 
     /**
@@ -228,7 +230,9 @@ public interface Transaction extends AutoCloseable {
      * or the unit of work succeeds with a commit operation.
      *
      * @param <R> The type of the result from the unit of work.
+     * @deprecated As of release 3.2.6, not replaced.
      */
+    @Deprecated
     public static class Workload<R> {
         public static final long DEFAULT_DELAY_MS = 20;
         public static final int DEFAULT_TRIES = 8;

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/eba0a2c0/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/AbstractTransaction.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/AbstractTransaction.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/AbstractTransaction.java
index 00d15c5..35f484e 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/AbstractTransaction.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/AbstractTransaction.java
@@ -125,8 +125,10 @@ public abstract class AbstractTransaction implements Transaction {
 
     /**
      * {@inheritDoc}
+     * @deprecated As of release 3.2.6, not replaced.
      */
     @Override
+    @Deprecated
     public <R> Workload<R> submit(final Function<Graph, R> work) {
         return new Workload<>(g, work);
     }


[2/2] tinkerpop git commit: Merge branch 'TINKERPOP-741' into tp32

Posted by sp...@apache.org.
Merge branch 'TINKERPOP-741' into tp32

Conflicts:
	CHANGELOG.asciidoc


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/aa81313b
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/aa81313b
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/aa81313b

Branch: refs/heads/tp32
Commit: aa81313ba1e031f895c02529573bffd79a999d9c
Parents: 9436585 eba0a2c
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jun 28 13:32:11 2017 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jun 28 13:32:11 2017 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 docs/src/reference/the-graph.asciidoc           | 20 --------------------
 .../gremlin/structure/Transaction.java          |  4 ++++
 .../structure/util/AbstractTransaction.java     |  2 ++
 4 files changed, 7 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/aa81313b/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index 9da8d47,bfb7aa9..ba9f2a7
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -28,11 -28,9 +28,12 @@@ TinkerPop 3.2.6 (Release Date: NOT OFFI
  
  This release also includes changes from <<release-3-1-8, 3.1.8>>.
  
 +* Added annotations to the traversal metrics pretty print.
 +* `EdgeVertexStep` is no longer final and can be extended by providers.
+ * Deprecated `Transaction.submit(Function)`.
  * Fixed `HADOOP_GREMLIN_LIBS` parsing for Windows.
  * Improved GraphSON serialization performance around `VertexProperty`.
 +* Changed some tests in `EventStrategyProcessTest` which were enforcing some unintended semantics around transaction state.
  
  [[release-3-2-5]]
  TinkerPop 3.2.5 (Release Date: June 12, 2017)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/aa81313b/docs/src/reference/the-graph.asciidoc
----------------------------------------------------------------------