swamirishi opened a new pull request, #9346:
URL: https://github.com/apache/ozone/pull/9346

   ## What changes were proposed in this pull request?
   Currenlty OzoneManagerLock returns a ThreadLocal object of OmLockDetails 
which cannot be reused across multiplic lock lifecycles. Thus we should ensure 
the object is always copied used to use the empty static EmptyLock instance.
   
   
https://github.com/apache/ozone/blob/5e715aa072f1dd02db056305a70d99619b785950/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/lock/OzoneManagerLock.java#L583
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-13978
   
   ## How was this patch tested?
   Added unit test
   Failure before fix in MultiSnapshotLock for the same unit test added
   ```
   INTERNAL_ERROR org.apache.hadoop.ozone.om.exceptions.OMException: More locks 
cannot be acquired when locks have been already acquired. Locks acquired : []
   
        at 
org.apache.hadoop.ozone.om.snapshot.MultiSnapshotLocks.acquireLock(MultiSnapshotLocks.java:59)
        at 
org.apache.hadoop.ozone.om.snapshot.TestMultiSnapshotLocks.testMultiSnapshotLocksWithMultipleResourceLocksMultipleTimes(TestMultiSnapshotLocks.java:81)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
java.util.concurrent.ForkJoinTask.doExec$$$capture(ForkJoinTask.java:289)
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java)
        at 
java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
        at 
java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)
   
   
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to