Skip to content

Commit 6d8eacc

Browse files
committed
184 - Fix threadpool draining on non-critical error in sz_file_loader
1 parent b8c5f37 commit 6d8eacc

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning].
77

88
## [Unreleased]
99

10+
## [0.0.22] - 2025-06-06
11+
12+
### Fixed in 0.0.22
13+
14+
- sz_file_loader thread pool could slowly drain with certain non-critical errors
15+
1016
## [0.0.21] - 2025-05-14
1117

1218
### Fixed in 0.0.21

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = python-tools
3-
version = 0.0.21
3+
version = 0.0.22
44
author = senzing
55
author_email = support@senzing.com
66
description = Python Tools

sz_tools/sz_file_loader

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -943,9 +943,6 @@ def load_and_redo(
943943
if SzUnrecoverableError in type(err).mro():
944944
shutdown.set()
945945
else:
946-
if add_future and not shutdown.is_set():
947-
more_recs = add_new_future()
948-
949946
# If loading and None the line in the source was blank
950947
if mode.__name__ == "add_record" and result is None:
951948
load_blank_lines += 1
@@ -964,6 +961,9 @@ def load_and_redo(
964961
MODE_TEXT[mode.__name__]["stats_msg"],
965962
)
966963
finally:
964+
if add_future and not shutdown.is_set():
965+
more_recs = add_new_future()
966+
967967
del futures[f]
968968

969969
# Early errors check to catch mapping errors, missing dsrc_code, etc

0 commit comments

Comments
 (0)