You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by da...@apache.org on 2018/05/14 19:29:35 UTC

[1/3] tinkerpop git commit: Don't use recursive calls for streaming response

Repository: tinkerpop
Updated Branches:
  refs/heads/tp33 3f94a27f3 -> 715876822


Don't use recursive calls for streaming response


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

Branch: refs/heads/tp33
Commit: 4c8717dd4e94ec248a959911d8c11f3b45b2d7b3
Parents: 268423d
Author: davebshow <da...@gmail.com>
Authored: Mon Apr 23 16:21:48 2018 -0700
Committer: davebshow <da...@gmail.com>
Committed: Mon Apr 23 16:21:48 2018 -0700

----------------------------------------------------------------------
 .../src/main/jython/gremlin_python/driver/connection.py      | 7 +++++--
 .../src/main/jython/gremlin_python/driver/protocol.py        | 8 ++++----
 2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4c8717dd/gremlin-python/src/main/jython/gremlin_python/driver/connection.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/connection.py b/gremlin-python/src/main/jython/gremlin_python/driver/connection.py
index abc4545..bff1904 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/connection.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/connection.py
@@ -73,6 +73,9 @@ class Connection:
         return future
 
     def _receive(self):
-        data = self._transport.read()
-        self._protocol.data_received(data, self._results)
+        while True:
+            data = self._transport.read()
+            status_code = self._protocol.data_received(data, self._results)
+            if status_code != 206:
+                break
         self._pool.put_nowait(self)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4c8717dd/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py b/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
index 84a7d82..2fc7c1b 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
@@ -80,21 +80,21 @@ class GremlinServerWSProtocol(AbstractBaseProtocol):
                 {'sasl': base64.b64encode(auth).decode()})
             self.write(request_id, request_message)
             data = self._transport.read()
+            # Allow recursive call for auth
             self.data_received(data, results_dict)
         elif status_code == 204:
             result_set.stream.put_nowait([])
             del results_dict[request_id]
+            return status_code
         elif status_code in [200, 206]:
             results = []
             for msg in data["result"]["data"]:
                 results.append(
                     self._message_serializer.deserialize_message(msg))
             result_set.stream.put_nowait(results)
-            if status_code == 206:
-                data = self._transport.read()
-                self.data_received(data, results_dict)
-            else:
+            if status_code == 200:
                 del results_dict[request_id]
+            return status_code
         else:
             del results_dict[request_id]
             raise GremlinServerError(


[2/3] tinkerpop git commit: Merge branch 'TINKERPOP-1933' into tp32

Posted by da...@apache.org.
Merge branch 'TINKERPOP-1933' into tp32


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

Branch: refs/heads/tp33
Commit: fa3fb9eac88ca7b7f3669b18d097f0e69e09bfaf
Parents: 770375d 4c8717d
Author: davebshow <da...@gmail.com>
Authored: Mon May 14 12:09:21 2018 -0700
Committer: davebshow <da...@gmail.com>
Committed: Mon May 14 12:09:21 2018 -0700

----------------------------------------------------------------------
 .../src/main/jython/gremlin_python/driver/connection.py      | 7 +++++--
 .../src/main/jython/gremlin_python/driver/protocol.py        | 8 ++++----
 2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------



[3/3] tinkerpop git commit: merged tp32. fixed conflict related to better message deserializer implementation in 3.3.x line

Posted by da...@apache.org.
merged tp32. fixed conflict related to better message deserializer implementation in 3.3.x line


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

Branch: refs/heads/tp33
Commit: 71587682236138de179137a233d243100178ee4f
Parents: 3f94a27 fa3fb9e
Author: davebshow <da...@gmail.com>
Authored: Mon May 14 12:15:37 2018 -0700
Committer: davebshow <da...@gmail.com>
Committed: Mon May 14 12:15:37 2018 -0700

----------------------------------------------------------------------
 .../src/main/jython/gremlin_python/driver/connection.py       | 7 +++++--
 .../src/main/jython/gremlin_python/driver/protocol.py         | 7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/71587682/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
----------------------------------------------------------------------
diff --cc gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
index 1330483,2fc7c1b..014daff
--- a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
@@@ -85,13 -85,16 +86,15 @@@ class GremlinServerWSProtocol(AbstractB
          elif status_code == 204:
              result_set.stream.put_nowait([])
              del results_dict[request_id]
+             return status_code
          elif status_code in [200, 206]:
 -            results = []
 -            for msg in data["result"]["data"]:
 -                results.append(
 -                    self._message_serializer.deserialize_message(msg))
 -            result_set.stream.put_nowait(results)
 -            if status_code == 200:
 +            result_set.stream.put_nowait(data)
 +            if status_code == 206:
 +                message = self._transport.read()
 +                self.data_received(message, results_dict)
 +            else:
                  del results_dict[request_id]
+             return status_code
          else:
              del results_dict[request_id]
              raise GremlinServerError(