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

Make zipkin's current context can be nested #1262

Closed
wants to merge 2 commits into from

Commits on Jun 17, 2018

  1. Make zipkin's current context can be nested

    Apply this change will fix TraceContext leak in thread problem.
    There is a case that we keep armeria's request context aware CompletableFuture
    for fetching data, and let multiple request register callback on that future.
    So there is a problem that future uses first request's eventloop and RequestContext
    to call waiting handlers, but each handler may wrap with it's RequestContext, so
    there is nested RequestContext on same thread(onEnter->onEnter->onExit->onExit).
    
    Another solution is application developer should always jump back to current request's
    context aware eventloop. e.g.
    
    ```
    
    cachedFuture.acceptAsync((r, e)->{
      ...
    }, RequestContext.current.contextAwareEventloop);
    
    ```
    
    I'm not sure if armeria side need to take care of this or not...
    kojilin committed Jun 17, 2018
    Configuration menu
    Copy the full SHA
    a26697c View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2018

  1. Append test.

    kojilin committed Jun 18, 2018
    Configuration menu
    Copy the full SHA
    b61e37a View commit details
    Browse the repository at this point in the history