Uploaded image for project: 'Migration Platform'
  1. Migration Platform
  2. MIG-988

Confluence Cloud Migration Assistant scoped user groups and performance issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Highest Highest
    • None
    • CCMA - 3.3.2, CCMA - 3.3.3, CCMA - 3.3.4, CCMA - 3.3.7, CCMA - 3.3.9
    • None
    • 173
    • Severity 3 - Minor

      Issue Summary

      Creating a new plan in Confluence Cloud Migration Assistant to migrate space with scoped users result result in following error.

      We can't communicate with your server

      Steps to Reproduce

      1. Install Confluence Cloud Migration Assistant v3.3.2 or v3.3.3 or v3.3.4
      2. Create new migration plan for a space with option Migrate users related to the selected spaces
      3. Proceed to the last step
      4. Confluence Cloud Migration Assistant does not complete in fetching the scoped users and groups

      Expected Results

      Complete successfully

      Actual Results

      We can't communicate with your server

      The below exception is thrown in the atlassian-confluence.log file:

      2022-01-25 09:49:19,161 ERROR [http-nio-8090-exec-1026] [common.error.jersey.ThrowableExceptionMapper] toResponse Uncaught exception thrown by REST service: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Connection was closed in SingleConnectionDataSource. Check that user code checks shouldClose() before closing Connections, or set 'suppressClose' to 'true'
       -- referer: https://confluence.example.com/admin/migration.action?& | url: /rest/migration/latest/stats/usersGroups | traceId: 420a2cdad91619af | userName: user1@example.com
      com.google.common.util.concurrent.UncheckedExecutionException: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Connection was closed in SingleConnectionDataSource. Check that user code checks shouldClose() before closing Connections, or set 'suppressClose' to 'true'
      .
      Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Connection was closed in SingleConnectionDataSource. Check that user code checks shouldClose() before closing Connections, or set 'suppressClose' to 'true'
      .
      Caused by: java.sql.SQLException: Connection was closed in SingleConnectionDataSource. Check that user code checks shouldClose() before closing Connections, or set 'suppressClose' to 'true'
      

      In Oracle databases, the error in the logs are:

      2022-02-23 13:49:08,992 ERROR [Caesium-1-4] [agent.service.check.AsyncCheckExecutor] 
      error Couldn't execute check of type InvalidEmails with id 99452c0a202608e5fe312baee9dd55268481d775
      com.google.common.util.concurrent.UncheckedExecutionException: org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT BODY FROM BODYCONTENT WHERE BODY LIKE '%ri:userkey%' AND CONTENTID IN (SELECT CONTENTID FROM CONTENT WHERE SPACEID = ?
      UNION
      SELECT CONTENTID FROM CONTENT WHERE CONTENTTYPE = 'COMMENT' AND PAGEID IN (SELECT CONTENTID FROM CONTENT WHERE SPACEID = ?)
      UNION
      SELECT CONTENTID FROM CONTENT WHERE PAGEID IN (SELECT CONTENTID FROM CONTENT WHERE CONTENTTYPE = 'COMMENT' AND PAGEID IN (SELECT CONTENTID FROM CONTENT WHERE SPACEID = ?))
      UNION
      SELECT CONTENTID FROM CONTENT WHERE SPACEID is null AND PREVVER IN (SELECT CONTENTID FROM CONTENT WHERE SPACEID = ?)
      UNION
      SELECT CONTENTID FROM CONTENT WHERE CONTENTTYPE = 'COMMENT' AND PREVVER IN (SELECT CONTENTID FROM CONTENT WHERE CONTENTTYPE = 'COMMENT' AND PAGEID IN (SELECT CONTENTID FROM CONTENT WHERE SPACEID = ?)))]; SQL state [72000]; error code [1555]; ORA-01555: snapshot too old: rollback segment number with name "" too small
      ORA-22924: snapshot too old
      ; nested exception is java.sql.SQLException: ORA-01555: snapshot too old: rollback segment number with name "" too small
      ORA-22924: snapshot too old
      

      We can also see a symptom where the entire UI hangs/stucks at the Select Spaces screen.

      The problematic query seems to be:

      SELECT BODY FROM BODYCONTENT WHERE BODY LIKE '%ri:userkey%' AND CONTENTID IN (SELECT CONTENTID FROM CONTENT WHERE SPACEID = ?
      UNION
      SELECT CONTENTID FROM CONTENT WHERE CONTENTTYPE = 'COMMENT' AND PAGEID IN (SELECT CONTENTID FROM CONTENT WHERE SPACEID = ?)
      UNION
      SELECT CONTENTID FROM CONTENT WHERE PAGEID IN (SELECT CONTENTID FROM CONTENT WHERE CONTENTTYPE = 'COMMENT' AND PAGEID IN (SELECT CONTENTID FROM CONTENT WHERE SPACEID = ?))
      UNION
      SELECT CONTENTID FROM CONTENT WHERE SPACEID is null AND PREVVER IN (SELECT CONTENTID FROM CONTENT WHERE SPACEID = ?)
      UNION
      SELECT CONTENTID FROM CONTENT WHERE CONTENTTYPE = 'COMMENT' AND PREVVER IN (SELECT CONTENTID FROM CONTENT WHERE CONTENTTYPE = 'COMMENT' AND PAGEID IN (SELECT CONTENTID FROM CONTENT WHERE SPACEID = ?)))
      

      Seems to be introduced by MIG-615. Running with the option to migrate All users does not resolve the issue and the query is still executed.

      Workaround

      1. Enable DF migration-assistant.disable.scoped-users-groups
        or
      2. Revert to Confluence Cloud Migration Assistant 3.3.1 as per:
        How to install a specific version of the Confluence Cloud Migration Assistant

              e72ee375e39e Jacob Sebastian
              vvaidhyanathan@atlassian.com Venkatesan
              Votes:
              16 Vote for this issue
              Watchers:
              54 Start watching this issue

                Created:
                Updated:
                Resolved: