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 22:07:09 UTC

incubator-tinkerpop git commit: Only flush if the buffer size is exceeded.

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/tp30 af2ffa95f -> e4010c1d2


Only flush if the buffer size is exceeded.

Serialization tests seeme to fail otherwise.  Not sure why this is completely necessary at this time.  Will need to investigate further, but for now the tests are all passing again.


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

Branch: refs/heads/tp30
Commit: e4010c1d2b60dc105eb247addf5659c948945dff
Parents: af2ffa9
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Sep 11 16:06:16 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Sep 11 16:06:16 2015 -0400

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


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e4010c1d/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 ca5915c..ac38020 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
@@ -245,7 +245,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();
+                if (size > bufferSize) output.flush();
                 encodedMessage.writeBytes(output.toBytes());
             }
 
@@ -306,7 +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();
+                if (size > bufferSize) output.flush();
                 encodedMessage.writeBytes(output.toBytes());
             }