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

   ## What changes were proposed in this pull request?
   This PR changes DbVolume.hddsDbStorePathMap to a ConcurrentHashMap to fix a 
ConcurrentModificationException that occurs when SchemaV3 finalization adds a 
path under the data volume set lock while a concurrent volume failure iterates 
the map under the DB volume set lock. This prevents the unhandled exception 
from bypassing the IOException catch block, which previously caused the failed 
DB volume to remain active and permanently crashed the datanode's scheduled 
background disk checker.                                                        
                                                    
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-17015
   
   ## How was this patch tested?
   Created a new unit test: TestDbVolume#testFailVolumeWhileDbStorePathIsAdded  
and tried repro using the the same test without fix and it produces the exact 
`ConcurrentModificationException` by simulating a concurrent write to the map 
during the `failVolume` iteration. Also, it passes successfully once used 
ConcurrentHashMap as fix.
   
   Successful CI build : 
https://github.com/navinko/ozone/actions/runs/44751292691


-- 
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