Uploaded image for project: 'eXo-JCR'
  1. eXo-JCR
  2. EXOJCR-1726

Ensure that all the running transactions are over before allowing to stop the JCR

    Details

      Description

      The goal of this task is to ensure that if when we have a JCR running with updates in progress and the administrator calls Ctrl + C to properly stop the server, we need to be sure that the running transactions are over before stopping the JCR otherwise it could create some inconsistency between for example the JCR data and the Lock Data and/or the luncene indexes. I checked by adding a pause at the beginning and at the end of the method CacheableWorkspaceDataManager.doSave(), these pauses are added on demand only to allow the server to start, I built a JCR on tomcat, I launched the server, added some content using FTP and realized that when I call Ctrl + C, the workspace is stopped even if there is a tx running.

      The proposed patch simply suspends the workspace at CacheableWorkspaceDataManager.stop() which ensures that no new updates will be allowed and the running ones will be completed before stopping the workspace.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                tolusha Anatolii Bazko
                Reporter:
                nfilotto Nicolas Filotto
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 days, 4 hours Original Estimate - 2 days, 4 hours
                  2d 4h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week
                  1w