smengcl commented on issue #415: HDDS-2840. Implement ofs://: mkdir
   > Thanks for working on this @smengcl. I have started reviewing the PR.
   > In BasicRootedOzoneClientAdapterImpl, setting volume and bucket globally 
could lead to discrepancies.
   > Let's say my client creates one OzoneClient and multiple threads share 
this object.
   > Thread1 - createFile /vol1/bucket1/key1
   > Thread2 - createFile /vol1/bucket2/key2
   > ```
   > t1 - Thread1 sets bucket = bucket1
   > t2 - Thread2 sets bucket = bucket2
   > t3 - Thread1 executes bucket.createFile -> This would create key1 in 
   > ```
   Good point. The current implementation is not thread-safe.
   I believe I can just make `volume` and `bucket` local in each call to 
eliminate such race condition.

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.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to