Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-1574

DAO has no lock when Drive attempts to restore a db backup

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.0
    • Fix Version/s: 4.1.0
    • Component/s: Framework
    • Tags:
    • Sprint:
      nxDrive 11.1.5
    • Story Points:
      0

      Description

      Upon instantiating a DAO, Drive checks if the db file is healthy or if it can be fixed. If not, it tries to restore a backup.
      The method that restores the backup tries to get the lock of the DAO to prevent accesses to the db while writing. However, the lock doesn't exist yet, so an exception is thrown here.

      AttributeError: 'ManagerDAO' object has no attribute '_lock'
        File "nxdrive/engine/dao/sqlite.py", line 180, in restore_backup
      
      DatabaseError: file is not a database
        File "nxdrive/engine/dao/sqlite.py", line 146, in __init__
        File "nxdrive/engine/dao/utils.py", line 66, in fix_db
        File "nxdrive/engine/dao/utils.py", line 22, in is_healthy
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h