Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-31528

When Space XML Imports Fail, Partial Space Data is Left in the Database

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      Space XML imports will sometimes fail due to a variety of reasons:

      Oftentimes these partially imported spaces remain in the DB without any way to remove them via the UI, making a re-import attempt impossible (due to a duplicate Space Key or other constraint violation).

      Can we investigate:

      • some way to rollback a failed XML space import (or determine whether imports will fail before it starts)?
      • possibilities for Confluence to automatically recognise half-imported Spaces and delete related data from the UI?

      Current workaround: How to Manually Delete a Space (Cloud users will need to contact Atlassian Support and request removing the Space from Confluence database)

        1. Postgres.PNG
          Postgres.PNG
          10 kB
        2. Postgres1.PNG
          Postgres1.PNG
          5 kB
        3. Postgres2.PNG
          Postgres2.PNG
          31 kB

            [CONFSERVER-31528] When Space XML Imports Fail, Partial Space Data is Left in the Database

            A fix for this issue is available in Confluence Data Center 9.4.0.
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            Pranoy Cherian Mathew added a comment - A fix for this issue is available in Confluence Data Center 9.4.0. Upgrade now or check out the Release Notes to see what other issues are resolved.

            Please, more SQL workarounds for decade old bugs. Everybody enjoys running DELETEs on production databases. In fact, having SQL workarounds all over KBA's is the most enjoyable thing to do if you want to follow "proper" processes of taking the tool down, doing a backup, verifying the backup works, applying stuff, verifying it worked, putting back on. Later on in some cases, heck, you might even introduce the same problem later so you can do it all over again!

            You can sense the salt from afar here, but at this point the requirements to be an Atlassian certified individual you must be a full stack developer w/ DBA experience. I'm not even exaggerating at this point.

            Can we please, maybe, fix bugs creating corrupted data, instead of providing SQL workarounds that are outdated, several years down the line? Thank you.

             

            No, I am not claiming every tool is amazingly perfect and you can prevent corruption 100% of the time, I'm not disillusioned to think apps never crash, no bugs exist ever. But when you write a wizard that fails miserably, knows it failed - and it failed on a constraint that you defined, and yet doesn't clean after itself and keeps trash lying around, then that's clearly an oversight, isn't it.

            Radek Dostál added a comment - Please, more SQL workarounds for decade old bugs. Everybody enjoys running DELETEs on production databases. In fact, having SQL workarounds all over KBA's is the most enjoyable thing to do if you want to follow "proper" processes of taking the tool down, doing a backup, verifying the backup works, applying stuff, verifying it worked, putting back on. Later on in some cases, heck, you might even introduce the same problem later so you can do it all over again! You can sense the salt from afar here, but at this point the requirements to be an Atlassian certified individual you must be a full stack developer w/ DBA experience. I'm not even exaggerating at this point. Can we please, maybe, fix bugs creating corrupted data, instead of providing SQL workarounds that are outdated, several years down the line? Thank you.   No, I am not claiming every tool is amazingly perfect and you can prevent corruption 100% of the time, I'm not disillusioned to think apps never crash, no bugs exist ever. But when you write a wizard that fails miserably, knows it failed - and it failed on a constraint that you defined, and yet doesn't clean after itself and keeps trash lying around, then that's clearly an oversight, isn't it.

            Thank you, I used it successfully. But the issue itself… well, it is ridiculous that app can't clean up itself :\

            Yevgen Lasman added a comment - Thank you, I used it successfully. But the issue itself… well, it is ridiculous that app can't clean up itself :\

            @Yevgen, setting FOREIGN KEY CHECKS off  may help. Add following query as the first query in the provided workaround for MySQL script.

            SET FOREIGN_KEY_CHECKS = 0;

            Dinesh shivakoti added a comment - @Yevgen, setting FOREIGN KEY CHECKS off  may help. Add following query as the first query in the provided workaround for MySQL script. SET FOREIGN_KEY_CHECKS = 0;

            Provided workaround for MySQL doesn't work — queries fail due to constraints eg.

            Cannot delete or update a parent row: a foreign key constraint fails (`confluencedev`.`CONTENT`, CONSTRAINT `FKwjyn6091q3l1gl7bh143ma2a` FOREIGN KEY (`PAGEID`) REFERENCES `CONTENT` (`CONTENTID`))
            

            or

            Cannot delete or update a parent row: a foreign key constraint fails (`confluencedev `.`CONTENT`, CONSTRAINT `FKal6o8xwypd4mdgid9b9nw1q51` FOREIGN KEY (`PARENTCOMMENTID`) REFERENCES `CONTENT` (`CONTENTID`))

            Yevgen Lasman added a comment - Provided workaround for MySQL doesn't work — queries fail due to constraints eg. Cannot delete or update a parent row: a foreign key constraint fails (`confluencedev`.`CONTENT`, CONSTRAINT `FKwjyn6091q3l1gl7bh143ma2a` FOREIGN KEY (`PAGEID`) REFERENCES `CONTENT` (`CONTENTID`)) or Cannot delete or update a parent row: a foreign key constraint fails (`confluencedev `.`CONTENT`, CONSTRAINT `FKal6o8xwypd4mdgid9b9nw1q51` FOREIGN KEY (`PARENTCOMMENTID`) REFERENCES `CONTENT` (`CONTENTID`))

            This hampers us too. We're on v7.3.2.

            Marc Botermans added a comment - This hampers us too. We're on v7.3.2.

            v.6.15.2 is affected as well. 

            Dinesh shivakoti added a comment - v.6.15.2 is affected as well. 

            Hello,

            We have the same issue when we want to remove a page from trash.

            Best regards,

            Open Europa Wikis Team added a comment - Hello, We have the same issue when we want to remove a page from trash. Best regards,

            Sid added a comment -

            Can you give us a timeline on when this issue will be fixed. 

            It has been a nightmare since we have experienced this issue and now we are holding back on importing any spaces from our other instances. I am pretty sure all a lot of other users/customers are experiencing the same. 

            Please prioritize and work on it. 

            Thanks

            Sid added a comment - Can you give us a timeline on when this issue will be fixed.  It has been a nightmare since we have experienced this issue and now we are holding back on importing any spaces from our other instances. I am pretty sure all a lot of other users/customers are experiencing the same.  Please prioritize and work on it.  Thanks

            Mark Lang added a comment -

            Do you mind me asking why the priority was lowered from High to Medium on this one?

            Mark Lang added a comment - Do you mind me asking why the priority was lowered from High to Medium on this one?

              e8288ea86ca1 Saba Taseer
              rchang Robert Chang
              Affected customers:
              116 This affects my team
              Watchers:
              110 Start watching this issue

                Created:
                Updated:
                Resolved: