Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-18062

migrate-activiti-workflows(sqlserver).sql hangs for MS SQL Server when upgrading with large workflow history on Alfresco startup


    • Type: Service Pack Request
    • Status: Closed
    • Resolution: Won't Fix
    • Affects Version/s: 5.0.4
    • Fix Version/s: None
    • Component/s: Upgrades, Workflow
    • Labels:
    • Bug Priority:
      Category 2
    • ACT Numbers:



      Alfresco 5.0.4
      Tomcat (out of the box)
      MS SQL Server 2012
      Windows Server 2012

      Customer is upgrading from Alfresco 5.0.1 to 5.0.4 using the Alfresco 5.0.4 installer. After restoring the database and content store, on startup the upgrade would hang for a very long time >1 hour when performing the upgrade scripts for the embedded activiti tables. Customer had an Activiti workflow history of around 2.5 million records. Using this information we were able to narrow this down to the issue was due to the following sql script:


      Upon searching for existing issues found this was related to MNT-17358. In MNT-17358 it was found the scripts were not done in a way that would handle massive amounts of data efficiently and just the PostgreSQL script was modified to add some additional indexes. However this has not been done to the other dialect scripts.

      I have attached the original script to the case, I was able to get the customer upgraded by manually running the script on the MS SQL Server 2012 server. The customer stated it took them just under 2 hours to complete this script. After which they were able to start the fresh Alfresco 5.0.4 upgrade and complete the upgrade process.

      [Steps to reproduce]

      1. Upgrade from any 5.0.x version prior to 5.0.4, with a large ( >1 million records) workflow history and using MS SQL Server 2012
      2. Upgrade to Alfresco 5.0.4 using MS SQL Server 2012
      3. Restore the database and contentstore from the pre-5.0.4 instance.
      4. Start Alfresco and monitor the upgrade process.

      [Expected Behaviour]
      Upgrade is processed and completes.

      [Observed Behaviour]
      Upgrade hangs and does not continue.


          Issue Links




                • Assignee:
                  closedissues Closed Issues
                  spatel Satyan Patel
                • Votes:
                  0 Vote for this issue
                  5 Start watching this issue


                  • Created:

                    Structure Helper Panel