You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by xi...@apache.org on 2024/10/07 21:57:45 UTC

(tinkerpop) branch graphbinary-bulk-list updated: update

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

xiazcy pushed a commit to branch graphbinary-bulk-list
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/graphbinary-bulk-list by this push:
     new 5ca71a23ce update
5ca71a23ce is described below

commit 5ca71a23ce2265de78b43c041834838bd5c906f6
Author: Yang Xia <55...@users.noreply.github.com>
AuthorDate: Mon Oct 7 12:34:11 2024 -0700

    update
---
 .../gremlin/util/ser/GraphBinaryMessageSerializerV4.java          | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/util/ser/GraphBinaryMessageSerializerV4.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/util/ser/GraphBinaryMessageSerializerV4.java
index fef34f994c..0552d5e188 100644
--- a/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/util/ser/GraphBinaryMessageSerializerV4.java
+++ b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/util/ser/GraphBinaryMessageSerializerV4.java
@@ -221,11 +221,10 @@ public class GraphBinaryMessageSerializerV4 extends AbstractMessageSerializer<Gr
             if (parts.contains(MessageParts.HEADER)) {
                 // Version
                 buffer.writeByte(GraphBinaryWriter.VERSION_BYTE);
+                // todo need to pass bulking config to here
+                buffer.writeByte(1);
             }
 
-            // todo need to pass bulking config to here
-            buffer.writeByte(1);
-
             if (parts.contains(MessageParts.DATA)) {
 
                 final Object data = aggregate == null && responseMessage.getResult() != null
@@ -296,6 +295,7 @@ public class GraphBinaryMessageSerializerV4 extends AbstractMessageSerializer<Gr
     @Override
     public ResponseMessage readChunk(final ByteBuf byteBuf, final boolean isFirstChunk) throws SerializationException {
         final Buffer buffer = bufferFactory.create(byteBuf);
+        boolean bulking = false;
 
         try {
             // empty input buffer
@@ -311,9 +311,9 @@ public class GraphBinaryMessageSerializerV4 extends AbstractMessageSerializer<Gr
                     // Or the buffer offsets are wrong
                     throw new SerializationException("The most significant bit should be set according to the format");
                 }
+                bulking = (buffer.readByte() & 1) == 1 ;
             }
 
-            final boolean bulking = (buffer.readByte() & 1) == 1 ;
             final List<Object> result = readPayload(buffer, bulking);
 
             // no footer