diff --git a/CHANGELOG.md b/CHANGELOG.md index ecfd001..f414c9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning]. ## [Unreleased] +## [0.0.22] - 2025-06-06 + +### Fixed in 0.0.22 + +- sz_file_loader thread pool could slowly drain with certain non-critical errors + ## [0.0.21] - 2025-05-14 ### Fixed in 0.0.21 diff --git a/setup.cfg b/setup.cfg index 7c53461..3690171 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = python-tools -version = 0.0.21 +version = 0.0.22 author = senzing author_email = support@senzing.com description = Python Tools diff --git a/sz_tools/sz_file_loader b/sz_tools/sz_file_loader index 588ec8c..551c970 100755 --- a/sz_tools/sz_file_loader +++ b/sz_tools/sz_file_loader @@ -943,9 +943,6 @@ def load_and_redo( if SzUnrecoverableError in type(err).mro(): shutdown.set() else: - if add_future and not shutdown.is_set(): - more_recs = add_new_future() - # If loading and None the line in the source was blank if mode.__name__ == "add_record" and result is None: load_blank_lines += 1 @@ -964,6 +961,9 @@ def load_and_redo( MODE_TEXT[mode.__name__]["stats_msg"], ) finally: + if add_future and not shutdown.is_set(): + more_recs = add_new_future() + del futures[f] # Early errors check to catch mapping errors, missing dsrc_code, etc