You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/04/02 00:47:14 UTC

[GitHub] [ignite-python-thin-client] isapego opened a new pull request #27: IGNITE-14465: Add the ability to set and get cluster state

isapego opened a new pull request #27:
URL: https://github.com/apache/ignite-python-thin-client/pull/27


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-python-thin-client] isapego commented on a change in pull request #27: IGNITE-14465: Add the ability to set and get cluster state

Posted by GitBox <gi...@apache.org>.
isapego commented on a change in pull request #27:
URL: https://github.com/apache/ignite-python-thin-client/pull/27#discussion_r606316911



##########
File path: pyignite/connection/protocol_context.py
##########
@@ -0,0 +1,99 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from typing import Tuple
+
+from pyignite.connection.bitmask_feature import BitmaskFeature
+
+
+class ProtocolContext:
+    """
+    Protocol context. Provides ability to easily check supported supported
+    protocol features.
+    """
+
+    def __init__(self, version: Tuple[int, int, int], features: BitmaskFeature = None):
+        self._version = version
+        self._features = features
+        self._ensure_consistency()
+
+    def __hash__(self):
+        return hash((self._version, self._features))
+
+    def __eq__(self, other):
+        if isinstance(other, ProtocolContext):
+            return self.version == other.version and \
+                   self.features == other.features
+        return NotImplemented
+
+    def _ensure_consistency(self):
+        if not self.is_feature_flags_supported():
+            self._features = None
+
+    @property
+    def version(self):
+        return getattr(self, '_version', None)
+
+    def set_version(self, version: Tuple[int, int, int]):

Review comment:
       I'm not sure that it's OK when setter has some side-logic. Is it?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-python-thin-client] asfgit closed pull request #27: IGNITE-14465: Add the ability to set and get cluster state

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #27:
URL: https://github.com/apache/ignite-python-thin-client/pull/27


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-python-thin-client] ivandasch commented on a change in pull request #27: IGNITE-14465: Add the ability to set and get cluster state

Posted by GitBox <gi...@apache.org>.
ivandasch commented on a change in pull request #27:
URL: https://github.com/apache/ignite-python-thin-client/pull/27#discussion_r606303033



##########
File path: tests/custom/conftest.py
##########
@@ -0,0 +1,49 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import pytest
+
+from pyignite import Client, AioClient
+from tests.util import start_ignite
+
+
+@pytest.fixture(scope='module')
+def start_ignite_server():
+    def start(idx=1, debug=False, use_ssl=False, use_auth=False, use_persistence=False):

Review comment:
       But who will kill ignite after tests?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-python-thin-client] ivandasch commented on a change in pull request #27: IGNITE-14465: Add the ability to set and get cluster state

Posted by GitBox <gi...@apache.org>.
ivandasch commented on a change in pull request #27:
URL: https://github.com/apache/ignite-python-thin-client/pull/27#discussion_r606356654



##########
File path: pyignite/connection/protocol_context.py
##########
@@ -0,0 +1,99 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from typing import Tuple
+
+from pyignite.connection.bitmask_feature import BitmaskFeature
+
+
+class ProtocolContext:
+    """
+    Protocol context. Provides ability to easily check supported supported
+    protocol features.
+    """
+
+    def __init__(self, version: Tuple[int, int, int], features: BitmaskFeature = None):
+        self._version = version
+        self._features = features
+        self._ensure_consistency()
+
+    def __hash__(self):
+        return hash((self._version, self._features))
+
+    def __eq__(self, other):
+        if isinstance(other, ProtocolContext):
+            return self.version == other.version and \
+                   self.features == other.features
+        return NotImplemented
+
+    def _ensure_consistency(self):
+        if not self.is_feature_flags_supported():
+            self._features = None
+
+    @property
+    def version(self):
+        return getattr(self, '_version', None)
+
+    def set_version(self, version: Tuple[int, int, int]):

Review comment:
       I suppose that it is main purpose of getters/setters :)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-python-thin-client] ivandasch commented on a change in pull request #27: IGNITE-14465: Add the ability to set and get cluster state

