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 2023/09/18 10:58:26 UTC

[tinkerpop] branch TINKERPOP-2994 updated (dda521ea16 -> 38d8f2e130)

This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a change to branch TINKERPOP-2994
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


    omit dda521ea16 TINKERPOP-2994 Fixed mergeV/E usage with PartitionStrategy
     new 38d8f2e130 TINKERPOP-2994 Fixed mergeV/E usage with PartitionStrategy

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (dda521ea16)
            \
             N -- N -- N   refs/heads/TINKERPOP-2994 (38d8f2e130)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 gremlin-go/driver/strategies_test.go | 2 +-
 gremlin-go/driver/translator_test.go | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


[tinkerpop] 01/01: TINKERPOP-2994 Fixed mergeV/E usage with PartitionStrategy

Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch TINKERPOP-2994
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 38d8f2e130481916e659e60097619fe7264c8f34
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Fri Sep 15 10:08:21 2023 -0400

    TINKERPOP-2994 Fixed mergeV/E usage with PartitionStrategy
    
    Neither PartitionStrategy nor mergeV/E were properly setup to work together so the partition wasn't being respected with those steps.
---
 CHANGELOG.asciidoc                                 |   4 +
 docs/src/dev/developer/for-committers.asciidoc     |   2 +
 .../process/traversal/step/map/MergeStep.java      |  43 +-
 .../strategy/decoration/PartitionStrategy.java     |   3 +
 .../traversal/translator/DotNetTranslator.java     |  17 +-
 .../traversal/translator/PythonTranslator.java     |   4 +-
 .../traversal/step/map/MergeEdgeStepTest.java      |   5 +
 .../traversal/step/map/MergeVertexStepTest.java    |   4 +
 .../Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs |  24 ++
 gremlin-go/driver/cucumber/gremlin.go              |  24 ++
 gremlin-go/driver/strategies.go                    |   4 +-
 gremlin-go/driver/strategies_test.go               |   2 +-
 gremlin-go/driver/translator_test.go               |   2 +-
 gremlin-javascript/build/generate.groovy           |   2 +-
 .../gremlin-javascript/test/cucumber/gremlin.js    |  26 +-
 gremlin-python/src/main/python/radish/gremlin.py   |  24 ++
 .../features/integrated/PartitionStrategy.feature  | 458 +++++++++++++++++++++
 17 files changed, 629 insertions(+), 19 deletions(-)

diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 6ee4818231..492266efdf 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -31,6 +31,10 @@ This release also includes changes from <<release-3-5-8, 3.5.8>>.
 * Fixed a bug in `StarGraph` where `EdgeFilter` did not remove associated Edge Properties.
 * Added translator to the Go GLV.
 * Fixed bug with filtering for `group()` when the side-effect label was defined for it.
+* Fixed bug in `DotNetTranslator` where `PartitionStrategy` usage was not translating properly when specifying the `readPartitions`.
+* Fixed bug in `PythonTranslator` where `Set` syntax was not being generated properly.
+* Fixed bug in configuration object given to `PartitionStrategy` for Go that prevented `readPartitions` from behing set properly.
+* Fixed bug where the `partitionKey` was not being written when using `PartitionStrategy` with `mergeV()` and `mergeE()`
 
 [[release-3-6-5]]
 === TinkerPop 3.6.5 (Release Date: July 31, 2023)
diff --git a/docs/src/dev/developer/for-committers.asciidoc b/docs/src/dev/developer/for-committers.asciidoc
index fbaf0e2314..12d2e3ea31 100644
--- a/docs/src/dev/developer/for-committers.asciidoc
+++ b/docs/src/dev/developer/for-committers.asciidoc
@@ -580,9 +580,11 @@ best example of this sort of test would be one that uses the remote `Lambda` syn
 * `@UserSuppliedEdgeIds` - The scenario relies on the edge IDs specified in the dataset used by the scenario.
 * `@UserSuppliedVertexPropertyIds` - The scenario relies on the vertex property IDs specified in the dataset used by the scenario.
 * `@With*` - The scenario uses some `with()` based configuration like strategies:
+** `@WithPartitionStrategy`
 ** `@WithProductiveByStrategy`
 ** `@WithReadOnlyStrategy`
 ** `@WithSeedStrategy`
+** `@WithSubgraphStrategy`
 
 Tag filters can be applied to Intellij at execution time by adding a system properties of
 `-Dcucumber.filter.tags=<step-filter>`.
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MergeStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MergeStep.java
index cfa53ca73c..c9a1cf1b0d 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MergeStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MergeStep.java
@@ -41,7 +41,9 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.util.Parameters;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.CallbackRegistry;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.Event;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.ListCallbackRegistry;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement;
+import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
 import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalUtil;
 import org.apache.tinkerpop.gremlin.structure.Direction;
 import org.apache.tinkerpop.gremlin.structure.Graph;
@@ -65,6 +67,10 @@ public abstract class MergeStep<S, E, C> extends FlatMapStep<S, E>
 
     protected CallbackRegistry<Event> callbackRegistry;
 
+    private Parameters parameters = new Parameters();
+
+    private boolean usesPartitionStrategy;
+
     public MergeStep(final Traversal.Admin traversal, final boolean isStart) {
         this(traversal, isStart, new IdentityTraversal<>());
     }
@@ -79,6 +85,13 @@ public abstract class MergeStep<S, E, C> extends FlatMapStep<S, E>
         super(traversal);
         this.isStart = isStart;
         this.mergeTraversal = integrateChild(mergeTraversal);
+
+        // determines if this step uses PartitionStrategy. it's not great that merge needs to know about a particular
+        // strategy but if it doesn't then it can't determine if Parameters are being used properly or not. to not have
+        // this check seems to invite problems. in some sense, this is not the first time steps have had to know more
+        // about strategies than is probably preferred - EventStrategy comes to mind
+        this.usesPartitionStrategy = TraversalHelper.getRootTraversal(traversal).
+                getStrategies().getStrategy(PartitionStrategy.class).isPresent();
     }
 
     /**
@@ -144,20 +157,20 @@ public abstract class MergeStep<S, E, C> extends FlatMapStep<S, E>
         return children;
     }
 
+    /**
+     * This implementation should only be used as a mechanism for supporting {@link PartitionStrategy}. Using this
+     * with {@link GraphTraversal#with(String,Object)} will have an ill effect of simply acting like a call to
+     * {@link GraphTraversal#property(Object, Object, Object...)}. No mutating steps currently support use of
+     * {@link GraphTraversal#with(String,Object)} so perhaps it's best to not start with that now.
+     */
     @Override
     public void configure(final Object... keyValues) {
-        // this is a Mutating step but property() should not be folded into this step.  The main issue here is that
-        // this method won't know what step called it - property() or with() or something else so it can't make the
-        // choice easily to throw an exception, write the keys/values to parameters, etc. It really is up to the
-        // caller to make sure it is handled properly at this point. this may best be left as a do-nothing method for
-        // now.
+        this.parameters.set(this, keyValues);
     }
 
     @Override
     public Parameters getParameters() {
-        // merge doesn't take fold ups of property() calls. those need to get treated as regular old PropertyStep
-        // instances. not sure if this should support with() though.....none of the other Mutating steps do.
-        return null;
+        return this.parameters;
     }
 
     @Override
