File tree Expand file tree Collapse file tree
packages/gooddata-sdk/src/gooddata_sdk/compute/model Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# (C) 2022 GoodData Corporation
22from __future__ import annotations
33
4+ import io
45import logging
56from typing import TYPE_CHECKING , Any , Union
67
@@ -408,9 +409,14 @@ def read_result_arrow(self) -> pyarrow.Table:
408409 _return_http_data_only = True ,
409410 )
410411 try :
411- return _ipc .open_stream (response ).read_all ()
412+ # Read the full HTTP response body before releasing the connection.
413+ # pyarrow's IPC stream reader stops at the Arrow EOS marker and may leave
414+ # the HTTP chunked-encoding terminator unread, which puts the connection in
415+ # Request-sent state and breaks HTTP keep-alive reuse.
416+ data = response .read ()
412417 finally :
413418 response .release_conn ()
419+ return _ipc .open_stream (io .BytesIO (data )).read_all ()
414420
415421 def cancel (self ) -> None :
416422 """
You can’t perform that action at this time.
0 commit comments