You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by GitBox <gi...@apache.org> on 2022/12/29 06:15:29 UTC

[GitHub] [incubator-eventmesh] Alonexc opened a new issue, #2725: [Enhancement] Method shutdown() creates iterators on synchronized collections

Alonexc opened a new issue, #2725:
URL: https://github.com/apache/incubator-eventmesh/issues/2725

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/eventmesh/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Enhancement Request
   
   ![image](https://user-images.githubusercontent.com/91315508/209910797-391dae96-5d33-4e4a-bedb-63cd8e480b38.png)
   ![image](https://user-images.githubusercontent.com/91315508/209910800-8aa01866-06ce-4683-a57a-73bfc699be24.png)
   located at:
   eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/push/HTTPClientPool.java line 56,74
   analysis and explanation:
   This method uses a synchronized collection, built from Collections.synchronizedXXXX, but accesses it through an iterator. Since an iterator is, by definition, multithreading-unsafe, this is a conflict in concept. When using iterators, should do the synchronization manually.
   
   
   ### Describe the solution you'd like
   
   1.Synchronize manually.
   2. Field 'clients' may be 'final'
   reference:
   ![image](https://user-images.githubusercontent.com/91315508/209910839-c647039d-cfb8-416b-a3e6-bc10dfaf4f86.png)
   
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] jonyangx commented on issue #2725: [Enhancement] Method shutdown() creates iterators on synchronized collections

Posted by GitBox <gi...@apache.org>.
jonyangx commented on issue #2725:
URL: https://github.com/apache/incubator-eventmesh/issues/2725#issuecomment-1368147085

   I'd like to fix it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] xwm1992 closed issue #2725: [Enhancement] Method shutdown() creates iterators on synchronized collections

Posted by GitBox <gi...@apache.org>.
xwm1992 closed issue #2725: [Enhancement] Method shutdown() creates iterators on synchronized collections
URL: https://github.com/apache/incubator-eventmesh/issues/2725


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org