@@ -301,7 +314,19 @@ public abstract class MergeStep<S, E, C> extends FlatMapStep<S, E>
      * null Map == empty Map
      */
     protected Map materializeMap(final Traverser.Admin<S> traverser, Traversal.Admin<S, ?> mapTraversal) {
-        final Map map = (Map) TraversalUtil.apply(traverser, mapTraversal);
+        Map map = (Map) TraversalUtil.apply(traverser, mapTraversal);
+
+        // PartitionStrategy uses parameters as a mechanism for setting the partition key. trying to be as specific
+        // as possible here wrt parameters usage to avoid misuse
+        if (usesPartitionStrategy) {
+            map = null == map ? new LinkedHashMap() : map;
+            for (Map.Entry<Object, List<Object>> entry : parameters.getRaw().entrySet()) {
+                final Object k = entry.getKey();
+                final List<Object> v = entry.getValue();
+                map.put(k, v.get(0));
+            }
+        }
+
         return map == null ? new LinkedHashMap() : map;
     }
 
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategy.java
index 47d03364e7..5be561f11c 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategy.java
@@ -39,6 +39,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.map.EdgeOtherVertexSt
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.EdgeVertexStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.LambdaMapStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MergeEdgeStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MergeVertexStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertiesStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertyMapStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep;
@@ -226,6 +228,7 @@ public final class PartitionStrategy extends AbstractTraversalStrategy<Traversal
         }
 
         final List<Step> stepsToInsertPropertyMutations = traversal.getSteps().stream().filter(step ->
+                step instanceof MergeVertexStep || step instanceof MergeEdgeStep ||
                 step instanceof AddEdgeStep || step instanceof AddVertexStep ||
                         step instanceof AddEdgeStartStep || step instanceof AddVertexStartStep ||
                         (includeMetaProperties && step instanceof AddPropertyStep)
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/translator/DotNetTranslator.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/translator/DotNetTranslator.java
index 20ee8ec65c..8e70b3000b 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/translator/DotNetTranslator.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/translator/DotNetTranslator.java
@@ -34,6 +34,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.TraversalSource;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.TraversalStrategyProxy;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.util.ConnectiveP;
 import org.apache.tinkerpop.gremlin.process.traversal.util.OrP;
 import org.apache.tinkerpop.gremlin.structure.Direction;
@@ -194,8 +195,14 @@ public final class DotNetTranslator implements Translator.ScriptTranslator {
 
         @Override
         protected Script produceScript(final Set<?> o) {
+            return produceScriptForHashSet(o, "object");
+        }
+
+        private Script produceScriptForHashSet(final Set<?> o, final String generic) {
             final Iterator<?> iterator = o.iterator();
-            script.append("new HashSet<object> {");
+            script.append("new HashSet<");
+            script.append(generic);
+            script.append("> {");
 
             while (iterator.hasNext()) {
                 final Object nextItem = iterator.next();
@@ -292,7 +299,13 @@ public final class DotNetTranslator implements Translator.ScriptTranslator {
                     final String k = keys.next();
                     script.append(k);
                     script.append(": ");
-                    convertToScript(o.getConfiguration().getProperty(k));
+
+                    // special handle PartitionStrategy since the Set it uses must be of String for readPartitions
+                    if (k.equals("readPartitions") && o.getStrategyClass().equals(PartitionStrategy.class))
+                        produceScriptForHashSet((Set) o.getConfiguration().getProperty(k), "string");
+                    else
+                        convertToScript(o.getConfiguration().getProperty(k));
+
                     if (keys.hasNext())
                         script.append(", ");
                 }
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/translator/PythonTranslator.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/translator/PythonTranslator.java
index 41f8382643..58033de7f7 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/translator/PythonTranslator.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/translator/PythonTranslator.java
@@ -205,13 +205,13 @@ public final class PythonTranslator implements Translator.ScriptTranslator {
         @Override
         protected Script produceScript(final Set<?> o) {
             final Iterator<?> iterator = o.iterator();
-            script.append("set(");
+            script.append("set((");
             while(iterator.hasNext()) {
                 convertToScript(iterator.next());
                 if (iterator.hasNext())
                     script.append(",");
             }
-            return script.append(")");
+            return script.append("))");
         }
 
         @Override
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MergeEdgeStepTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MergeEdgeStepTest.java
index 76d95b1b06..f248d7d17e 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MergeEdgeStepTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MergeEdgeStepTest.java
@@ -21,7 +21,10 @@ package org.apache.tinkerpop.gremlin.process.traversal.step.map;
 import org.apache.tinkerpop.gremlin.process.traversal.Merge;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalSideEffects;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyStep;
+import org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalStrategies;
 import org.apache.tinkerpop.gremlin.structure.Direction;
 import org.apache.tinkerpop.gremlin.structure.T;
 import org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceVertex;
@@ -116,6 +119,8 @@ public class MergeEdgeStepTest {
     public void shouldWorkWithImmutableMap() {
         final Traversal.Admin traversal = mock(Traversal.Admin.class);
         when(traversal.getTraverserSetSupplier()).thenReturn(TraverserSetSupplier.instance());
+        when(traversal.getParent()).thenReturn(EmptyStep.instance());
+        when(traversal.getStrategies()).thenReturn(new DefaultTraversalStrategies());
         final Traverser.Admin traverser = mock(Traverser.Admin.class);
         when(traverser.split()).thenReturn(mock(Traverser.Admin.class));
         final Traversal.Admin onCreateTraversal = mock(Traversal.Admin.class);
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MergeVertexStepTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MergeVertexStepTest.java
index f5d640613b..fac6688b06 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MergeVertexStepTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MergeVertexStepTest.java
@@ -22,6 +22,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.Merge;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalSideEffects;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyStep;
+import org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalStrategies;
 import org.apache.tinkerpop.gremlin.structure.Direction;
 import org.apache.tinkerpop.gremlin.structure.T;
 import org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceVertex;
@@ -90,6 +92,8 @@ public class MergeVertexStepTest {
     public void shouldWorkWithImmutableMap() {
         final Traversal.Admin traversal = mock(Traversal.Admin.class);
         when(traversal.getTraverserSetSupplier()).thenReturn(TraverserSetSupplier.instance());
+        when(traversal.getParent()).thenReturn(EmptyStep.instance());
+        when(traversal.getStrategies()).thenReturn(new DefaultTraversalStrategies());
         final Traverser.Admin traverser = mock(Traverser.Admin.class);
         when(traverser.split()).thenReturn(mock(Traverser.Admin.class));
         final Traversal.Admin onCreateTraversal = mock(Traversal.Admin.class);
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
index 473c2a4908..24e94363bd 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
@@ -355,6 +355,30 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
                {"g_V_asXnX_whereXorXselectXnX_hasLabelXsoftwareX_selectXnX_hasLabelXpersonXXX_selectXnX_byXnameX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().As("n").Where(__.Or(__.Select<object>("n").HasLabel("software"),__.Select<object>("n").HasLabel("person"))).Select<object>("n").By("name")}}, 
                {"g_V_coworker", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().HasLabel("person").Filter(__.OutE("created")).Aggregate("p").As("p1").Values<object>("name").As("p1n").Select<object>("p").Unfold<object>().Where(P.Neq("p1")).As("p2").Values<object>("name").As("p2n").Select<object>("p2").Out("created").Choose<object>(__.In("created").Where(P.Eq("p1")),__.Values<object>("name"),__.Constant<object>(p["xx1"])).Group<object,object>(). [...]
                {"g_V_coworker_with_midV", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().HasLabel("person").Filter(__.OutE("created")).As("p1").V().HasLabel("person").Where(P.Neq("p1")).Filter(__.OutE("created")).As("p2").Map<object>(__.Out("created").Where(__.In("created").As("p1")).Values<object>("name").Fold()).Group<object,object>().By(__.Select<object>("p1").By("name")).By(__.Group<object,object>().By(__.Select<object>("p2").By("name")). [...]
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_V_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("_partition","a").Property("name","alice").AddV("person").Property("_partition","b").Property("name","bob"), (g,p) =>g.WithStrategies(new PartitionStrategy(includeMetaProperties: false, partitionKey: "_partition", readPartitions: new HashSet<string> {"a"}, writePartition: "a")).V().Values<object>("na [...]
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_a_bXX_V_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("_partition","a").Property("name","alice").AddV("person").Property("_partition","b").Property("name","bob"), (g,p) =>g.WithStrategies(new PartitionStrategy(includeMetaProperties: false, partitionKey: "_partition", readPartitions: new HashSet<string> {"a", "b"}, writePartition: "a")).V().Values<obje [...]
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_cXX_V_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("_partition","a").Property("name","alice").AddV("person").Property("_partition","b").Property("name","bob"), (g,p) =>g.WithStrategies(new PartitionStrategy(includeMetaProperties: false, partitionKey: "_partition", readPartitions: new HashSet<string> {"c"}, writePartition: "a")).V().Values<object>("na [...]
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_V_bothE_weight", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("_partition","a").Property("name","alice").As("a").AddV("person").Property("_partition","b").Property("name","bob").As("b").AddE("knows").From("a").To("b").Property("_partition","a").Property("weight",1).AddE("knows").From("b").To("a").Property("_partition","b").Property("weight",2), (g,p) => [...]
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_bXX_V_bothE_weight", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("_partition","a").Property("name","alice").As("a").AddV("person").Property("_partition","b").Property("name","bob").As("b").AddE("knows").From("a").To("b").Property("_partition","a").Property("weight",1).AddE("knows").From("b").To("a").Property("_partition","b").Property("weight",2), (g,p) => [...]
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_a_bXX_V_bothE_dedup_weight", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("_partition","a").Property("name","alice").As("a").AddV("person").Property("_partition","b").Property("name","bob").As("b").AddE("knows").From("a").To("b").Property("_partition","a").Property("weight",1).AddE("knows").From("b").To("a").Property("_partition","b").Property("weight",2),  [...]
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_cXX_V_bothE_weight", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("_partition","a").Property("name","alice").As("a").AddV("person").Property("_partition","b").Property("name","bob").As("b").AddE("knows").From("a").To("b").Property("_partition","a").Property("weight",1).AddE("knows").From("b").To("a").Property("_partition","b").Property("weight",2), (g,p) => [...]
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_V_both_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("_partition","a").Property("name","alice").As("a").AddV("person").Property("_partition","b").Property("name","bob").As("b").AddE("knows").From("a").To("b").Property("_partition","a").Property("weight",1).AddE("knows").From("b").To("a").Property("_partition","b").Property("weight",2), (g,p) =>g.W [...]
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_bXX_V_both_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("_partition","a").Property("name","alice").As("a").AddV("person").Property("_partition","b").Property("name","bob").As("b").AddE("knows").From("a").To("b").Property("_partition","a").Property("weight",1).AddE("knows").From("b").To("a").Property("_partition","b").Property("weight",2), (g,p) =>g.W [...]
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_a_bXX_V_both_dedup_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("_partition","a").Property("name","alice").As("a").AddV("person").Property("_partition","b").Property("name","bob").As("b").AddE("knows").From("a").To("b").Property("_partition","a").Property("weight",1).AddE("knows").From("b").To("a").Property("_partition","b").Property("weight",2), (g, [...]
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_cXX_V_both_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("_partition","a").Property("name","alice").As("a").AddV("person").Property("_partition","b").Property("name","bob").As("b").AddE("knows").From("a").To("b").Property("_partition","a").Property("weight",1).AddE("knows").From("b").To("a").Property("_partition","b").Property("weight",2), (g,p) =>g.W [...]
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_V_out_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("_partition","a").Property("name","alice").As("a").AddV("person").Property("_partition","b").Property("name","bob").As("b").AddE("knows").From("a").To("b").Property("_partition","a").Property("weight",1).AddE("knows").From("b").To("a").Property("_partition","b").Property("weight",2), (g,p) =>g.Wi [...]
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_bXX_V_in_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("_partition","a").Property("name","alice").As("a").AddV("person").Property("_partition","b").Property("name","bob").As("b").AddE("knows").From("a").To("b").Property("_partition","a").Property("weight",1).AddE("knows").From("b").To("a").Property("_partition","b").Property("weight",2), (g,p) =>g.Wit [...]
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_a_bXX_V_out_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("_partition","a").Property("name","alice").As("a").AddV("person").Property("_partition","b").Property("name","bob").As("b").AddE("knows").From("a").To("b").Property("_partition","a").Property("weight",1).AddE("knows").From("b").To("a").Property("_partition","b").Property("weight",2), (g,p) =>g. [...]
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_cXX_V_out_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("_partition","a").Property("name","alice").As("a").AddV("person").Property("_partition","b").Property("name","bob").As("b").AddE("knows").From("a").To("b").Property("_partition","a").Property("weight",1).AddE("knows").From("b").To("a").Property("_partition","b").Property("weight",2), (g,p) =>g.Wi [...]
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_addVXpersonX_propertyXname_aliceX_addXselfX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new PartitionStrategy(includeMetaProperties: false, partitionKey: "_partition", readPartitions: new HashSet<string> {"a"}, writePartition: "a")).AddV("person").Property("name","alice").AddE("self"), (g,p) =>g.V().Has("person","name","alice").Has("_partition","a"), (g,p) => [...]
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_injectXzeroX_addVXpersonX_propertyXname_aliceX_addXselfX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new PartitionStrategy(includeMetaProperties: false, partitionKey: "_partition", readPartitions: new HashSet<string> {"a"}, writePartition: "a")).Inject(0).AddV("person").Property("name","alice").AddE("self"), (g,p) =>g.V().Has("person","name","alice").Has("_pa [...]
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_mergeV", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new PartitionStrategy(includeMetaProperties: false, partitionKey: "_partition", readPartitions: new HashSet<string> {"a"}, writePartition: "a")).MergeV((IDictionary<object,object>) p["xx1"]), (g,p) =>g.V().Has("person","name","alice").Has("_partition","a"), (g,p) =>g.V()}}, 
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_injectX0X_mergeV", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new PartitionStrategy(includeMetaProperties: false, partitionKey: "_partition", readPartitions: new HashSet<string> {"a"}, writePartition: "a")).Inject(0).MergeV((IDictionary<object,object>) p["xx1"]), (g,p) =>g.V().Has("person","name","alice").Has("_partition","a"), (g,p) =>g.V()}}, 
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_mergeE", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("_partition","a").Property("name","alice").AddV("person").Property("_partition","a").Property("name","bob"), (g,p) =>g.WithStrategies(new PartitionStrategy(includeMetaProperties: false, partitionKey: "_partition", readPartitions: new HashSet<string> {"a"}, writePartition: "a")).MergeE((IDictionary<ob [...]
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_injectX0XmergeE", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("_partition","a").Property("name","alice").AddV("person").Property("_partition","a").Property("name","bob"), (g,p) =>g.WithStrategies(new PartitionStrategy(includeMetaProperties: false, partitionKey: "_partition", readPartitions: new HashSet<string> {"a"}, writePartition: "a")).Inject(0).Mer [...]
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_mergeVXlabel_person_name_aliceX_optionXonMatch_name_bobX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("_partition","a").Property("name","alice").AddV("person").Property("_partition","b").Property("name","alice"), (g,p) =>g.WithStrategies(new PartitionStrategy(includeMetaProperties: false, partitionKey: "_partition", readPartitions: new HashSet<string> [...]
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_mergeV_optionXonCreateX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("_partition","b").Property("name","alice"), (g,p) =>g.WithStrategies(new PartitionStrategy(includeMetaProperties: false, partitionKey: "_partition", readPartitions: new HashSet<string> {"a"}, writePartition: "a")).MergeV((IDictionary<object,object>) p["xx1"]).Option(Merge.OnCreate, ( [...]
+               {"g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_injectX0X__mergeV_optionXonCreateX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("_partition","b").Property("name","alice"), (g,p) =>g.WithStrategies(new PartitionStrategy(includeMetaProperties: false, partitionKey: "_partition", readPartitions: new HashSet<string> {"a"}, writePartition: "a")).Inject(0).MergeV((IDictionary<object,object>) p["xx1"]).Opt [...]
                {"g_V_shortestpath", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().As("v").Both().As("v").Project<object>("src","tgt","p").By(__.Select<object>(Pop.First,"v")).By(__.Select<object>(Pop.Last,"v")).By(__.Select<object>(Pop.All,"v")).As("triple").Group("x").By(__.Select<object>("src","tgt")).By(__.Select<object>("p").Fold()).Select<object>("tgt").Barrier().Repeat(__.Both().As("v").Project<object>("src","tgt","p").By(__.Select<obj [...]
                {"g_withStrategiesXReadOnlyStrategyX_V", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new ReadOnlyStrategy()).V()}}, 
                {"g_withStrategiesXReadOnlyStrategyX_V_outXknowsX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new ReadOnlyStrategy()).V().Out("knows").Values<object>("name")}}, 
diff --git a/gremlin-go/driver/cucumber/gremlin.go b/gremlin-go/driver/cucumber/gremlin.go
index bfa5ac1c73..35971369d8 100644
--- a/gremlin-go/driver/cucumber/gremlin.go
+++ b/gremlin-go/driver/cucumber/gremlin.go
@@ -326,6 +326,30 @@ var translationMap = map[string][]func(g *gremlingo.GraphTraversalSource, p map[
     "g_V_asXnX_whereXorXselectXnX_hasLabelXsoftwareX_selectXnX_hasLabelXpersonXXX_selectXnX_byXnameX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().As("n").Where(gremlingo.T__.Or(gremlingo.T__.Select("n").HasLabel("software"), gremlingo.T__.Select("n").HasLabel("person"))).Select("n").By("name")}}, 
     "g_V_coworker": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().HasLabel("person").Filter(gremlingo.T__.OutE("created")).Aggregate("p").As("p1").Values("name").As("p1n").Select("p").Unfold().Where(gremlingo.P.Neq("p1")).As("p2").Values("name").As("p2n").Select("p2").Out("created").Choose(gremlingo.T__.In("created").Where(gremlingo.P.Eq("p1")), gremlingo.T__.Values("name"), gremlingo.T__.Constant(p["xx1"])).Group().By(gremling [...]
     "g_V_coworker_with_midV": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().HasLabel("person").Filter(gremlingo.T__.OutE("created")).As("p1").V().HasLabel("person").Where(gremlingo.P.Neq("p1")).Filter(gremlingo.T__.OutE("created")).As("p2").Map(gremlingo.T__.Out("created").Where(gremlingo.T__.In("created").As("p1")).Values("name").Fold()).Group().By(gremlingo.T__.Select("p1").By("name")).By(gremlingo.T__.Group().By(gremlingo.T_ [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_V_name": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.AddV("person").Property("_partition", "a").Property("name", "alice").AddV("person").Property("_partition", "b").Property("name", "bob")}, func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.PartitionStrategy(gremlingo.PartitionStrategyConfig{Includ [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_a_bXX_V_name": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.AddV("person").Property("_partition", "a").Property("name", "alice").AddV("person").Property("_partition", "b").Property("name", "bob")}, func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.PartitionStrategy(gremlingo.PartitionStrategyConfig{Incl [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_cXX_V_name": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.AddV("person").Property("_partition", "a").Property("name", "alice").AddV("person").Property("_partition", "b").Property("name", "bob")}, func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.PartitionStrategy(gremlingo.PartitionStrategyConfig{Includ [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_V_bothE_weight": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.AddV("person").Property("_partition", "a").Property("name", "alice").As("a").AddV("person").Property("_partition", "b").Property("name", "bob").As("b").AddE("knows").From("a").To("b").Property("_partition", "a").Property("weight", 1).AddE("knows").From("b").To("a").Property("_partition", "b").Property("weight", 2) [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_bXX_V_bothE_weight": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.AddV("person").Property("_partition", "a").Property("name", "alice").As("a").AddV("person").Property("_partition", "b").Property("name", "bob").As("b").AddE("knows").From("a").To("b").Property("_partition", "a").Property("weight", 1).AddE("knows").From("b").To("a").Property("_partition", "b").Property("weight", 2) [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_a_bXX_V_bothE_dedup_weight": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.AddV("person").Property("_partition", "a").Property("name", "alice").As("a").AddV("person").Property("_partition", "b").Property("name", "bob").As("b").AddE("knows").From("a").To("b").Property("_partition", "a").Property("weight", 1).AddE("knows").From("b").To("a").Property("_partition", "b").Property("wei [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_cXX_V_bothE_weight": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.AddV("person").Property("_partition", "a").Property("name", "alice").As("a").AddV("person").Property("_partition", "b").Property("name", "bob").As("b").AddE("knows").From("a").To("b").Property("_partition", "a").Property("weight", 1).AddE("knows").From("b").To("a").Property("_partition", "b").Property("weight", 2) [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_V_both_name": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.AddV("person").Property("_partition", "a").Property("name", "alice").As("a").AddV("person").Property("_partition", "b").Property("name", "bob").As("b").AddE("knows").From("a").To("b").Property("_partition", "a").Property("weight", 1).AddE("knows").From("b").To("a").Property("_partition", "b").Property("weight", 2)},  [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_bXX_V_both_name": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.AddV("person").Property("_partition", "a").Property("name", "alice").As("a").AddV("person").Property("_partition", "b").Property("name", "bob").As("b").AddE("knows").From("a").To("b").Property("_partition", "a").Property("weight", 1).AddE("knows").From("b").To("a").Property("_partition", "b").Property("weight", 2)},  [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_a_bXX_V_both_dedup_name": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.AddV("person").Property("_partition", "a").Property("name", "alice").As("a").AddV("person").Property("_partition", "b").Property("name", "bob").As("b").AddE("knows").From("a").To("b").Property("_partition", "a").Property("weight", 1).AddE("knows").From("b").To("a").Property("_partition", "b").Property("weight [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_cXX_V_both_name": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.AddV("person").Property("_partition", "a").Property("name", "alice").As("a").AddV("person").Property("_partition", "b").Property("name", "bob").As("b").AddE("knows").From("a").To("b").Property("_partition", "a").Property("weight", 1).AddE("knows").From("b").To("a").Property("_partition", "b").Property("weight", 2)},  [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_V_out_name": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.AddV("person").Property("_partition", "a").Property("name", "alice").As("a").AddV("person").Property("_partition", "b").Property("name", "bob").As("b").AddE("knows").From("a").To("b").Property("_partition", "a").Property("weight", 1).AddE("knows").From("b").To("a").Property("_partition", "b").Property("weight", 2)}, f [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_bXX_V_in_name": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.AddV("person").Property("_partition", "a").Property("name", "alice").As("a").AddV("person").Property("_partition", "b").Property("name", "bob").As("b").AddE("knows").From("a").To("b").Property("_partition", "a").Property("weight", 1).AddE("knows").From("b").To("a").Property("_partition", "b").Property("weight", 2)}, fu [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_a_bXX_V_out_name": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.AddV("person").Property("_partition", "a").Property("name", "alice").As("a").AddV("person").Property("_partition", "b").Property("name", "bob").As("b").AddE("knows").From("a").To("b").Property("_partition", "a").Property("weight", 1).AddE("knows").From("b").To("a").Property("_partition", "b").Property("weight", 2)}, [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_cXX_V_out_name": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.AddV("person").Property("_partition", "a").Property("name", "alice").As("a").AddV("person").Property("_partition", "b").Property("name", "bob").As("b").AddE("knows").From("a").To("b").Property("_partition", "a").Property("weight", 1).AddE("knows").From("b").To("a").Property("_partition", "b").Property("weight", 2)}, f [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_addVXpersonX_propertyXname_aliceX_addXselfX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.PartitionStrategy(gremlingo.PartitionStrategyConfig{IncludeMetaProperties: false, PartitionKey: "_partition", ReadPartitions: gremlingo.NewSimpleSet("a"), WritePartition: "a"})).AddV("person").Property("name", "alice").AddE("self")}, func(g *gremlingo.GraphTrav [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_injectXzeroX_addVXpersonX_propertyXname_aliceX_addXselfX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.PartitionStrategy(gremlingo.PartitionStrategyConfig{IncludeMetaProperties: false, PartitionKey: "_partition", ReadPartitions: gremlingo.NewSimpleSet("a"), WritePartition: "a"})).Inject(0).AddV("person").Property("name", "alice").AddE("self")}, func [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_mergeV": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.PartitionStrategy(gremlingo.PartitionStrategyConfig{IncludeMetaProperties: false, PartitionKey: "_partition", ReadPartitions: gremlingo.NewSimpleSet("a"), WritePartition: "a"})).MergeV(p["xx1"])}, func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_injectX0X_mergeV": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.PartitionStrategy(gremlingo.PartitionStrategyConfig{IncludeMetaProperties: false, PartitionKey: "_partition", ReadPartitions: gremlingo.NewSimpleSet("a"), WritePartition: "a"})).Inject(0).MergeV(p["xx1"])}, func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.Grap [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_mergeE": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.AddV("person").Property("_partition", "a").Property("name", "alice").AddV("person").Property("_partition", "a").Property("name", "bob")}, func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.PartitionStrategy(gremlingo.PartitionStrategyConfig{Includ [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_injectX0XmergeE": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.AddV("person").Property("_partition", "a").Property("name", "alice").AddV("person").Property("_partition", "a").Property("name", "bob")}, func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.PartitionStrategy(gremlingo.PartitionStrategyConf [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_mergeVXlabel_person_name_aliceX_optionXonMatch_name_bobX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.AddV("person").Property("_partition", "a").Property("name", "alice").AddV("person").Property("_partition", "b").Property("name", "alice")}, func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.Partit [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_mergeV_optionXonCreateX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.AddV("person").Property("_partition", "b").Property("name", "alice")}, func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.PartitionStrategy(gremlingo.PartitionStrategyConfig{IncludeMetaProperties: false, PartitionKey: "_partition" [...]
+    "g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_injectX0X__mergeV_optionXonCreateX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.AddV("person").Property("_partition", "b").Property("name", "alice")}, func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.PartitionStrategy(gremlingo.PartitionStrategyConfig{IncludeMetaProperties: false, PartitionKey: " [...]
     "g_V_shortestpath": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().As("v").Both().As("v").Project("src", "tgt", "p").By(gremlingo.T__.Select(gremlingo.Pop.First, "v")).By(gremlingo.T__.Select(gremlingo.Pop.Last, "v")).By(gremlingo.T__.Select(gremlingo.Pop.All, "v")).As("triple").Group("x").By(gremlingo.T__.Select("src", "tgt")).By(gremlingo.T__.Select("p").Fold()).Select("tgt").Barrier().Repeat(gremlingo.T__.Both().As("v").P [...]
     "g_withStrategiesXReadOnlyStrategyX_V": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.ReadOnlyStrategy()).V()}}, 
     "g_withStrategiesXReadOnlyStrategyX_V_outXknowsX_name": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.ReadOnlyStrategy()).V().Out("knows").Values("name")}}, 
diff --git a/gremlin-go/driver/strategies.go b/gremlin-go/driver/strategies.go
index 4e370a8c4f..7c7a5f3182 100644
--- a/gremlin-go/driver/strategies.go
+++ b/gremlin-go/driver/strategies.go
@@ -86,7 +86,7 @@ func PartitionStrategy(config PartitionStrategyConfig) TraversalStrategy {
 	if config.WritePartition != "" {
 		configMap["writePartition"] = config.WritePartition
 	}
-	if len(config.ReadPartitions) != 0 {
+	if len(config.ReadPartitions.ToSlice()) != 0 {
 		configMap["readPartitions"] = config.ReadPartitions
 	}
 	return &traversalStrategy{name: decorationNamespace + "PartitionStrategy", configuration: configMap}
@@ -97,7 +97,7 @@ func PartitionStrategy(config PartitionStrategyConfig) TraversalStrategy {
 type PartitionStrategyConfig struct {
 	PartitionKey          string
 	WritePartition        string
-	ReadPartitions        []string
+	ReadPartitions        Set
 	IncludeMetaProperties bool
 }
 
diff --git a/gremlin-go/driver/strategies_test.go b/gremlin-go/driver/strategies_test.go
index 01a56b0b86..188d953c9d 100644
--- a/gremlin-go/driver/strategies_test.go
+++ b/gremlin-go/driver/strategies_test.go
@@ -76,7 +76,7 @@ func TestStrategy(t *testing.T) {
 		config := PartitionStrategyConfig{
 			PartitionKey:          "partition",
 			WritePartition:        "write",
-			ReadPartitions:        []string{"read"},
+			ReadPartitions:        NewSimpleSet("read"),
 			IncludeMetaProperties: true,
 		}
 		count, err := g.WithStrategies(PartitionStrategy(config)).V().Count().ToList()
diff --git a/gremlin-go/driver/translator_test.go b/gremlin-go/driver/translator_test.go
index 019247f79e..907ebf8943 100644
--- a/gremlin-go/driver/translator_test.go
+++ b/gremlin-go/driver/translator_test.go
@@ -602,7 +602,7 @@ func Test_translator_Translate(t *testing.T) {
 		},
 		{
 			assert: func(g *GraphTraversalSource) *GraphTraversal {
-				return g.WithStrategies(PartitionStrategy(PartitionStrategyConfig{PartitionKey: "partition", WritePartition: "a", ReadPartitions: []string{"a"}})).AddV("test")
+				return g.WithStrategies(PartitionStrategy(PartitionStrategyConfig{PartitionKey: "partition", WritePartition: "a", ReadPartitions: NewSimpleSet("a")})).AddV("test")
 			},
 			containsRandomClassParams: true,
 			equals:                    "g.withStrategies(new PartitionStrategy(includeMetaProperties:false,partitionKey:'partition',writePartition:'a',readPartitions:['a'])).addV('test')",
diff --git a/gremlin-javascript/build/generate.groovy b/gremlin-javascript/build/generate.groovy
index c726d0e2ff..deb9687163 100644
--- a/gremlin-javascript/build/generate.groovy
+++ b/gremlin-javascript/build/generate.groovy
@@ -91,7 +91,7 @@ radishGremlinFile.withWriter('UTF-8') { Writer writer ->
     writer.writeLine(
                     'const graphTraversalModule = require(\'../../lib/process/graph-traversal\');\n' +
                     'const traversalModule = require(\'../../lib/process/traversal\');\n' +
-                    'const { TraversalStrategies, VertexProgramStrategy, OptionsStrategy, ReadOnlyStrategy, SeedStrategy, SubgraphStrategy, ProductiveByStrategy } = require(\'../../lib/process/traversal-strategy\');\n' +
+                    'const { TraversalStrategies, VertexProgramStrategy, OptionsStrategy, PartitionStrategy, ReadOnlyStrategy, SeedStrategy, SubgraphStrategy, ProductiveByStrategy } = require(\'../../lib/process/traversal-strategy\');\n' +
                     'const __ = graphTraversalModule.statics;\n' +
                     'const Barrier = traversalModule.barrier\n' +
                     'const Cardinality = traversalModule.cardinality\n' +
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js
index ef2936d14f..b180e15fa6 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js
@@ -26,7 +26,7 @@
 
 const graphTraversalModule = require('../../lib/process/graph-traversal');
 const traversalModule = require('../../lib/process/traversal');
-const { TraversalStrategies, VertexProgramStrategy, OptionsStrategy, ReadOnlyStrategy, SeedStrategy, SubgraphStrategy, ProductiveByStrategy } = require('../../lib/process/traversal-strategy');
+const { TraversalStrategies, VertexProgramStrategy, OptionsStrategy, PartitionStrategy, ReadOnlyStrategy, SeedStrategy, SubgraphStrategy, ProductiveByStrategy } = require('../../lib/process/traversal-strategy');
 const __ = graphTraversalModule.statics;
 const Barrier = traversalModule.barrier
 const Cardinality = traversalModule.cardinality
@@ -345,6 +345,30 @@ const gremlins = {
     g_V_asXnX_whereXorXselectXnX_hasLabelXsoftwareX_selectXnX_hasLabelXpersonXXX_selectXnX_byXnameX: [function({g}) { return g.V().as("n").where(__.or(__.select("n").hasLabel("software"),__.select("n").hasLabel("person"))).select("n").by("name") }], 
     g_V_coworker: [function({g, xx1}) { return g.V().hasLabel("person").filter(__.outE("created")).aggregate("p").as("p1").values("name").as("p1n").select("p").unfold().where(P.neq("p1")).as("p2").values("name").as("p2n").select("p2").out("created").choose(__.in_("created").where(P.eq("p1")),__.values("name"),__.constant(xx1)).group().by(__.select("p1n")).by(__.group().by(__.select("p2n")).by(__.unfold().fold().project("numCoCreated","coCreated").by(__.count(Scope.local)).by())).unfold() }], 
     g_V_coworker_with_midV: [function({g}) { return g.V().hasLabel("person").filter(__.outE("created")).as("p1").V().hasLabel("person").where(P.neq("p1")).filter(__.outE("created")).as("p2").map(__.out("created").where(__.in_("created").as("p1")).values("name").fold()).group().by(__.select("p1").by("name")).by(__.group().by(__.select("p2").by("name")).by(__.project("numCoCreated","coCreated").by(__.count(Scope.local)).by())).unfold() }], 
+    g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_V_name: [function({g}) { return g.addV("person").property("_partition","a").property("name","alice").addV("person").property("_partition","b").property("name","bob") }, function({g}) { return g.withStrategies(new PartitionStrategy({includeMetaProperties:false,partitionKey:"_partition",readPartitions:["a"],writePartition:"a"})).V().values("name") }], 
+    g_withStrategiesXPartitionStrategyXwrite_a_read_a_bXX_V_name: [function({g}) { return g.addV("person").property("_partition","a").property("name","alice").addV("person").property("_partition","b").property("name","bob") }, function({g}) { return g.withStrategies(new PartitionStrategy({includeMetaProperties:false,partitionKey:"_partition",readPartitions:["a", "b"],writePartition:"a"})).V().values("name") }], 
+    g_withStrategiesXPartitionStrategyXwrite_a_read_cXX_V_name: [function({g}) { return g.addV("person").property("_partition","a").property("name","alice").addV("person").property("_partition","b").property("name","bob") }, function({g}) { return g.withStrategies(new PartitionStrategy({includeMetaProperties:false,partitionKey:"_partition",readPartitions:["c"],writePartition:"a"})).V().values("name") }], 
+    g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_V_bothE_weight: [function({g}) { return g.addV("person").property("_partition","a").property("name","alice").as("a").addV("person").property("_partition","b").property("name","bob").as("b").addE("knows").from_("a").to("b").property("_partition","a").property("weight",1).addE("knows").from_("b").to("a").property("_partition","b").property("weight",2) }, function({g}) { return g.withStrategies(new PartitionStrategy({includeMetaPropert [...]
+    g_withStrategiesXPartitionStrategyXwrite_a_read_bXX_V_bothE_weight: [function({g}) { return g.addV("person").property("_partition","a").property("name","alice").as("a").addV("person").property("_partition","b").property("name","bob").as("b").addE("knows").from_("a").to("b").property("_partition","a").property("weight",1).addE("knows").from_("b").to("a").property("_partition","b").property("weight",2) }, function({g}) { return g.withStrategies(new PartitionStrategy({includeMetaPropert [...]
+    g_withStrategiesXPartitionStrategyXwrite_a_read_a_bXX_V_bothE_dedup_weight: [function({g}) { return g.addV("person").property("_partition","a").property("name","alice").as("a").addV("person").property("_partition","b").property("name","bob").as("b").addE("knows").from_("a").to("b").property("_partition","a").property("weight",1).addE("knows").from_("b").to("a").property("_partition","b").property("weight",2) }, function({g}) { return g.withStrategies(new PartitionStrategy({includeMet [...]
+    g_withStrategiesXPartitionStrategyXwrite_a_read_cXX_V_bothE_weight: [function({g}) { return g.addV("person").property("_partition","a").property("name","alice").as("a").addV("person").property("_partition","b").property("name","bob").as("b").addE("knows").from_("a").to("b").property("_partition","a").property("weight",1).addE("knows").from_("b").to("a").property("_partition","b").property("weight",2) }, function({g}) { return g.withStrategies(new PartitionStrategy({includeMetaPropert [...]
+    g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_V_both_name: [function({g}) { return g.addV("person").property("_partition","a").property("name","alice").as("a").addV("person").property("_partition","b").property("name","bob").as("b").addE("knows").from_("a").to("b").property("_partition","a").property("weight",1).addE("knows").from_("b").to("a").property("_partition","b").property("weight",2) }, function({g}) { return g.withStrategies(new PartitionStrategy({includeMetaProperties [...]
+    g_withStrategiesXPartitionStrategyXwrite_a_read_bXX_V_both_name: [function({g}) { return g.addV("person").property("_partition","a").property("name","alice").as("a").addV("person").property("_partition","b").property("name","bob").as("b").addE("knows").from_("a").to("b").property("_partition","a").property("weight",1).addE("knows").from_("b").to("a").property("_partition","b").property("weight",2) }, function({g}) { return g.withStrategies(new PartitionStrategy({includeMetaProperties [...]
+    g_withStrategiesXPartitionStrategyXwrite_a_read_a_bXX_V_both_dedup_name: [function({g}) { return g.addV("person").property("_partition","a").property("name","alice").as("a").addV("person").property("_partition","b").property("name","bob").as("b").addE("knows").from_("a").to("b").property("_partition","a").property("weight",1).addE("knows").from_("b").to("a").property("_partition","b").property("weight",2) }, function({g}) { return g.withStrategies(new PartitionStrategy({includeMetaPr [...]
+    g_withStrategiesXPartitionStrategyXwrite_a_read_cXX_V_both_name: [function({g}) { return g.addV("person").property("_partition","a").property("name","alice").as("a").addV("person").property("_partition","b").property("name","bob").as("b").addE("knows").from_("a").to("b").property("_partition","a").property("weight",1).addE("knows").from_("b").to("a").property("_partition","b").property("weight",2) }, function({g}) { return g.withStrategies(new PartitionStrategy({includeMetaProperties [...]
+    g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_V_out_name: [function({g}) { return g.addV("person").property("_partition","a").property("name","alice").as("a").addV("person").property("_partition","b").property("name","bob").as("b").addE("knows").from_("a").to("b").property("_partition","a").property("weight",1).addE("knows").from_("b").to("a").property("_partition","b").property("weight",2) }, function({g}) { return g.withStrategies(new PartitionStrategy({includeMetaProperties: [...]
+    g_withStrategiesXPartitionStrategyXwrite_a_read_bXX_V_in_name: [function({g}) { return g.addV("person").property("_partition","a").property("name","alice").as("a").addV("person").property("_partition","b").property("name","bob").as("b").addE("knows").from_("a").to("b").property("_partition","a").property("weight",1).addE("knows").from_("b").to("a").property("_partition","b").property("weight",2) }, function({g}) { return g.withStrategies(new PartitionStrategy({includeMetaProperties:f [...]
+    g_withStrategiesXPartitionStrategyXwrite_a_read_a_bXX_V_out_name: [function({g}) { return g.addV("person").property("_partition","a").property("name","alice").as("a").addV("person").property("_partition","b").property("name","bob").as("b").addE("knows").from_("a").to("b").property("_partition","a").property("weight",1).addE("knows").from_("b").to("a").property("_partition","b").property("weight",2) }, function({g}) { return g.withStrategies(new PartitionStrategy({includeMetaPropertie [...]
+    g_withStrategiesXPartitionStrategyXwrite_a_read_cXX_V_out_name: [function({g}) { return g.addV("person").property("_partition","a").property("name","alice").as("a").addV("person").property("_partition","b").property("name","bob").as("b").addE("knows").from_("a").to("b").property("_partition","a").property("weight",1).addE("knows").from_("b").to("a").property("_partition","b").property("weight",2) }, function({g}) { return g.withStrategies(new PartitionStrategy({includeMetaProperties: [...]
+    g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_addVXpersonX_propertyXname_aliceX_addXselfX: [function({g}) { return g.withStrategies(new PartitionStrategy({includeMetaProperties:false,partitionKey:"_partition",readPartitions:["a"],writePartition:"a"})).addV("person").property("name","alice").addE("self") }, function({g}) { return g.V().has("person","name","alice").has("_partition","a") }, function({g}) { return g.V() }, function({g}) { return g.E().has("_partition","a") }, funct [...]
+    g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_injectXzeroX_addVXpersonX_propertyXname_aliceX_addXselfX: [function({g}) { return g.withStrategies(new PartitionStrategy({includeMetaProperties:false,partitionKey:"_partition",readPartitions:["a"],writePartition:"a"})).inject(0).addV("person").property("name","alice").addE("self") }, function({g}) { return g.V().has("person","name","alice").has("_partition","a") }, function({g}) { return g.V() }, function({g}) { return g.E().has("_p [...]
+    g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_mergeV: [function({g, xx1}) { return g.withStrategies(new PartitionStrategy({includeMetaProperties:false,partitionKey:"_partition",readPartitions:["a"],writePartition:"a"})).mergeV(xx1) }, function({g, xx1}) { return g.V().has("person","name","alice").has("_partition","a") }, function({g, xx1}) { return g.V() }], 
+    g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_injectX0X_mergeV: [function({g, xx1}) { return g.withStrategies(new PartitionStrategy({includeMetaProperties:false,partitionKey:"_partition",readPartitions:["a"],writePartition:"a"})).inject(0).mergeV(xx1) }, function({g, xx1}) { return g.V().has("person","name","alice").has("_partition","a") }, function({g, xx1}) { return g.V() }], 
+    g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_mergeE: [function({g, xx1}) { return g.addV("person").property("_partition","a").property("name","alice").addV("person").property("_partition","a").property("name","bob") }, function({g, xx1}) { return g.withStrategies(new PartitionStrategy({includeMetaProperties:false,partitionKey:"_partition",readPartitions:["a"],writePartition:"a"})).mergeE(xx1) }, function({g, xx1}) { return g.E().has("knows","_partition","a") }, function({g, xx [...]
+    g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_injectX0XmergeE: [function({g, xx1}) { return g.addV("person").property("_partition","a").property("name","alice").addV("person").property("_partition","a").property("name","bob") }, function({g, xx1}) { return g.withStrategies(new PartitionStrategy({includeMetaProperties:false,partitionKey:"_partition",readPartitions:["a"],writePartition:"a"})).inject(0).mergeE(xx1) }, function({g, xx1}) { return g.E().has("knows","_partition","a") [...]
+    g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_mergeVXlabel_person_name_aliceX_optionXonMatch_name_bobX: [function({g, xx1, xx2}) { return g.addV("person").property("_partition","a").property("name","alice").addV("person").property("_partition","b").property("name","alice") }, function({g, xx1, xx2}) { return g.withStrategies(new PartitionStrategy({includeMetaProperties:false,partitionKey:"_partition",readPartitions:["a"],writePartition:"a"})).mergeV(xx1).option(Merge.onMatch,xx [...]
+    g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_mergeV_optionXonCreateX: [function({g, xx1, xx2}) { return g.addV("person").property("_partition","b").property("name","alice") }, function({g, xx1, xx2}) { return g.withStrategies(new PartitionStrategy({includeMetaProperties:false,partitionKey:"_partition",readPartitions:["a"],writePartition:"a"})).mergeV(xx1).option(Merge.onCreate,xx2) }, function({g, xx1, xx2}) { return g.V().has("name","alice").has("age",35).has("_partition","a" [...]
+    g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_injectX0X__mergeV_optionXonCreateX: [function({g, xx1, xx2}) { return g.addV("person").property("_partition","b").property("name","alice") }, function({g, xx1, xx2}) { return g.withStrategies(new PartitionStrategy({includeMetaProperties:false,partitionKey:"_partition",readPartitions:["a"],writePartition:"a"})).inject(0).mergeV(xx1).option(Merge.onCreate,xx2) }, function({g, xx1, xx2}) { return g.V().has("name","alice").has("age",35) [...]
     g_V_shortestpath: [function({g}) { return g.V().as("v").both().as("v").project("src","tgt","p").by(__.select(Pop.first,"v")).by(__.select(Pop.last,"v")).by(__.select(Pop.all,"v")).as("triple").group("x").by(__.select("src","tgt")).by(__.select("p").fold()).select("tgt").barrier().repeat(__.both().as("v").project("src","tgt","p").by(__.select(Pop.first,"v")).by(__.select(Pop.last,"v")).by(__.select(Pop.all,"v")).as("t").filter(__.select(Pop.all,"p").count(Scope.local).as("l").select(P [...]
     g_withStrategiesXReadOnlyStrategyX_V: [function({g}) { return g.withStrategies(new ReadOnlyStrategy()).V() }], 
     g_withStrategiesXReadOnlyStrategyX_V_outXknowsX_name: [function({g}) { return g.withStrategies(new ReadOnlyStrategy()).V().out("knows").values("name") }], 
diff --git a/gremlin-python/src/main/python/radish/gremlin.py b/gremlin-python/src/main/python/radish/gremlin.py
index 38eab569e9..f9bf797510 100644
--- a/gremlin-python/src/main/python/radish/gremlin.py
+++ b/gremlin-python/src/main/python/radish/gremlin.py
@@ -327,6 +327,30 @@ world.gremlins = {
     'g_V_asXnX_whereXorXselectXnX_hasLabelXsoftwareX_selectXnX_hasLabelXpersonXXX_selectXnX_byXnameX': [(lambda g:g.V().as_('n').where(__.or_(__.select('n').hasLabel('software'),__.select('n').hasLabel('person'))).select('n').by('name'))], 
     'g_V_coworker': [(lambda g, xx1=None:g.V().hasLabel('person').filter_(__.outE('created')).aggregate('p').as_('p1').name.as_('p1n').select('p').unfold().where(P.neq('p1')).as_('p2').name.as_('p2n').select('p2').out('created').choose(__.in_('created').where(P.eq('p1')),__.name,__.constant(xx1)).group().by(__.select('p1n')).by(__.group().by(__.select('p2n')).by(__.unfold().fold().project('numCoCreated','coCreated').by(__.count(Scope.local)).by())).unfold())], 
     'g_V_coworker_with_midV': [(lambda g:g.V().hasLabel('person').filter_(__.outE('created')).as_('p1').V().hasLabel('person').where(P.neq('p1')).filter_(__.outE('created')).as_('p2').map(__.out('created').where(__.in_('created').as_('p1')).name.fold()).group().by(__.select('p1').by('name')).by(__.group().by(__.select('p2').by('name')).by(__.project('numCoCreated','coCreated').by(__.count(Scope.local)).by())).unfold())], 
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_V_name': [(lambda g:g.addV('person').property('_partition','a').property('name','alice').addV('person').property('_partition','b').property('name','bob')), (lambda g:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaProperties':False,'partitionKey':'_partition','readPartitions':set(('a')),'strategy':'org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy','writePartition':'a'}, 'org [...]
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_a_bXX_V_name': [(lambda g:g.addV('person').property('_partition','a').property('name','alice').addV('person').property('_partition','b').property('name','bob')), (lambda g:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaProperties':False,'partitionKey':'_partition','readPartitions':set(('a','b')),'strategy':'org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy','writePartition':'a'} [...]
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_cXX_V_name': [(lambda g:g.addV('person').property('_partition','a').property('name','alice').addV('person').property('_partition','b').property('name','bob')), (lambda g:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaProperties':False,'partitionKey':'_partition','readPartitions':set(('c')),'strategy':'org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy','writePartition':'a'}, 'org [...]
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_V_bothE_weight': [(lambda g:g.addV('person').property('_partition','a').property('name','alice').as_('a').addV('person').property('_partition','b').property('name','bob').as_('b').addE('knows').from_('a').to('b').property('_partition','a').property('weight',1).addE('knows').from_('b').to('a').property('_partition','b').property('weight',2)), (lambda g:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaProperties' [...]
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_bXX_V_bothE_weight': [(lambda g:g.addV('person').property('_partition','a').property('name','alice').as_('a').addV('person').property('_partition','b').property('name','bob').as_('b').addE('knows').from_('a').to('b').property('_partition','a').property('weight',1).addE('knows').from_('b').to('a').property('_partition','b').property('weight',2)), (lambda g:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaProperties' [...]
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_a_bXX_V_bothE_dedup_weight': [(lambda g:g.addV('person').property('_partition','a').property('name','alice').as_('a').addV('person').property('_partition','b').property('name','bob').as_('b').addE('knows').from_('a').to('b').property('_partition','a').property('weight',1).addE('knows').from_('b').to('a').property('_partition','b').property('weight',2)), (lambda g:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaPro [...]
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_cXX_V_bothE_weight': [(lambda g:g.addV('person').property('_partition','a').property('name','alice').as_('a').addV('person').property('_partition','b').property('name','bob').as_('b').addE('knows').from_('a').to('b').property('_partition','a').property('weight',1).addE('knows').from_('b').to('a').property('_partition','b').property('weight',2)), (lambda g:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaProperties' [...]
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_V_both_name': [(lambda g:g.addV('person').property('_partition','a').property('name','alice').as_('a').addV('person').property('_partition','b').property('name','bob').as_('b').addE('knows').from_('a').to('b').property('_partition','a').property('weight',1).addE('knows').from_('b').to('a').property('_partition','b').property('weight',2)), (lambda g:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaProperties':Fa [...]
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_bXX_V_both_name': [(lambda g:g.addV('person').property('_partition','a').property('name','alice').as_('a').addV('person').property('_partition','b').property('name','bob').as_('b').addE('knows').from_('a').to('b').property('_partition','a').property('weight',1).addE('knows').from_('b').to('a').property('_partition','b').property('weight',2)), (lambda g:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaProperties':Fa [...]
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_a_bXX_V_both_dedup_name': [(lambda g:g.addV('person').property('_partition','a').property('name','alice').as_('a').addV('person').property('_partition','b').property('name','bob').as_('b').addE('knows').from_('a').to('b').property('_partition','a').property('weight',1).addE('knows').from_('b').to('a').property('_partition','b').property('weight',2)), (lambda g:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaProper [...]
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_cXX_V_both_name': [(lambda g:g.addV('person').property('_partition','a').property('name','alice').as_('a').addV('person').property('_partition','b').property('name','bob').as_('b').addE('knows').from_('a').to('b').property('_partition','a').property('weight',1).addE('knows').from_('b').to('a').property('_partition','b').property('weight',2)), (lambda g:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaProperties':Fa [...]
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_V_out_name': [(lambda g:g.addV('person').property('_partition','a').property('name','alice').as_('a').addV('person').property('_partition','b').property('name','bob').as_('b').addE('knows').from_('a').to('b').property('_partition','a').property('weight',1).addE('knows').from_('b').to('a').property('_partition','b').property('weight',2)), (lambda g:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaProperties':Fal [...]
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_bXX_V_in_name': [(lambda g:g.addV('person').property('_partition','a').property('name','alice').as_('a').addV('person').property('_partition','b').property('name','bob').as_('b').addE('knows').from_('a').to('b').property('_partition','a').property('weight',1).addE('knows').from_('b').to('a').property('_partition','b').property('weight',2)), (lambda g:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaProperties':Fals [...]
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_a_bXX_V_out_name': [(lambda g:g.addV('person').property('_partition','a').property('name','alice').as_('a').addV('person').property('_partition','b').property('name','bob').as_('b').addE('knows').from_('a').to('b').property('_partition','a').property('weight',1).addE('knows').from_('b').to('a').property('_partition','b').property('weight',2)), (lambda g:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaProperties':F [...]
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_cXX_V_out_name': [(lambda g:g.addV('person').property('_partition','a').property('name','alice').as_('a').addV('person').property('_partition','b').property('name','bob').as_('b').addE('knows').from_('a').to('b').property('_partition','a').property('weight',1).addE('knows').from_('b').to('a').property('_partition','b').property('weight',2)), (lambda g:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaProperties':Fal [...]
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_addVXpersonX_propertyXname_aliceX_addXselfX': [(lambda g:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaProperties':False,'partitionKey':'_partition','readPartitions':set(('a')),'strategy':'org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy','writePartition':'a'}, 'org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy')]).addV('person').property [...]
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_injectXzeroX_addVXpersonX_propertyXname_aliceX_addXselfX': [(lambda g:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaProperties':False,'partitionKey':'_partition','readPartitions':set(('a')),'strategy':'org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy','writePartition':'a'}, 'org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy')]).inject(0). [...]
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_mergeV': [(lambda g, xx1=None:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaProperties':False,'partitionKey':'_partition','readPartitions':set(('a')),'strategy':'org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy','writePartition':'a'}, 'org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy')]).merge_v(xx1)), (lambda g, xx1=None:g.V().has('pers [...]
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_injectX0X_mergeV': [(lambda g, xx1=None:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaProperties':False,'partitionKey':'_partition','readPartitions':set(('a')),'strategy':'org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy','writePartition':'a'}, 'org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy')]).inject(0).merge_v(xx1)), (lambda g, xx1= [...]
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_mergeE': [(lambda g, xx1=None:g.addV('person').property('_partition','a').property('name','alice').addV('person').property('_partition','a').property('name','bob')), (lambda g, xx1=None:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaProperties':False,'partitionKey':'_partition','readPartitions':set(('a')),'strategy':'org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy','writeP [...]
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_injectX0XmergeE': [(lambda g, xx1=None:g.addV('person').property('_partition','a').property('name','alice').addV('person').property('_partition','a').property('name','bob')), (lambda g, xx1=None:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaProperties':False,'partitionKey':'_partition','readPartitions':set(('a')),'strategy':'org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy [...]
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_mergeVXlabel_person_name_aliceX_optionXonMatch_name_bobX': [(lambda g, xx1=None,xx2=None:g.addV('person').property('_partition','a').property('name','alice').addV('person').property('_partition','b').property('name','alice')), (lambda g, xx1=None,xx2=None:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaProperties':False,'partitionKey':'_partition','readPartitions':set(('a')),'strategy':'org.apache.tinkerpop.gr [...]
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_mergeV_optionXonCreateX': [(lambda g, xx1=None,xx2=None:g.addV('person').property('_partition','b').property('name','alice')), (lambda g, xx1=None,xx2=None:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaProperties':False,'partitionKey':'_partition','readPartitions':set(('a')),'strategy':'org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy','writePartition':'a'}, 'org.apache.ti [...]
+    'g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_injectX0X__mergeV_optionXonCreateX': [(lambda g, xx1=None,xx2=None:g.addV('person').property('_partition','b').property('name','alice')), (lambda g, xx1=None,xx2=None:g.withStrategies(*[TraversalStrategy('PartitionStrategy',{'includeMetaProperties':False,'partitionKey':'_partition','readPartitions':set(('a')),'strategy':'org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy','writePartition':'a'}, 'or [...]
     'g_V_shortestpath': [(lambda g:g.V().as_('v').both().as_('v').project('src','tgt','p').by(__.select(Pop.first,'v')).by(__.select(Pop.last,'v')).by(__.select(Pop.all_,'v')).as_('triple').group('x').by(__.select('src','tgt')).by(__.select('p').fold()).select('tgt').barrier().repeat(__.both().as_('v').project('src','tgt','p').by(__.select(Pop.first,'v')).by(__.select(Pop.last,'v')).by(__.select(Pop.all_,'v')).as_('t').filter_(__.select(Pop.all_,'p').count(Scope.local).as_('l').select(Po [...]
     'g_withStrategiesXReadOnlyStrategyX_V': [(lambda g:g.withStrategies(*[TraversalStrategy('ReadOnlyStrategy', None, 'org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy')]).V())], 
     'g_withStrategiesXReadOnlyStrategyX_V_outXknowsX_name': [(lambda g:g.withStrategies(*[TraversalStrategy('ReadOnlyStrategy', None, 'org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy')]).V().out('knows').name)], 
diff --git a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/integrated/PartitionStrategy.feature b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/integrated/PartitionStrategy.feature
new file mode 100644
index 0000000000..7c7212027e
--- /dev/null
+++ b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/integrated/PartitionStrategy.feature
@@ -0,0 +1,458 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+@StepClassIntegrated
+Feature: Step - PartitionStrategy
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_V_name
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property("_partition","a").property("name","alice").
+        addV("person").property("_partition","b").property("name","bob")
+      """
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["a"])).V().values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | alice |
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_a_bXX_V_name
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property("_partition","a").property("name","alice").
+        addV("person").property("_partition","b").property("name","bob")
+      """
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["a", "b"])).V().values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | alice |
+      | bob |
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_cXX_V_name
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property("_partition","a").property("name","alice").
+        addV("person").property("_partition","b").property("name","bob")
+      """
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["c"])).V().values("name")
+      """
+    When iterated to list
+    Then the result should have a count of 0
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_V_bothE_weight
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property("_partition","a").property("name","alice").as("a").
+        addV("person").property("_partition","b").property("name","bob").as("b").
+        addE("knows").from("a").to("b").property("_partition","a").property("weight",1).
+        addE("knows").from("b").to("a").property("_partition","b").property("weight",2)
+      """
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["a"])).V().
+        bothE().values("weight")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[1].i |
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_bXX_V_bothE_weight
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property("_partition","a").property("name","alice").as("a").
+        addV("person").property("_partition","b").property("name","bob").as("b").
+        addE("knows").from("a").to("b").property("_partition","a").property("weight",1).
+        addE("knows").from("b").to("a").property("_partition","b").property("weight",2)
+      """
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["b"])).V().
+        bothE().values("weight")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[2].i |
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_a_bXX_V_bothE_dedup_weight
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property("_partition","a").property("name","alice").as("a").
+        addV("person").property("_partition","b").property("name","bob").as("b").
+        addE("knows").from("a").to("b").property("_partition","a").property("weight",1).
+        addE("knows").from("b").to("a").property("_partition","b").property("weight",2)
+      """
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["a", "b"])).V().
+        bothE().dedup().values("weight")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[1].i |
+      | d[2].i |
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_cXX_V_bothE_weight
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property("_partition","a").property("name","alice").as("a").
+        addV("person").property("_partition","b").property("name","bob").as("b").
+        addE("knows").from("a").to("b").property("_partition","a").property("weight",1).
+        addE("knows").from("b").to("a").property("_partition","b").property("weight",2)
+      """
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["c"])).V().
+        bothE().values("weight")
+      """
+    When iterated to list
+    Then the result should have a count of 0
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_V_both_name
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property("_partition","a").property("name","alice").as("a").
+        addV("person").property("_partition","b").property("name","bob").as("b").
+        addE("knows").from("a").to("b").property("_partition","a").property("weight",1).
+        addE("knows").from("b").to("a").property("_partition","b").property("weight",2)
+      """
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["a"])).V().
+        both().values("name")
+      """
+    When iterated to list
+    Then the result should have a count of 0
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_bXX_V_both_name
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property("_partition","a").property("name","alice").as("a").
+        addV("person").property("_partition","b").property("name","bob").as("b").
+        addE("knows").from("a").to("b").property("_partition","a").property("weight",1).
+        addE("knows").from("b").to("a").property("_partition","b").property("weight",2)
+      """
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["b"])).V().
+        both().values("name")
+      """
+    When iterated to list
+    Then the result should have a count of 0
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_a_bXX_V_both_dedup_name
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property("_partition","a").property("name","alice").as("a").
+        addV("person").property("_partition","b").property("name","bob").as("b").
+        addE("knows").from("a").to("b").property("_partition","a").property("weight",1).
+        addE("knows").from("b").to("a").property("_partition","b").property("weight",2)
+      """
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["a", "b"])).V().
+        both().dedup().values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | alice |
+      | bob |
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_cXX_V_both_name
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property("_partition","a").property("name","alice").as("a").
+        addV("person").property("_partition","b").property("name","bob").as("b").
+        addE("knows").from("a").to("b").property("_partition","a").property("weight",1).
+        addE("knows").from("b").to("a").property("_partition","b").property("weight",2)
+      """
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["c"])).V().
+        both().values("name")
+      """
+    When iterated to list
+    Then the result should have a count of 0
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_V_out_name
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property("_partition","a").property("name","alice").as("a").
+        addV("person").property("_partition","b").property("name","bob").as("b").
+        addE("knows").from("a").to("b").property("_partition","a").property("weight",1).
+        addE("knows").from("b").to("a").property("_partition","b").property("weight",2)
+      """
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["a"])).V().
+        out().values("name")
+      """
+    When iterated to list
+    Then the result should have a count of 0
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_bXX_V_in_name
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property("_partition","a").property("name","alice").as("a").
+        addV("person").property("_partition","b").property("name","bob").as("b").
+        addE("knows").from("a").to("b").property("_partition","a").property("weight",1).
+        addE("knows").from("b").to("a").property("_partition","b").property("weight",2)
+      """
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["b"])).V().
+        in().values("name")
+      """
+    When iterated to list
+    Then the result should have a count of 0
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_a_bXX_V_out_name
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property("_partition","a").property("name","alice").as("a").
+        addV("person").property("_partition","b").property("name","bob").as("b").
+        addE("knows").from("a").to("b").property("_partition","a").property("weight",1).
+        addE("knows").from("b").to("a").property("_partition","b").property("weight",2)
+      """
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["a", "b"])).V().
+        out().values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | alice |
+      | bob |
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_cXX_V_out_name
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property("_partition","a").property("name","alice").as("a").
+        addV("person").property("_partition","b").property("name","bob").as("b").
+        addE("knows").from("a").to("b").property("_partition","a").property("weight",1).
+        addE("knows").from("b").to("a").property("_partition","b").property("weight",2)
+      """
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["c"])).V().
+        out().values("name")
+      """
+    When iterated to list
+    Then the result should have a count of 0
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_addVXpersonX_propertyXname_aliceX_addXselfX
+    Given the empty graph
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["a"])).
+        addV("person").property("name","alice").
+        addE("self")
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"alice\").has(\"_partition\",\"a\")"
+    And the graph should return 1 for count of "g.V()"
+    And the graph should return 1 for count of "g.E().has(\"_partition\",\"a\")"
+    And the graph should return 1 for count of "g.E()"
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_injectXzeroX_addVXpersonX_propertyXname_aliceX_addXselfX
+    Given the empty graph
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["a"])).
+        inject(0).
+        addV("person").property("name","alice").
+        addE("self")
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"alice\").has(\"_partition\",\"a\")"
+    And the graph should return 1 for count of "g.V()"
+    And the graph should return 1 for count of "g.E().has(\"_partition\",\"a\")"
+    And the graph should return 1 for count of "g.E()"
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_mergeV
+    Given the empty graph
+    And using the parameter xx1 defined as "m[{\"t[label]\": \"person\", \"name\":\"alice\"}]"
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["a"])).
+        mergeV(xx1)
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"alice\").has(\"_partition\",\"a\")"
+    And the graph should return 1 for count of "g.V()"
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_injectX0X_mergeV
+    Given the empty graph
+    And using the parameter xx1 defined as "m[{\"t[label]\": \"person\", \"name\":\"alice\"}]"
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["a"])).
+        inject(0).
+        mergeV(xx1)
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"alice\").has(\"_partition\",\"a\")"
+    And the graph should return 1 for count of "g.V()"
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_mergeE
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property("_partition","a").property("name","alice").
+        addV("person").property("_partition","a").property("name","bob")
+      """
+    And using the parameter xx1 defined as "m[{\"t[label]\": \"knows\", \"D[OUT]\":\"v[alice].id\", \"D[IN]\":\"v[bob].id\"}]"
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["a"])).
+        mergeE(xx1)
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 1 for count of "g.E().has(\"knows\",\"_partition\",\"a\")"
+    And the graph should return 1 for count of "g.E()"
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_injectX0XmergeE
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property("_partition","a").property("name","alice").
+        addV("person").property("_partition","a").property("name","bob")
+      """
+    And using the parameter xx1 defined as "m[{\"t[label]\": \"knows\", \"D[OUT]\":\"v[alice].id\", \"D[IN]\":\"v[bob].id\"}]"
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["a"])).
+        inject(0).
+        mergeE(xx1)
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 1 for count of "g.E().has(\"knows\",\"_partition\",\"a\")"
+    And the graph should return 1 for count of "g.E()"
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_mergeVXlabel_person_name_aliceX_optionXonMatch_name_bobX
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property("_partition","a").property("name","alice").
+        addV("person").property("_partition","b").property("name","alice")
+      """
+    And using the parameter xx1 defined as "m[{\"t[label]\": \"person\", \"name\":\"alice\"}]"
+    And using the parameter xx2 defined as "m[{\"name\":\"bob\"}]"
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["a"])).
+        mergeV(xx1).option(Merge.onMatch, xx2)
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"bob\").has(\"_partition\",\"a\")"
+    And the graph should return 2 for count of "g.V()"
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_mergeV_optionXonCreateX
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property("_partition","b").property("name","alice")
+      """
+    And using the parameter xx1 defined as "m[{\"name\":\"alice\"}]"
+    And using the parameter xx2 defined as "m[{\"age\":\"d[35].i\"}]"
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["a"])).
+        mergeV(xx1).option(Merge.onCreate, xx2)
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 1 for count of "g.V().has(\"name\",\"alice\").has(\"age\",35).has(\"_partition\",\"a\")"
+    And the graph should return 2 for count of "g.V()"
+
+  @WithPartitionStrategy
+  Scenario: g_withStrategiesXPartitionStrategyXwrite_a_read_aXX_injectX0X__mergeV_optionXonCreateX
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property("_partition","b").property("name","alice")
+      """
+    And using the parameter xx1 defined as "m[{\"name\":\"alice\"}]"
+    And using the parameter xx2 defined as "m[{\"age\":\"d[35].i\"}]"
+    And the traversal of
+      """
+      g.withStrategies(new PartitionStrategy(partitionKey: "_partition", writePartition: "a", readPartitions: ["a"])).
+        inject(0).
+        mergeV(xx1).option(Merge.onCreate, xx2)
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 1 for count of "g.V().has(\"name\",\"alice\").has(\"age\",35).has(\"_partition\",\"a\")"
+    And the graph should return 2 for count of "g.V()"
\ No newline at end of file