Skip to content

Commit 27404dc

Browse files
FlorentinDMats-SX
andcommitted
Dont hide original error
Co-authored-by: Mats Rydberg <mats@neo4j.org>
1 parent 5e72391 commit 27404dc

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

graphdatascience/query_runner/arrow_graph_constructor.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import concurrent
4+
import logging
45
import math
56
import warnings
67
from concurrent.futures import ThreadPoolExecutor
@@ -33,6 +34,7 @@ def __init__(
3334
)
3435
self._chunk_size = chunk_size
3536
self._min_batch_size = chunk_size * 10
37+
self._logger = logging.getLogger()
3638

3739
def run(self, node_dfs: list[DataFrame], relationship_dfs: list[DataFrame]) -> None:
3840
try:
@@ -60,8 +62,11 @@ def run(self, node_dfs: list[DataFrame], relationship_dfs: list[DataFrame]) -> N
6062

6163
self._client.relationship_load_done(self._graph_name)
6264
except (Exception, KeyboardInterrupt) as e:
63-
self._client.abort(self._graph_name)
64-
65+
try:
66+
self._client.abort(self._graph_name)
67+
except Exception as abort_exception:
68+
if not "No arrow process" in str(abort_exception):
69+
self._logger.warning(f"error aborting graph creation: {abort_exception}")
6570
raise e
6671

6772
def _partition_dfs(self, dfs: list[DataFrame]) -> list[DataFrame]:

0 commit comments

Comments
 (0)