Posted by GitBox <gi...@apache.org>.
ivandasch commented on a change in pull request #27:
URL: https://github.com/apache/ignite-python-thin-client/pull/27#discussion_r606216540



##########
File path: pyignite/queries/response.py
##########
@@ -44,7 +45,7 @@ def __build_header(self):
                 ('query_id', ctypes.c_longlong),
             ]
 
-            if self.protocol_version and self.protocol_version >= (1, 4, 0):
+            if self.protocol_context and self.protocol_context.is_status_flags_supported():

Review comment:
        I suppose, that check for None is ambigous here.... Let's remove it (if we are here, protocol context have been already set)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-python-thin-client] ivandasch commented on a change in pull request #27: IGNITE-14465: Add the ability to set and get cluster state

Posted by GitBox <gi...@apache.org>.
ivandasch commented on a change in pull request #27:
URL: https://github.com/apache/ignite-python-thin-client/pull/27#discussion_r606217775



##########
File path: pyignite/connection/protocol_context.py
##########
@@ -0,0 +1,53 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from typing import Tuple
+
+from pyignite.connection.bitmask_feature import BitmaskFeature
+
+
+class ProtocolContext:

Review comment:
       Let's make it hashable (`__hash__` and `__eq__`)  If we do it, we can cache c_types structs in dict by specific context.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-python-thin-client] ivandasch commented on a change in pull request #27: IGNITE-14465: Add the ability to set and get cluster state

Posted by GitBox <gi...@apache.org>.
ivandasch commented on a change in pull request #27:
URL: https://github.com/apache/ignite-python-thin-client/pull/27#discussion_r606302267



##########
File path: pyignite/connection/protocol_context.py
##########
@@ -0,0 +1,99 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from typing import Tuple
+
+from pyignite.connection.bitmask_feature import BitmaskFeature
+
+
+class ProtocolContext:
+    """
+    Protocol context. Provides ability to easily check supported supported
+    protocol features.
+    """
+
+    def __init__(self, version: Tuple[int, int, int], features: BitmaskFeature = None):
+        self._version = version
+        self._features = features
+        self._ensure_consistency()
+
+    def __hash__(self):
+        return hash((self._version, self._features))
+
+    def __eq__(self, other):
+        if isinstance(other, ProtocolContext):
+            return self.version == other.version and \
+                   self.features == other.features
+        return NotImplemented
+
+    def _ensure_consistency(self):
+        if not self.is_feature_flags_supported():
+            self._features = None
+
+    @property
+    def version(self):
+        return getattr(self, '_version', None)
+
+    def set_version(self, version: Tuple[int, int, int]):

Review comment:
       Why not use `@version.setter` ? 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-python-thin-client] ivandasch commented on a change in pull request #27: IGNITE-14465: Add the ability to set and get cluster state

Posted by GitBox <gi...@apache.org>.
ivandasch commented on a change in pull request #27:
URL: https://github.com/apache/ignite-python-thin-client/pull/27#discussion_r606303315



##########
File path: tests/custom/conftest.py
##########
@@ -0,0 +1,49 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import pytest
+
+from pyignite import Client, AioClient
+from tests.util import start_ignite
+
+
+@pytest.fixture(scope='module')
+def start_ignite_server():
+    def start(idx=1, debug=False, use_ssl=False, use_auth=False, use_persistence=False):
+        return start_ignite(
+            idx=idx,
+            debug=debug,
+            use_ssl=use_ssl,
+            use_auth=use_auth,
+            use_persistence=use_persistence,
+        )
+
+    return start
+
+
+@pytest.fixture(scope='module')
+def start_client():

Review comment:
       Who will close client? Please, see another _conftest.py




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-python-thin-client] isapego commented on a change in pull request #27: IGNITE-14465: Add the ability to set and get cluster state

Posted by GitBox <gi...@apache.org>.
isapego commented on a change in pull request #27:
URL: https://github.com/apache/ignite-python-thin-client/pull/27#discussion_r606236769



##########
File path: pyignite/connection/protocol_context.py
##########
@@ -0,0 +1,53 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from typing import Tuple
+
+from pyignite.connection.bitmask_feature import BitmaskFeature
+
+
+class ProtocolContext:

