Skip to content

Interrupt stuck splits#13042

Closed
tangjiangling wants to merge 4 commits intotrinodb:masterfrom
tangjiangling:interrupt_runaway_splits
Closed

Interrupt stuck splits#13042
tangjiangling wants to merge 4 commits intotrinodb:masterfrom
tangjiangling:interrupt_runaway_splits

Conversation

@tangjiangling
Copy link
Copy Markdown
Member

@tangjiangling tangjiangling commented Jun 29, 2022

For regular expression matching, especially when using the Joni regular library,
this may cause the task thread to take so long that it looks like a dead loop,
which may result in no free threads for the worker to process other splits.

Since the Joni regular library supports handling interrupts, this PR gives
the task thread a chance to exit by interrupting the task thread of Joni regular
functions that has been running for a long time.

Co-authored-by: @leetcode-1533

Description

Is this change a fix, improvement, new feature, refactoring, or other?

Fix.

Is this a change to the core query engine, a connector, client library, or the SPI interfaces? (be specific)

Core query engine.

How would you describe this change to a non-technical end user or system administrator?

Fix potential deadlock during execution of Joni regular functions.

Related issues, pull requests, and links

Superceding #12392

Documentation

( ) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.

Release notes

( ) No release notes entries required.
( ) Release notes entries required with the following suggested text:

# Section
* Fix some things. ({issue}`issuenumber`)

tangjiangling and others added 3 commits June 30, 2022 04:57
- Fix typo
- Inline variable
- Remove unused parameter
The previous name `maxActiveSplit*` was not very readable, so it has
been renamed.
Co-authored-by: Yingjie Luan <1275963@gmail.com>
For regular expression matching, especially when using the Joni regular library,
this may cause the task thread to take so long that it looks like a dead loop,
which may result in no free threads for the worker to process other splits.

Since the Joni regular library supports handling interrupts, this commit gives
the task thread a chance to exit by interrupting the task thread of Joni regular
functions that has been running for a long time.

Co-authored-by: Yingjie Luan <1275963@gmail.com>
@tangjiangling tangjiangling force-pushed the interrupt_runaway_splits branch from 11aabcf to 568fbe3 Compare June 30, 2022 08:53
@tangjiangling
Copy link
Copy Markdown
Member Author

@arhimondr PTAL

@groupcache4321
Copy link
Copy Markdown
Contributor

Hey, thanks for helping! Can you help with with #12392! I would really appreciate that! I can add you as coauthor.

@tangjiangling
Copy link
Copy Markdown
Member Author

Close this PR and continue on #12392. (There are some code cleanup commits that I will re-file PR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants