Skip to content

[native] Fix PrestoQueryRunner in case query fails#21403

Merged
mbasmanova merged 1 commit intoprestodb:masterfrom
Yuhta:tasks/T170259750/0
Nov 16, 2023
Merged

[native] Fix PrestoQueryRunner in case query fails#21403
mbasmanova merged 1 commit intoprestodb:masterfrom
Yuhta:tasks/T170259750/0

Conversation

@Yuhta
Copy link
Contributor

@Yuhta Yuhta commented Nov 16, 2023

In case the query fails, PrestoQueryRunner::execute throws an exception. This triggers the destructor of SessionPool to be called in current thread instead of the event loop thread. Fix this by wrapping the ownership transfer inside SCOPE_EXIT.

In case the query fails, `PrestoQueryRunner::execute` throws an exception.  This
triggers the destructor of `SessionPool` to be called in current thread instead
of the event loop thread.  Fix this by wrapping the ownership transfer inside
`SCOPE_EXIT`.
@Yuhta Yuhta requested a review from a team as a code owner November 16, 2023 16:09
Copy link
Contributor

@mbasmanova mbasmanova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yuhta Jimmy, thank you for a quick fix.

CC: @duanmeng

@mbasmanova mbasmanova merged commit 6bcf330 into prestodb:master Nov 16, 2023
@wanglinsong wanglinsong mentioned this pull request Feb 12, 2024
64 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants