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 2015/09/11 21:49:44 UTC

[1/2] incubator-tinkerpop git commit: Needed to flush the kryo Output for message to be constructed properly.

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/master a6c7f0018 -> bf1e17fed


Needed to flush the kryo Output for message to be constructed properly.

This only applied to large single responses.  Error messages are now consistent with the Kryo "buffer too small" error.  Errors are now completely consistent.


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

Branch: refs/heads/master
Commit: af2ffa95fed6bf7f217bcd95eb88e9b4494dcd76
Parents: 6a333d7
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Sep 11 15:45:19 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Sep 11 15:45:19 2015 -0400

----------------------------------------------------------------------
 .../gremlin/driver/ser/GryoMessageSerializerV1d0.java          | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/af2ffa95/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0.java
index 64680b1..ca5915c 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0.java
@@ -196,7 +196,7 @@ public final class GryoMessageSerializerV1d0 implements MessageSerializer {
     public ResponseMessage deserializeResponse(final ByteBuf msg) throws SerializationException {
         try {
             final Kryo kryo = kryoThreadLocal.get();
-            final byte[] payload = new byte[msg.readableBytes()];
+            final byte[] payload = new byte[msg.capacity()];
             msg.readBytes(payload);
             try (final Input input = new Input(payload)) {
                 final UUID requestId = kryo.readObjectOrNull(input, UUID.class);
@@ -244,7 +244,8 @@ public final class GryoMessageSerializerV1d0 implements MessageSerializer {
                 if (size > Integer.MAX_VALUE)
                     throw new SerializationException(String.format("Message size of %s exceeds allocatable space", size));
 
-                encodedMessage = allocator.buffer((int) output.total());
+                encodedMessage = allocator.buffer((int) size);
+                output.flush();
                 encodedMessage.writeBytes(output.toBytes());
             }
 
@@ -305,6 +306,7 @@ public final class GryoMessageSerializerV1d0 implements MessageSerializer {
                     throw new SerializationException(String.format("Message size of %s exceeds allocatable space", size));
 
                 encodedMessage = allocator.buffer((int) size);
+                output.flush();
                 encodedMessage.writeBytes(output.toBytes());
             }
 


[2/2] incubator-tinkerpop git commit: Merge remote-tracking branch 'origin/tp30'

Posted by sp...@apache.org.
Merge remote-tracking branch 'origin/tp30'


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

Branch: refs/heads/master
Commit: bf1e17fedc60e1144675f4f735334690fbf130dd
Parents: a6c7f00 af2ffa9
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Sep 11 15:49:30 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Sep 11 15:49:30 2015 -0400

----------------------------------------------------------------------
 .../gremlin/driver/ser/GryoMessageSerializerV1d0.java          | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------