io.camunda.zeebe.client.impl.oauth.OAuthCredentialsCache
is not thread safe.
#11885
Labels
kind/bug
Categorizes an issue or PR as a bug
version:8.2.0
Marks an issue as being completely or in parts released in 8.2.0
Describe the bug
After #11816 I never thought that the
io.camunda.zeebe.client.impl.oauth.OAuthCredentialsProvider
is not a thread-safe. So, when you start multipleJobWorker
in parallel withOAuthCredentialsProvider
you got a problem in this method: https://github.com/camunda/zeebe/blob/28fe054b79fcc7398a086a1576199efef01a122c/clients/java/src/main/java/io/camunda/zeebe/client/impl/oauth/OAuthCredentialsCache.java#L87-L111So, in there is the first checking that the file exists, and then there is a creating one if none exists. If this part of the code is executed concurrently we get an error that we are trying to create a file that already exists.
To Reproduce
OAuthCredentialsProvider
Expected behavior
If requests with the Zeebe Client and
OAuthCredentialsProvider
runned at parallel there is no error about a file, that already created.Log/Stacktrace
Full Stacktrace
Environment:
OAuthCredentialsProvider
The text was updated successfully, but these errors were encountered: