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

我的线程池在执行完毕后不会清除当前线程的MDC中的内容,导致后续无论怎么调用都还是原来的值,请问怎么解决啊 #58

Open
EkkoWH opened this issue Feb 28, 2023 · 2 comments
Labels
😖 no runnable reproducible demo 😵 please provide a simple runnable demo that reproduce the problem

Comments

@EkkoWH
Copy link

EkkoWH commented Feb 28, 2023

No description provided.

@oldratlee
Copy link
Owner

oldratlee commented Mar 1, 2023

原因很多。

@EkkoWH 请提供一个 极简、可运行、复现问题的 代码Demo工程。
推荐提供成一个单独的工程(GitHub repo)。这样可以:

  • 方便大家能排查分析;只提供片段代码、运行问题概述,排查信息不足
  • 方便分离不相关的业务实现内容,以及排除可能的业务使用问题
    如使用配置问题、其它业务代码的意外影响

@Joy-Panda
Copy link

测试不好复现 请求多了就出现了,就很简单的 在请求的Filter中设置MDC.put("trace_id",UUID),然后后面controller中用多线程去查询数据 有时候会出现几分钟前的 trace_id在几分钟之后的请求中还会出现。

@oldratlee oldratlee added the 😖 no runnable reproducible demo 😵 please provide a simple runnable demo that reproduce the problem label Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
😖 no runnable reproducible demo 😵 please provide a simple runnable demo that reproduce the problem
Projects
None yet
Development

No branches or pull requests

3 participants