Review comment:
       Done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-python-thin-client] isapego commented on a change in pull request #27: IGNITE-14465: Add the ability to set and get cluster state

Posted by GitBox <gi...@apache.org>.
isapego commented on a change in pull request #27:
URL: https://github.com/apache/ignite-python-thin-client/pull/27#discussion_r606368587



##########
File path: pyignite/connection/protocol_context.py
##########
@@ -0,0 +1,99 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from typing import Tuple
+
+from pyignite.connection.bitmask_feature import BitmaskFeature
+
+
+class ProtocolContext:
+    """
+    Protocol context. Provides ability to easily check supported supported
+    protocol features.
+    """
+
+    def __init__(self, version: Tuple[int, int, int], features: BitmaskFeature = None):
+        self._version = version
+        self._features = features
+        self._ensure_consistency()
+
+    def __hash__(self):
+        return hash((self._version, self._features))
+
+    def __eq__(self, other):
+        if isinstance(other, ProtocolContext):
+            return self.version == other.version and \
+                   self.features == other.features
+        return NotImplemented
+
+    def _ensure_consistency(self):
+        if not self.is_feature_flags_supported():
+            self._features = None
+
+    @property
+    def version(self):
+        return getattr(self, '_version', None)
+
+    def set_version(self, version: Tuple[int, int, int]):

Review comment:
       Changed it.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-python-thin-client] isapego commented on a change in pull request #27: IGNITE-14465: Add the ability to set and get cluster state

Posted by GitBox <gi...@apache.org>.
isapego commented on a change in pull request #27:
URL: https://github.com/apache/ignite-python-thin-client/pull/27#discussion_r606238065



##########
File path: pyignite/queries/response.py
##########
@@ -44,7 +45,7 @@ def __build_header(self):
                 ('query_id', ctypes.c_longlong),
             ]
 
-            if self.protocol_version and self.protocol_version >= (1, 4, 0):
+            if self.protocol_context and self.protocol_context.is_status_flags_supported():

Review comment:
       Done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-python-thin-client] ivandasch commented on a change in pull request #27: IGNITE-14465: Add the ability to set and get cluster state

Posted by GitBox <gi...@apache.org>.
ivandasch commented on a change in pull request #27:
URL: https://github.com/apache/ignite-python-thin-client/pull/27#discussion_r606303033



##########
File path: tests/custom/conftest.py
##########
@@ -0,0 +1,49 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import pytest
+
+from pyignite import Client, AioClient
+from tests.util import start_ignite
+
+
+@pytest.fixture(scope='module')
+def start_ignite_server():
+    def start(idx=1, debug=False, use_ssl=False, use_auth=False, use_persistence=False):

Review comment:
       But who will kill ignite?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-python-thin-client] isapego commented on a change in pull request #27: IGNITE-14465: Add the ability to set and get cluster state

Posted by GitBox <gi...@apache.org>.
isapego commented on a change in pull request #27:
URL: https://github.com/apache/ignite-python-thin-client/pull/27#discussion_r606224476



##########
File path: pyignite/connection/aio_connection.py
##########
@@ -158,7 +160,7 @@ async def _connect_version(self) -> Union[dict, OrderedDict]:
             await self._send(stream.getbuffer(), reconnect=False)
 
         with AioBinaryStream(self.client, await self._recv(reconnect=False)) as stream:
-            hs_response = await HandshakeResponse.parse_async(stream, self.protocol_version)
+            hs_response = await HandshakeResponse.parse_async(stream, self.protocol_context)

Review comment:
       Good catch. Fixed.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-python-thin-client] ivandasch commented on a change in pull request #27: IGNITE-14465: Add the ability to set and get cluster state

Posted by GitBox <gi...@apache.org>.
ivandasch commented on a change in pull request #27:
URL: https://github.com/apache/ignite-python-thin-client/pull/27#discussion_r606218282



##########
File path: pyignite/connection/connection.py
##########
@@ -180,22 +166,22 @@ def connect(self) -> Union[dict, OrderedDict]:
         detecting_protocol = False
 
         # choose highest version first
