Service Packs and Hot Fixes
  1. Service Packs and Hot Fixes
  2. MNT-4211

'patch.convertContentUrls' (3.3 Community, 3.2SP1) can result in "No ContentData value exists for ID" errors

    Details

    • Type: Bug Bug
    • Status: Closed Closed (View Workflow)
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.2.1, 3.3
    • Fix Version/s: 3.2.1 HF, 3.2.2, 3.3
    • Component/s: Repository
    • Labels:
      None
    • Environment:
      CENTOS 5.4 VM
      Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
      JAVA_OPTS="-Xss1024K -Xms1G -Xmx2G -XX:MaxPermSize=128M -XX:NewSize=512m -server"

      Description

      Upgrade to 3.2SP1 or 3.3 Community can gives "No ContentData" errors when accessing certain spaces within the DM repository from the web client.

      A full index rebuild in 3.3 also reports many "No ContentData" errors in the Reindexer. For example:
      00:05:03,131 ERROR [index.AbstractReindexComponent.threads] Reindexer 320 failed with error: No ContentData value exists for ID 298342

      == Analysis ==

      'patch.convertContentUrls' runs concurrent batch jobs to perform the work. Due to a bug in AbstractPatchDAOImpl.updateAdmV31ContentProperties, some nodes can be left pointing to non-existent ContentData entries.

      == Detecting the Failure ==

      Run the following SQL after an upgrade to detect if a problem was caused:
      select * from alf_node_properties np
      left join alf_content_data cd on (cd.id = np.long_value)
      where np.actual_type_n = 21
      and cd.id is null
      Any returned results indicate an error

      == Switching off the Patch ==

      This patch can be switched off and executed at will at a later date. Add the following bean to an extension context:
      <bean id="patch.convertContentUrls" class="java.util.ArrayList" />
      <bean id="contentUrlConverterJobDetail" class="java.util.ArrayList"/>
      <bean id="contentUrlConverterTrigger" class="java.util.ArrayList"/>
      or set the following property to alfresco-global.properties:
      system.content.contentUrlConverter.runAsScheduledJob=true
      Applying the former bean overrides is better as you won't need to manually trigger the patch when the fix is available later on.

      == Recovery ==

      If the patch has executed and there ARE problem rows, you should either go back to a backup and upgrade without the patch or get a copy of the data from before the upgrade. Contact Alfresco support who will help to fix the specific database entries.

        Issue Links

          Activity

          Hide
          Alfresco QA Team added a comment -

          Validated against 3.3.0 beta 48

          Show
          Alfresco QA Team added a comment - Validated against 3.3.0 beta 48
          Hide
          Alfresco QA Team added a comment -

          Successfully tested against upgrade 3.2.0r2.2440 -> 3.3.0g.2846 (on MySQL 5.1.41 Community Server) with generated and verified upgrade template data:

          19:28:52,844 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Applying patch 'patch.convertContentUrls' (Converts pre-3.2 content URLs to use the alf_content_data table. The conversion work can also be done on a schedule; please contact Alfresco Support for further details.).
          19:28:52,906 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Content URL conversion progress:
          19:28:52,922 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Processing ADM Content URLs.
          19:28:54,063 DEBUG [org.alfresco.repo.admin.patch.PatchExecuter] 10001/19776
          19:28:55,922 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Finished processing ADM nodes up to ID 19,776.
          19:28:56,391 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Processing AVM Content URLs.
          19:30:07,592 DEBUG [org.alfresco.repo.admin.patch.PatchExecuter] 10001/10560
          19:30:09,561 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Finished processing AVM nodes up to ID 10,560.
          19:30:09,998 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Reading content URLs from store FileContentStore[ root=g:\upgrade\alf_data\contentstore, allowRandomAccess=true, readOnly=false].
          . . .
          19:35:21,922 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Scheduled 41,588 content URLs for deletion from store: FileContentStore[ root=g:\upgrade\alf_data\contentstore, allowRandomAccess=true, readOnly=false]

          19:35:24,078 INFO [org.alfresco.repo.admin.patch.PatchExecuter]
          === Applied patch ===
          ID: patch.convertContentUrls
          RESULT:
          Content URL conversion completed.
          =====================================

          mysql> select * from alf_node_properties np left join alf_content_data cd on (cd.id = np.long_value) where np.actual_type_n = 21 and cd.id is null;
          Empty set (0.89 sec)

          mysql> select * from alf_node_properties where actual_type_n = 11;
          Empty set (1.25 sec)

          Show
          Alfresco QA Team added a comment - Successfully tested against upgrade 3.2.0r2.2440 -> 3.3.0g.2846 (on MySQL 5.1.41 Community Server) with generated and verified upgrade template data: 19:28:52,844 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Applying patch 'patch.convertContentUrls' (Converts pre-3.2 content URLs to use the alf_content_data table. The conversion work can also be done on a schedule; please contact Alfresco Support for further details.). 19:28:52,906 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Content URL conversion progress: 19:28:52,922 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Processing ADM Content URLs. 19:28:54,063 DEBUG [org.alfresco.repo.admin.patch.PatchExecuter] 10001/19776 19:28:55,922 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Finished processing ADM nodes up to ID 19,776. 19:28:56,391 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Processing AVM Content URLs. 19:30:07,592 DEBUG [org.alfresco.repo.admin.patch.PatchExecuter] 10001/10560 19:30:09,561 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Finished processing AVM nodes up to ID 10,560. 19:30:09,998 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Reading content URLs from store FileContentStore[ root=g:\upgrade\alf_data\contentstore, allowRandomAccess=true, readOnly=false]. . . . 19:35:21,922 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Scheduled 41,588 content URLs for deletion from store: FileContentStore[ root=g:\upgrade\alf_data\contentstore, allowRandomAccess=true, readOnly=false] 19:35:24,078 INFO [org.alfresco.repo.admin.patch.PatchExecuter] === Applied patch === ID: patch.convertContentUrls RESULT: Content URL conversion completed. ===================================== mysql> select * from alf_node_properties np left join alf_content_data cd on (cd.id = np.long_value) where np.actual_type_n = 21 and cd.id is null; Empty set (0.89 sec) mysql> select * from alf_node_properties where actual_type_n = 11; Empty set (1.25 sec)
          Hide
          Alfresco QA Team added a comment -

          Successfully tested against upgrade 3.1.1.229 -> 3.2.1.8.14 (on MySQL 5.1.41) with generated and verified upgrade template data:

          14:28:56,941 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Applying patch 'patch.convertContentUrls' (Converts pre-3.2 content URLs to use the alf_content_data table. The conversion work can also be done on a schedule; please contact Alfresco Support for further details.).
          14:28:57,097 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Content URL conversion progress:
          14:28:57,097 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Processing ADM Content URLs.
          14:29:36,253 DEBUG [org.alfresco.repo.admin.patch.PatchExecuter] 10001/18618
          14:30:10,519 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Finished processing ADM nodes up to ID 18,618.
          14:30:10,925 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Processing AVM Content URLs.
          14:31:07,081 DEBUG [org.alfresco.repo.admin.patch.PatchExecuter] 10001/10611
          14:31:12,644 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Finished processing AVM nodes up to ID 10,611.
          14:31:13,003 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Reading content URLs from store FileContentStore[ root=g:\upgrade\alf_data\contentstore, allowRandomAccess=true, readOnly=false].
          . . .
          14:36:17,831 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Scheduled 40,935 content URLs for deletion from store: FileContentStore[ root=g:\upgrade\alf_data\contentstore, allowRandomAccess=true, readOnly=false]

          14:36:24,722 INFO [org.alfresco.repo.admin.patch.PatchExecuter]
          === Applied patch ===
          ID: patch.convertContentUrls
          RESULT:
          Content URL conversion completed.
          =====================================

          mysql> select * from alf_node_properties np left join alf_content_data cd on (cd
          .id = np.long_value) where np.actual_type_n = 21 and cd.id is null;
          Empty set (1.16 sec)

          mysql> select * from alf_node_properties where actual_type_n = 11;
          Empty set (1.17 sec)

          Show
          Alfresco QA Team added a comment - Successfully tested against upgrade 3.1.1.229 -> 3.2.1.8.14 (on MySQL 5.1.41) with generated and verified upgrade template data: 14:28:56,941 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Applying patch 'patch.convertContentUrls' (Converts pre-3.2 content URLs to use the alf_content_data table. The conversion work can also be done on a schedule; please contact Alfresco Support for further details.). 14:28:57,097 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Content URL conversion progress: 14:28:57,097 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Processing ADM Content URLs. 14:29:36,253 DEBUG [org.alfresco.repo.admin.patch.PatchExecuter] 10001/18618 14:30:10,519 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Finished processing ADM nodes up to ID 18,618. 14:30:10,925 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Processing AVM Content URLs. 14:31:07,081 DEBUG [org.alfresco.repo.admin.patch.PatchExecuter] 10001/10611 14:31:12,644 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Finished processing AVM nodes up to ID 10,611. 14:31:13,003 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Reading content URLs from store FileContentStore[ root=g:\upgrade\alf_data\contentstore, allowRandomAccess=true, readOnly=false]. . . . 14:36:17,831 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Scheduled 40,935 content URLs for deletion from store: FileContentStore[ root=g:\upgrade\alf_data\contentstore, allowRandomAccess=true, readOnly=false] 14:36:24,722 INFO [org.alfresco.repo.admin.patch.PatchExecuter] === Applied patch === ID: patch.convertContentUrls RESULT: Content URL conversion completed. ===================================== mysql> select * from alf_node_properties np left join alf_content_data cd on (cd .id = np.long_value) where np.actual_type_n = 21 and cd.id is null; Empty set (1.16 sec) mysql> select * from alf_node_properties where actual_type_n = 11; Empty set (1.17 sec)
          Hide
          Alfresco QA Team added a comment -

          Both scenarios (upgrade & full index rebuild) are passed w/o errors for 3.2.2.515

          Show
          Alfresco QA Team added a comment - Both scenarios (upgrade & full index rebuild) are passed w/o errors for 3.2.2.515
          Hide
          Alfresco QA Team added a comment - - edited

          Successfully tested against upgrade 3.1.1.229 -> 3.2.2.515 (with Oracle 10g) with generated and verified upgrade template data + further FULL index recovery:

          17:12:31,424 DEBUG [org.alfresco.repo.admin.patch.PatchExecuter] Patch schema version number check against repo version:
          repo schema version: 3.1.1 (229)
          patch: Patch[ id=patch.convertContentUrls, description=patch.convertContentUrls.description, fixesFromSchema=0, fixesToSchema=3499, targetSchema=3500]
          17:12:31,424 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Applying patch 'patch.convertContentUrls' (Converts pre-3.2 content URLs to use the alf_content_data table. The conversion work can also be done on a schedule; please contact Alfresco Support for further details.).
          17:12:31,470 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Content URL conversion progress:
          17:12:31,470 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Processing ADM Content URLs.
          17:12:38,245 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Patch patch.convertContentUrls 10% complete, estimated complete at 7/22/10 5:13 PM.
          17:12:59,553 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Finished processing ADM nodes up to ID 96,514.
          17:12:59,831 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Processing AVM Content URLs.
          17:13:20,824 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Finished processing AVM nodes up to ID 10,537.
          17:13:21,517 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Reading content URLs from store FileContentStore[ root=g:\ALF-2351_upg\alf_data\contentstore, allowRandomAccess=true, readOnly=false].
          . . .
          17:18:27,267 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Scheduled 79,988 content URLs for deletion from store: FileContentStore[ root=g:\ALF-2351_upg\alf_data\contentstore, allowRandomAccess=true, readOnly=false]
          17:18:27,487 DEBUG [org.alfresco.repo.admin.patch.PatchExecuter] Applied patch:
          AppliedPatch[ id=patch.convertContentUrls, description=Converts pre-3.2 content URLs to use the alf_content_data table. The conversion work can also be done on a schedule; please contact Alfresco Support for further details., fixesFromSchema=0, fixesToSchema=3499, targetSchema=3500, appliedToSchema=1009, appliedToServer=3.2.2 (515) - Enterprise, appliedOnDate=Thu Jul 22 17:18:27 EEST 2010, wasExecuted=true, succeeded=true, report=Content URL conversion completed.]

          . . .

          17:18:28,128 INFO [org.alfresco.repo.admin.patch.PatchExecuter]
          === Applied patch ===
          ID: patch.convertContentUrls
          RESULT:
          Content URL conversion completed.
          =====================================

          SELECT * FROM ALFUPG.ALF_NODE_PROPERTIES np LEFT JOIN ALFUPG.ALF_CONTENT_DATA cd ON (cd.id = np.long_value) WHERE np.actual_type_n = 21 AND cd.id IS NULL
          0 record(s) selected [Fetch MetaData: 0/ms] [Fetch Data: 0/ms]
          [Executed: 22/07/10 17:50:12 EEST ] [Execution: 78/ms]

          SELECT * FROM ALFUPG.ALF_NODE_PROPERTIES WHERE actual_type_n = 11
          0 record(s) selected [Fetch MetaData: 0/ms] [Fetch Data: 0/ms]
          [Executed: 22/07/10 17:51:09 EEST ] [Execution: 31/ms]

          Show
          Alfresco QA Team added a comment - - edited Successfully tested against upgrade 3.1.1.229 -> 3.2.2.515 (with Oracle 10g) with generated and verified upgrade template data + further FULL index recovery: 17:12:31,424 DEBUG [org.alfresco.repo.admin.patch.PatchExecuter] Patch schema version number check against repo version: repo schema version: 3.1.1 (229) patch: Patch[ id=patch.convertContentUrls, description=patch.convertContentUrls.description, fixesFromSchema=0, fixesToSchema=3499, targetSchema=3500] 17:12:31,424 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Applying patch 'patch.convertContentUrls' (Converts pre-3.2 content URLs to use the alf_content_data table. The conversion work can also be done on a schedule; please contact Alfresco Support for further details.). 17:12:31,470 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Content URL conversion progress: 17:12:31,470 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Processing ADM Content URLs. 17:12:38,245 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Patch patch.convertContentUrls 10% complete, estimated complete at 7/22/10 5:13 PM. 17:12:59,553 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Finished processing ADM nodes up to ID 96,514. 17:12:59,831 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Processing AVM Content URLs. 17:13:20,824 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Finished processing AVM nodes up to ID 10,537. 17:13:21,517 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Reading content URLs from store FileContentStore[ root=g:\ ALF-2351 _upg\alf_data\contentstore, allowRandomAccess=true, readOnly=false]. . . . 17:18:27,267 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Scheduled 79,988 content URLs for deletion from store: FileContentStore[ root=g:\ ALF-2351 _upg\alf_data\contentstore, allowRandomAccess=true, readOnly=false] 17:18:27,487 DEBUG [org.alfresco.repo.admin.patch.PatchExecuter] Applied patch: AppliedPatch[ id=patch.convertContentUrls, description=Converts pre-3.2 content URLs to use the alf_content_data table. The conversion work can also be done on a schedule; please contact Alfresco Support for further details., fixesFromSchema=0, fixesToSchema=3499, targetSchema=3500, appliedToSchema=1009, appliedToServer=3.2.2 (515) - Enterprise, appliedOnDate=Thu Jul 22 17:18:27 EEST 2010, wasExecuted=true, succeeded=true, report=Content URL conversion completed.] . . . 17:18:28,128 INFO [org.alfresco.repo.admin.patch.PatchExecuter] === Applied patch === ID: patch.convertContentUrls RESULT: Content URL conversion completed. ===================================== SELECT * FROM ALFUPG.ALF_NODE_PROPERTIES np LEFT JOIN ALFUPG.ALF_CONTENT_DATA cd ON (cd.id = np.long_value) WHERE np.actual_type_n = 21 AND cd.id IS NULL 0 record(s) selected [Fetch MetaData: 0/ms] [Fetch Data: 0/ms] [Executed: 22/07/10 17:50:12 EEST ] [Execution: 78/ms] SELECT * FROM ALFUPG.ALF_NODE_PROPERTIES WHERE actual_type_n = 11 0 record(s) selected [Fetch MetaData: 0/ms] [Fetch Data: 0/ms] [Executed: 22/07/10 17:51:09 EEST ] [Execution: 31/ms]

            People

            • Assignee:
              Closed Bugs
              Reporter:
              Andrew Love
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: