jbertram opened a new pull request, #6080:
URL: https://github.com/apache/activemq-artemis/pull/6080

   This commit mitigates a number of different potential race conditions 
involving configuration changes. Consider the storeAddressSetting method in 
o.a.a.a.c.p.i.j.AbstractJournalStorageManager. It mutates 
mapPersistedAddressSettings twice - once to delete an entry and once to put an 
entry. If another thread executes the recoverAddressSettings method in between 
these two operations it will not contain the record that is being stored. This 
same race condition exists for a number of different maps.
   
   This commit mitigates the race condition by ensuring that the relevant map 
is mutated only once (i.e. via put).
   
   This commit also refactors a number of methods to avoid duplicated code.
   
   There are no tests associated with this change since there's no 
deterministic way to induce the race condition. It relies on static analysis 
and existing tests to validate the fix and detect regressions.


-- 
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]
For further information, visit: https://activemq.apache.org/contact


Reply via email to