-        if self.client.protocol_version is None:
+        if self.client.protocol_context is None:
             detecting_protocol = True
-            self.client.protocol_version = max(PROTOCOLS)
+            self.client.protocol_context = ProtocolContext(max(PROTOCOLS), BitmaskFeature.all_supported())
 
         try:
             result = self._connect_version()
         except HandshakeError as e:
             if e.expected_version in PROTOCOLS:
-                self.client.protocol_version = e.expected_version
+                self.client.protocol_context.version = e.expected_version

Review comment:
       We should discard `protocol_context.features` also. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-python-thin-client] ivandasch commented on a change in pull request #27: IGNITE-14465: Add the ability to set and get cluster state

Posted by GitBox <gi...@apache.org>.
ivandasch commented on a change in pull request #27:
URL: https://github.com/apache/ignite-python-thin-client/pull/27#discussion_r606219317



##########
File path: pyignite/connection/aio_connection.py
##########
@@ -158,7 +160,7 @@ async def _connect_version(self) -> Union[dict, OrderedDict]:
             await self._send(stream.getbuffer(), reconnect=False)
 
         with AioBinaryStream(self.client, await self._recv(reconnect=False)) as stream:
-            hs_response = await HandshakeResponse.parse_async(stream, self.protocol_version)
+            hs_response = await HandshakeResponse.parse_async(stream, self.protocol_context)

Review comment:
       We should update from response `protocol_context.features`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-python-thin-client] isapego commented on a change in pull request #27: IGNITE-14465: Add the ability to set and get cluster state

Posted by GitBox <gi...@apache.org>.
isapego commented on a change in pull request #27:
URL: https://github.com/apache/ignite-python-thin-client/pull/27#discussion_r606232807



##########
File path: pyignite/connection/connection.py
##########
@@ -180,22 +166,22 @@ def connect(self) -> Union[dict, OrderedDict]:
         detecting_protocol = False
 
         # choose highest version first
-        if self.client.protocol_version is None:
+        if self.client.protocol_context is None:
             detecting_protocol = True
-            self.client.protocol_version = max(PROTOCOLS)
+            self.client.protocol_context = ProtocolContext(max(PROTOCOLS), BitmaskFeature.all_supported())
 
         try:
             result = self._connect_version()
         except HandshakeError as e:
             if e.expected_version in PROTOCOLS:
-                self.client.protocol_version = e.expected_version
+                self.client.protocol_context.version = e.expected_version

Review comment:
       Fixed.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-python-thin-client] isapego commented on a change in pull request #27: IGNITE-14465: Add the ability to set and get cluster state

Posted by GitBox <gi...@apache.org>.
isapego commented on a change in pull request #27:
URL: https://github.com/apache/ignite-python-thin-client/pull/27#discussion_r606239003



##########
File path: pyignite/connection/connection.py
##########
@@ -227,7 +213,7 @@ def _connect_version(self) -> Union[dict, OrderedDict]:
             self.send(stream.getbuffer(), reconnect=False)
 
         with BinaryStream(self.client, self.recv(reconnect=False)) as stream:
-            hs_response = HandshakeResponse.parse(stream, self.protocol_version)
+            hs_response = HandshakeResponse.parse(stream, self.protocol_context)

Review comment:
       I update it a bit later




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-python-thin-client] ivandasch commented on a change in pull request #27: IGNITE-14465: Add the ability to set and get cluster state

Posted by GitBox <gi...@apache.org>.
ivandasch commented on a change in pull request #27:
URL: https://github.com/apache/ignite-python-thin-client/pull/27#discussion_r606219175



##########
File path: pyignite/connection/connection.py
##########
@@ -227,7 +213,7 @@ def _connect_version(self) -> Union[dict, OrderedDict]:
             self.send(stream.getbuffer(), reconnect=False)
 
         with BinaryStream(self.client, self.recv(reconnect=False)) as stream:
-            hs_response = HandshakeResponse.parse(stream, self.protocol_version)
+            hs_response = HandshakeResponse.parse(stream, self.protocol_context)

Review comment:
       We should update from response `protocol_context.features`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org