[GitHub] IsaacBoy commented on issue #1057: Changed loop break check to break out of the connection creation loop
IsaacBoy commented on issue #1057: Changed loop break check to break out of the connection creation loop URL: https://github.com/apache/tinkerpop/pull/1057#issuecomment-461446475 Issue in JIRA: https://issues.apache.org/jira/browse/TINKERPOP-2155 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] IsaacBoy removed a comment on issue #1057: Changed loop break check to break out of the connection creation loop
IsaacBoy removed a comment on issue #1057: Changed loop break check to break out of the connection creation loop URL: https://github.com/apache/tinkerpop/pull/1057#issuecomment-461446136 Issue: https://github.com/apache/tinkerpop/compare/master...IsaacBoy:TINKERPOP-2155 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] IsaacBoy commented on issue #1057: Changed loop break check to break out of the connection creation loop
IsaacBoy commented on issue #1057: Changed loop break check to break out of the connection creation loop URL: https://github.com/apache/tinkerpop/pull/1057#issuecomment-461446136 Issue: https://github.com/apache/tinkerpop/compare/master...IsaacBoy:TINKERPOP-2155 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] IsaacBoy opened a new pull request #1057: Changed loop break check to break out of the connection creation loop
IsaacBoy opened a new pull request #1057: Changed loop break check to break out of the connection creation loop URL: https://github.com/apache/tinkerpop/pull/1057 Changed loop break check to break out of the connection creation loop if greater than or equal to the expected amount of connections are created. A situation exists where unless exactly the expected amount of connections are made when checked, and infinite loop of connections may be opened. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[tinkerpop] branch TINKERPOP-2134 updated: f
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a commit to branch TINKERPOP-2134 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git The following commit(s) were added to refs/heads/TINKERPOP-2134 by this push: new c7af254 f c7af254 is described below commit c7af254527e9eb9a5bfbe355b839c3f2f2b18109 Author: Stephen Mallette AuthorDate: Thu Feb 7 07:10:54 2019 -0500 f --- .../apache/tinkerpop/gremlin/hadoop/structure/io/ObjectWritable.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/ObjectWritable.java b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/ObjectWritable.java index 979cbfc..02e0f13 100644 --- a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/ObjectWritable.java +++ b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/ObjectWritable.java @@ -66,7 +66,7 @@ public final class ObjectWritable implements WritableComparable
[tinkerpop] branch master updated: GraphBinary: use exception instead of assertion for msb check CTR
This is an automated email from the ASF dual-hosted git repository. jorgebg pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git The following commit(s) were added to refs/heads/master by this push: new f799335 GraphBinary: use exception instead of assertion for msb check CTR f799335 is described below commit f799335a29e5da98644b75e8d5d9aea810bc6262 Author: Jorge Bay Gondra AuthorDate: Thu Feb 7 10:18:38 2019 +0100 GraphBinary: use exception instead of assertion for msb check CTR --- .../gremlin/driver/ser/binary/RequestMessageSerializer.java | 9 +++-- .../gremlin/driver/ser/binary/ResponseMessageSerializer.java | 9 +++-- .../driver/ser/binary/GraphBinaryMessageSerializerV1Test.java| 9 + 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/RequestMessageSerializer.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/RequestMessageSerializer.java index 7ac1c97..3277598 100644 --- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/RequestMessageSerializer.java +++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/RequestMessageSerializer.java @@ -29,8 +29,13 @@ import java.util.UUID; public class RequestMessageSerializer { public RequestMessage readValue(final ByteBuf buffer, final GraphBinaryReader context) throws SerializationException { -final int version = buffer.readByte(); -assert version >>> 31 == 1; +final int version = buffer.readByte() & 0xff; + +if (version >>> 7 != 1) { +// This is an indication that the request buffer was incorrectly built +// Or the buffer offsets are wrong +throw new SerializationException("The most significant bit should be set according to the format"); +} final UUID id = context.readValue(buffer, UUID.class, false); final String op = context.readValue(buffer, String.class, false); diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/ResponseMessageSerializer.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/ResponseMessageSerializer.java index cceb260..f93fe28 100644 --- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/ResponseMessageSerializer.java +++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/ResponseMessageSerializer.java @@ -32,8 +32,13 @@ import java.util.UUID; public class ResponseMessageSerializer { public ResponseMessage readValue(final ByteBuf buffer, final GraphBinaryReader context, final boolean nullable) throws SerializationException { -final int version = buffer.readByte(); -assert version >>> 31 == 1; +final int version = buffer.readByte() & 0xff; + +if (version >>> 7 != 1) { +// This is an indication that the response buffer was incorrectly built +// Or the buffer offsets are wrong +throw new SerializationException("The most significant bit should be set according to the format"); +} return ResponseMessage.build(context.readValue(buffer, UUID.class, true)) .code(ResponseStatusCode.getFromValue(context.readValue(buffer, Integer.class, false))) diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryMessageSerializerV1Test.java b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryMessageSerializerV1Test.java index 0e8e7ed..7321d1e 100644 --- a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryMessageSerializerV1Test.java +++ b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryMessageSerializerV1Test.java @@ -148,6 +148,15 @@ public class GraphBinaryMessageSerializerV1Test { assertEquals(1, counter); } +@Test(expected = IllegalStateException.class) +public void shouldThrowWhenConfigurationOfRegistryBuilderFails() { +final GraphBinaryMessageSerializerV1 serializer = new GraphBinaryMessageSerializerV1(); +final Map config = new HashMap<>(); +config.put(GraphBinaryMessageSerializerV1.TOKEN_BUILDER, "org.apache.tinkerpop.gremlin.driver.ser.binary.NonExistentClass"); + +serializer.configure(config, null); +} + private static void assertResponseEquals(ResponseMessage expected, ResponseMessage actual) { assertEquals(expected.getRequestId(), actual.getRequestId()); // Status
[GitHub] jorgebay commented on issue #1056: fix: Path#toString() variable reference bug
jorgebay commented on issue #1056: fix: Path#toString() variable reference bug URL: https://github.com/apache/tinkerpop/pull/1056#issuecomment-461330180 `toString()` was introduced as part of TK-1446, it didn't have a string representation on the js side prior to that. @thefliik sorry for the confusion, nvm. Fixing it on `master` makes sense, VOTE +1 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services