Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make use of ProcessHistoryRegistry thread safe #927

Merged

Commits on Sep 26, 2013

  1. HistoryAppender no longer uses ProcessHistoryRegistry

    To allow for thread-safe uses of the ProcessHistoryRegistry, the HistoryAppender no longer updates the ProcessHistoryRegistry to hold its appended history. Now it just returns a shared_ptr to the new or cached ProcessHistory. The shared_ptr is now owned by all Principals which are currently processing with that history.
    To simplify the sharing, we only cache the last ProcessHistory and no longer hold a map to all previously seen histories. This will allow us to have one HistoryAppender per Stream when used by the SubProcess.
    Dr15Jones committed Sep 26, 2013
    Configuration menu
    Copy the full SHA
    658858f View commit details
    Browse the repository at this point in the history
  2. Updated to match new HistoryAppender API

    The HistoryAppender now returns a shared_ptr<ProcessHistory const> so processHistoryPtr_ was changed to match. In addition, the fillPrincipal function no longer needs to modify the ProcessHistoryRegistry so the argument is now const.
    Dr15Jones committed Sep 26, 2013
    Configuration menu
    Copy the full SHA
    55e626f View commit details
    Browse the repository at this point in the history
  3. fill*Principal method no longer modifies the ProcessHistoryRegistry.

    The underlying Principal::fillPrincipal no longer modifies the ProcessHistoryRegistry and therefore takes a const reference. The fill*Principal methods were updated to match. This makes it clearer when reasoning about thread safety.
    Dr15Jones committed Sep 26, 2013
    Configuration menu
    Copy the full SHA
    f212a95 View commit details
    Browse the repository at this point in the history
  4. RunPrincipal::fillRunPrincipal no longer modifies the ProcessHistoryR…

    …egistry and RunPrincipal now holds the reducedProcessHistoryID
    
    -Principal::fillPrincipal no longer modifies the ProcessHistoryRegistry so now takes a const argument. fillRunPrincipal was updated to match.
    -The RunPrincipal now holds onto the reducedProcessHistoryID which is used to uniquely identify a Run. This makes identification of a Run easier for the SubProcess when it is time to write that Run.
    Dr15Jones committed Sep 26, 2013
    Configuration menu
    Copy the full SHA
    9505627 View commit details
    Browse the repository at this point in the history
  5. SubProcess has own copy of ProcessHistoryRegistry

    Now has its own copy of the ProcessHistoryRegistry as preparation for thread-safety. As part of the change, now get the parent’s reducedProcessHistoryID from the RunPrincipal and not from the parent ProcessHistoryRegistry (which is no longer accessible).
    Full thread-safety will require each Stream to have its own ProcessHistoryRegistry and HistoryAppender.
    Dr15Jones committed Sep 26, 2013
    Configuration menu
    Copy the full SHA
    6229158 View commit details
    Browse the repository at this point in the history
  6. EventPrcocessor uses new SubProcess constructor and reducedProcessHis…

    …tory from RunPrincipal
    
    The SubProcess no longer takes a ProcessHistoryRegistry as an argument to its constructor since it now has its own internal copy. This avoids possible updates of a ProcessHistoryRegistry from different threads.
    In addition, RunPrincipal now holds its reducedProcessHistoryID so the EventProcessor now uses it from the RunPrincipal and not the Source.
    Dr15Jones committed Sep 26, 2013
    Configuration menu
    Copy the full SHA
    483afab View commit details
    Browse the repository at this point in the history
  7. Pass const ProcessHistoryRegistry to fill*Principal

    The various fill*Principal member functions were changed to take a const ProcessHistoryRegistry. This change just swaps out using processHistoryRegistryForUpdate() and now use processHistoryRegistry() to make it clear that no change is required.
    Dr15Jones committed Sep 26, 2013
    Configuration menu
    Copy the full SHA
    b4346bb View commit details
    Browse the repository at this point in the history
  8. SubProcess has separate history info for each Run/Lumi/Stream

    If the SubProcess had only one ProcessHistoryRegistry, that registry could be updating at the same time the HistoryAppender was reading from it. Therefore we need separate ProcessHistoryRegistry and HistoryAppender for each concurrent Run, Lumi and Stream.
    Dr15Jones committed Sep 26, 2013
    Configuration menu
    Copy the full SHA
    37e88ee View commit details
    Browse the repository at this point in the history
  9. Merge branch 'CMSSW_7_0_X' into makeProcessHistoryRegistryThreadSafe

    Attempt to do a rebase failed without an adequate explanation from git as to why it failed.
    Dr15Jones committed Sep 26, 2013
    Configuration menu
    Copy the full SHA
    c695c53 View commit details
    Browse the repository at this point in the history