Skip to content

Commit

Permalink
Update storage client as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Aiee committed Jan 18, 2023
1 parent b2ded23 commit 97acc41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion nebula3/gclient/net/Connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ def open_SSL(self, ip, port, timeout, ssl_config=None):
s.setTimeout(timeout)
transport = THeaderTransport.THeaderTransport(s)
protocol = THeaderProtocol.THeaderProtocol(transport)
# protocol = TCompactProtocol.TCompactProtocol(transport) # using compact protocol still cause nebula3.Exception.IOErrorException: Header transport frame was too large

transport.open()
self._connection = GraphService.Client(protocol)
Expand Down
9 changes: 4 additions & 5 deletions nebula3/sclient/net/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@

from nebula3.Exception import InValidHostname
from nebula3.storage import GraphStorageService
from nebula3.storage.ttypes import ScanVertexRequest, ScanEdgeRequest
from nebula3.fbthrift.transport import TSocket, TTransport
from nebula3.fbthrift.protocol import TBinaryProtocol
from nebula3.fbthrift.transport import TSocket, THeaderTransport
from nebula3.fbthrift.protocol import THeaderProtocol


class GraphStorageConnection(object):
Expand All @@ -35,8 +34,8 @@ def open(self):
s = TSocket.TSocket(self._address.host, self._address.port)
if self._timeout > 0:
s.setTimeout(self._timeout)
transport = TTransport.TBufferedTransport(s)
protocol = TBinaryProtocol.TBinaryProtocol(transport)
transport = THeaderTransport.THeaderTransport(s)
protocol = THeaderProtocol.THeaderProtocol(transport)
transport.open()
self._connection = GraphStorageService.Client(protocol)
except Exception:
Expand Down

0 comments on commit 97acc41

Please sign in to comment.