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

Locking issue while sync is paused

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.1107
    • Component/s: Synchronizer

      Description

      When UI tries to update database while sync is on pause, a lock can occurs as the exception used to pause the thread dont close the session : no commit, no rollback

      The locking issue is also visible in AutoUpdate :
      Traceback (most recent call last):
      File "C:\Users\LZ\Documents\GitHub\nuxeo-drive\nuxeo-drive-client\nxdrive\gui\
      application.py", line 341, in action_update
      self.update_version, self.updater)
      File "C:\Users\LZ\Documents\GitHub\nuxeo-drive\nuxeo-drive-client\nxdrive\gui\
      update_prompt.py", line 130, in prompt_update
      controller.is_auto_update(), callback=update)
      File "C:\Users\LZ\Documents\GitHub\nuxeo-drive\nuxeo-drive-client\nxdrive\cont
      roller.py", line 375, in is_auto_update
      device_config=device_config).auto_update
      File "C:\Users\LZ\Documents\GitHub\nuxeo-drive\nuxeo-drive-client\nxdrive\cont
      roller.py", line 362, in get_general_settings
      dc = (self.get_device_config() if device_config is None
      File "C:\Users\LZ\Documents\GitHub\sharp-cpo-clients\clouddesktop-drive\cloudd
      esktop\controller\controller.py", line 65, in get_device_config
      return session.query(CPODeviceConfig).one()
      File "C:\Python27\Lib\site-packages\sqlalchemy\orm\query.py", line 2361, in on
      e
      ret = list(self)
      File "C:\Python27\Lib\site-packages\sqlalchemy\orm\query.py", line 2404, in __
      iter__
      return self._execute_and_instances(context)
      File "C:\Python27\Lib\site-packages\sqlalchemy\orm\query.py", line 2419, in _e
      xecute_and_instances
      result = conn.execute(querycontext.statement, self._params)
      File "C:\Python27\Lib\site-packages\sqlalchemy\engine\base.py", line 720, in e
      xecute
      return meth(self, multiparams, params)
      File "C:\Python27\Lib\site-packages\sqlalchemy\sql\elements.py", line 317, in
      _execute_on_connection
      return connection._execute_clauseelement(self, multiparams, params)
      File "C:\Python27\Lib\site-packages\sqlalchemy\engine\base.py", line 817, in _
      execute_clauseelement
      compiled_sql, distilled_params
      File "C:\Python27\Lib\site-packages\sqlalchemy\engine\base.py", line 947, in _
      execute_context
      context)
      File "C:\Python27\Lib\site-packages\sqlalchemy\engine\base.py", line 1108, in
      _handle_dbapi_exception
      exc_info
      File "C:\Python27\Lib\site-packages\sqlalchemy\util\compat.py", line 185, in r
      aise_from_cause
      reraise(type(exception), exception, tb=exc_tb)
      File "C:\Python27\Lib\site-packages\sqlalchemy\engine\base.py", line 940, in _
      execute_context
      context)
      File "C:\Python27\Lib\site-packages\sqlalchemy\engine\default.py", line 435, i
      n do_execute
      cursor.execute(statement, parameters)
      sqlalchemy.exc.OperationalError: (OperationalError) database is locked u'SELECT
      device_config.device_id AS device_config_device_id, device_config.client_version
      AS device_config_client_version, device_config.proxy_config AS device_config_pr
      oxy_config, device_config.proxy_type AS device_config_proxy_type, device_config.
      proxy_server AS device_config_proxy_server, device_config.proxy_port AS device_c
      onfig_proxy_port, device_config.proxy_authenticated AS device_config_proxy_authe
      nticated, device_config.proxy_username AS device_config_proxy_username, device_c
      onfig.proxy_password AS device_config_proxy_password, device_config.proxy_except
      ions AS device_config_proxy_exceptions, device_config.auto_update AS device_conf
      ig_auto_update, device_config.autostart AS device_config_autostart, device_confi
      g.icon_overlays AS device_config_icon_overlays, device_config.notifications AS d
      evice_config_notifications, device_config.log AS device_config_log \nFROM device
      _config' ()

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: