Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vert.x event-loop threads start as "vert.x-eventloop-thread-" #13143

Merged
merged 2 commits into from Nov 7, 2020

Conversation

jponge
Copy link
Member

@jponge jponge commented Nov 5, 2020

This typo causes a bug where blocking checks fail when run on a Vert.x event-loop.

This typo causes a bug where blocking checks fail when run on a Vert.x event-loop.
@jponge
Copy link
Member Author

jponge commented Nov 5, 2020

This is a stupid bug, sorry for the mistake.

@jponge
Copy link
Member Author

jponge commented Nov 5, 2020

/cc @cescoffier

@@ -36,7 +36,7 @@ public boolean getAsBoolean() {
* calling from a Vert.x event-loop context / thread.
*/
String threadName = Thread.currentThread().getName();
return !threadName.contains("vertx-eventloop-thread-");
return !threadName.startsWith("vert.x-eventloop-thread-");
Copy link
Member

Choose a reason for hiding this comment

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

Couldn't we have a constant in Vert.x or an API to test that?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, because this would add dependency from this extension to Vert.x core. I had initially tried writing the test with Vert.x APIs, but that didn't work here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Note that this naming scheme has been consistent over the years and is not changing anytime soon.

Copy link
Member

Choose a reason for hiding this comment

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

We want to avoid having an explicit dependency on Vert.x. I believe there is a comment about that.
That being said, we can create a constant.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a constant

@jponge jponge force-pushed the bug/mutiny-blocking-vertx-check branch from a2a2a74 to 5332dc7 Compare November 6, 2020 08:01
@gsmet
Copy link
Member

gsmet commented Nov 6, 2020

@cescoffier I let you check and merge this one. Thanks!

@cescoffier cescoffier merged commit b080867 into quarkusio:master Nov 7, 2020
@cescoffier cescoffier added this to the 1.10 - master milestone Nov 7, 2020
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.

None yet

3 participants