christophd commented on PR #5317:
URL: https://github.com/apache/camel-k/pull/5317#issuecomment-2037323925

   I tried to solve this in the E2E test setup (with mutex lock) where the 
clients get instantiated (see 
https://github.com/apache/camel-k/blob/main/e2e/support/test_support.go#L165). 
   
   But looking closer at the code I see that the kamel install command will 
always use a new client instance and this can lead to the concurrent map write. 
So the proposed solution here makes sense to me. I do not know if this 
synchronization has some other side effects though.
   
   How about synchronizing the `NewOutOfClusterClient` func which is used by 
kamel CLI so we do not harm any operator client usage? Also I would remove the 
mutex lock that I have introduced in the test support then to avoid duplicate 
locking.


-- 
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: commits-unsubscr...@camel.apache.org

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

Reply via email to