-
Notifications
You must be signed in to change notification settings - Fork 26.5k
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
dubbo RPC attachments java.util.ConcurrentModificationException #10078
Comments
RpcInvocation 实例是在什么场景出现了被多线程共享的情况? |
有两个条件,条件一是dubbo开启异步回调,条件二是高并发的情况下会存在非常小的概率发生这样的问题。线程1和线程2共享一个map,线程1在操作for循环的时候,线程2有一定的概率会修改与线程1共享的map。 |
@chickenlj @shenjiaqing1 我理解这个地方不应该会有并发问题的,因为一个线程发起完请求之后,AsyncRpcResult中存储了一份Threadlocal的对象,并且在ContextFilter进行了remove,所以即使这个这个线程在接收到下一个请求的同时,上一个请求返回了,也不会修改一个对象的。我看的代码版本是2.7.18 |
我理解不会的,都是ThreadLocal的,上一个请求回来的对象和下一次请求的不是一个对象的,我们也遇到类似的问题,不过并不是这个地方 |
我也遇到的这个问题
|
hashmap改成ConcurrentHashMap
The text was updated successfully, but these errors were encountered: