On 19/01/2015 13:03, Pavel Dovgaluk wrote: > It will work for protecting the events list (I've already did this). > But that will not work for protecting the log file. > replay_run_event can write some data to the log. And also some other function > like replay_checkpoint > can also write to the log simultaneously (if we will remove the global mutex). > That's why we cannot simply replace the global mutex with some kind of local > one.
That's why you have to document very well the architecture and the locking policy. For example, why can't replay_run_event (or something that it calls) take the replay lock locally, when it writes to the log? If you do not document the architecture, we run in circles with me asking possibly stupid questions and you thinking that my questions are stupid. :) Paolo