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

强转类型失败的bug #141

Closed
auyang-0626 opened this issue Jun 4, 2019 · 2 comments
Closed

强转类型失败的bug #141

auyang-0626 opened this issue Jun 4, 2019 · 2 comments
Assignees
Labels
🐞 bug Something isn't working ttl agent

Comments

@auyang-0626
Copy link

auyang-0626 commented Jun 4, 2019

你好,我们在trace系统中引入了ttl.同样遇到用户在beforeExecutor方法中,强转runnable的类型报错。

我的解决方法是:

agent增强的时候,拦截所有的ExecutorService派生出来的类,把它们的beforeExecutor和afterExecutor都增强下,从TtlRunnable取出用户原始的类型,然后还回去。

这种方式你觉得会有什么隐患吗?

@driventokill driventokill added the 🐞 bug Something isn't working label Jul 10, 2019
@oldratlee
Copy link
Member

oldratlee commented Jul 10, 2019

#133 #121 同一个问题

oldratlee added a commit that referenced this issue Jul 10, 2019
should unwrap ttl runnable for before/afterExecute methods of executor subclass
when decorate by ttl agent
oldratlee added a commit that referenced this issue Jul 10, 2019
should unwrap ttl runnable for before/afterExecute methods of executor subclass
when decorate by ttl agent
oldratlee added a commit that referenced this issue Jul 10, 2019
unwrap ttl runnable for before/afterExecute methods
of executor subclass when decorate by ttl agent

- setAutoWrapper for TtlRunnable/TtlCallable
  in TtlExecutorTransformlet(Agent)
- update before/afterExecute methods of executor subclasses,
  unwrap runnable if isAutoWrapper
oldratlee added a commit that referenced this issue Jul 10, 2019
unwrap ttl runnable for before/afterExecute methods
of executor subclass when decorate by ttl agent

- setAutoWrapper for TtlRunnable/TtlCallable
  in TtlExecutorTransformlet(Agent)
- update before/afterExecute methods of executor subclasses,
  unwrap runnable if isAutoWrapper
oldratlee added a commit that referenced this issue Jul 11, 2019
should unwrap ttl runnable for before/afterExecute methods of executor subclass
when decorate by ttl agent
oldratlee added a commit that referenced this issue Jul 11, 2019
unwrap ttl runnable for before/afterExecute methods
of executor subclass when decorate by ttl agent

- setAutoWrapper for TtlRunnable/TtlCallable
  in TtlExecutorTransformlet(Agent)
- update before/afterExecute methods of executor subclasses,
  unwrap runnable if isAutoWrapper
oldratlee added a commit that referenced this issue Jul 11, 2019
unwrap ttl runnable for before/afterExecute methods
of executor subclass when decorate by ttl agent

- setAutoWrapper for TtlRunnable/TtlCallable
  in TtlExecutorTransformlet(Agent)
- update before/afterExecute methods of executor subclasses,
  unwrap runnable if isAutoWrapper
oldratlee added a commit that referenced this issue Jul 11, 2019
should unwrap ttl runnable for before/afterExecute methods of executor subclass
when decorate by ttl agent
@oldratlee
Copy link
Member

oldratlee commented Jul 11, 2019

发布了版本 2.11.0 解决了这个问题。
https://github.com/alibaba/transmittable-thread-local/releases/tag/v2.11.0

你试试 是不是 OK的? :) @auyang-0626

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working ttl agent
Projects
None yet
Development

No branches or pull requests

3 participants