Skip to content

Conversation

@bjhham
Copy link
Contributor

@bjhham bjhham commented Nov 4, 2025

Subsystem
Server, Netty

Motivation
KTOR-9054 Netty: application and call coroutine scopes share the same job instance since 3.3.0

Solution
Reverted mistake made in #5070 where I assumed the engine call would follow the job hierarchy and the pipeline context did not, but it is in fact the other way around. It seems the change was not necessary for the auto-reloading fix so it should be fine.

I also included a test to ensure that call coroutine jobs are children of the application job and found this isn't the case all the time, so I fixed the standard Jetty engine and ignored other tests to mitigate impact. Logged a follow up issue KTOR-9058 to fix CIO.

@bjhham bjhham requested review from e5l and osipxd November 4, 2025 09:00
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 4, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bjhham/routing-call-coroutine-context-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@bjhham bjhham force-pushed the bjhham/routing-call-coroutine-context-fix branch 3 times, most recently from 64444e2 to dc8afa3 Compare November 4, 2025 11:27
@bjhham bjhham marked this pull request as ready for review November 4, 2025 11:44
@bjhham bjhham force-pushed the bjhham/routing-call-coroutine-context-fix branch from 05ebd83 to 95de419 Compare November 4, 2025 12:40
@bjhham bjhham force-pushed the bjhham/routing-call-coroutine-context-fix branch from 95de419 to e19577f Compare November 4, 2025 13:53
@bjhham bjhham merged commit 08006fc into release/3.x Nov 4, 2025
17 checks passed
@bjhham bjhham deleted the bjhham/routing-call-coroutine-context-fix branch November 4, 2025 15:50
osipxd added a commit that referenced this pull request Nov 18, 2025
* KTOR-9054 Fix application call coroutine context

* KTOR-9054 Fixup Jetty engine coroutines

* Update ktor-server/ktor-server-test-suites/jvm/src/io/ktor/server/testing/suites/SustainabilityTestSuite.kt

Co-authored-by: Osip Fatkullin <osip.fatkullin@jetbrains.com>

* Disable tomcat coroutine hierarchy check

---------

Co-authored-by: Osip Fatkullin <osip.fatkullin@jetbrains.com>
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.

3 participants