Skip to content

fix: remove redundant pool.close() in _map_async_with_pool#2302

Merged
chenghao-guo merged 1 commit intolance-format:mainfrom
KeeProMise:#2301
Mar 21, 2026
Merged

fix: remove redundant pool.close() in _map_async_with_pool#2302
chenghao-guo merged 1 commit intolance-format:mainfrom
KeeProMise:#2301

Conversation

@KeeProMise
Copy link
Copy Markdown
Contributor

@KeeProMise KeeProMise commented Mar 20, 2026

#2301
The except block called pool.close() before re-raising, but the
finally block unconditionally calls pool.close() as well, resulting
in a double-close on every exception path.

Remove the redundant call from the except block and let finally
handle cleanup exclusively, which is the correct pattern for
try/except/finally resource management.

@github-actions github-actions Bot added the bug Something isn't working label Mar 20, 2026
@KeeProMise
Copy link
Copy Markdown
Contributor Author

@chenghao-guo
Hi, if you have time, please help to take a look at this PR, thanks!

@chenghao-guo
Copy link
Copy Markdown
Collaborator

@chenghao-guo Hi, if you have time, please help to take a look at this PR, thanks!

I see. Looks good. Thanks for reporting the bugfix.

@chenghao-guo chenghao-guo merged commit cc794a1 into lance-format:main Mar 21, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants