armeria icon indicating copy to clipboard operation
armeria copied to clipboard

Set RequestContext.isTimedOut(true) on DNS, session, write timeout

Open injae-kim opened this issue 1 year ago โ€ข 7 comments

Related issue #4935

Motivation:

We need to make sure CancellationScheduler.finishNow(TimeoutException) is invoked on more timeout types,
such as session/connection/DNS timeout so that true is set to ctx.isTimedOut().
  • On #4935, we found that RequestContext.isTimedout is not set true on DNS, session creation, write timeout so we need to fix it

Modifications:

  • Set RequestContext.isTimedOut(true) on DNS, session, write timeout by ctx.cancel(TimeoutException.class)

Result:

  • Now RequestContext.isTimedout is set true well on DNS, session, write timeout too
  • Close #4935

injae-kim avatar Aug 29 '23 14:08 injae-kim

๐Ÿ” Build Scanยฎ (commit: 24cffdf17f445bb9d5728bb51f38cd849fca14c6)

Job name Status Build Scanยฎ
build-windows-latest-jdk-21 โœ… https://ge.armeria.dev/s/clxvkstw6p5dy
build-self-hosted-unsafe-jdk-8 โœ… https://ge.armeria.dev/s/r22f6hwjvocdk
build-self-hosted-unsafe-jdk-21-snapshot-blockhound โœ… https://ge.armeria.dev/s/fth7o5hmyftbi
build-self-hosted-unsafe-jdk-17-min-java-17-coverage โœ… https://ge.armeria.dev/s/grez5if7iuxmo
build-self-hosted-unsafe-jdk-17-min-java-11 โœ… https://ge.armeria.dev/s/2uibvm3dg6zky
build-self-hosted-unsafe-jdk-17-leak โœ… https://ge.armeria.dev/s/625ltuwy2gv5y
build-self-hosted-unsafe-jdk-11 โœ… https://ge.armeria.dev/s/wepcqoajnf3tm
build-macos-12-jdk-21 โœ… https://ge.armeria.dev/s/m55la3jeimwok

github-actions[bot] avatar Aug 29 '23 14:08 github-actions[bot]

Codecov Report

Attention: Patch coverage is 50.00000% with 13 lines in your changes missing coverage. Please review.

Project coverage is 73.92%. Comparing base (863e27c) to head (084bf58). Report is 387 commits behind head on main.

Files Patch % Lines
...rmeria/client/SessionCreationTimeoutException.java 0.00% 10 Missing :warning:
...ia/client/SessionProtocolNegotiationException.java 66.66% 1 Missing and 1 partial :warning:
.../linecorp/armeria/client/ClientRequestContext.java 80.00% 0 Missing and 1 partial :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5156      +/-   ##
============================================
- Coverage     74.25%   73.92%   -0.34%     
- Complexity    19825    20023     +198     
============================================
  Files          1699     1722      +23     
  Lines         73046    73899     +853     
  Branches       9357     9406      +49     
============================================
+ Hits          54239    54628     +389     
- Misses        14371    14820     +449     
- Partials       4436     4451      +15     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Aug 29 '23 15:08 codecov[bot]

I think 1 or 2-2 is probably a realistic direction for this PR. Let me discuss with the other tomorrow morning

If there's some discussion progress about direction, feel free to share to me~! ๐Ÿ™‡

injae-kim avatar Oct 10 '23 06:10 injae-kim

We have decided to go with the second option. @jrhee17 is laying the groundwork for that. https://github.com/line/armeria/pull/5212 He will let you know when it's done. ๐Ÿ˜‰

minwoox avatar Oct 10 '23 07:10 minwoox

We have decided to go with the second option

aha~ I checked #5212. thanks for sharing! feel free to let me know when it's ready to go with the 2. option~! ๐Ÿ™‡

injae-kim avatar Oct 10 '23 08:10 injae-kim

Since #5212 has been completed, perhaps we can resume this work now? cc @jrhee17

minwoox avatar Apr 02 '24 01:04 minwoox

oh~ I'll update this PR on this weekend. thanks! :)

injae-kim avatar Apr 04 '24 09:04 injae-kim

Since https://github.com/line/armeria/pull/5212 has been completed, perhaps we can resume this work now?

@jrhee17, I updated this PR to latest based on #5212~! PTAL ๐Ÿ™‡

injae-kim avatar Jul 05 '24 08:07 injae-kim