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

enhance error handling

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.227
    • Component/s: Logging

      Description

      in nxdrive.engine.processor.Processor method _execute, if an exception is raised (by any handler), the error is logged but code which uses nuxeo-drive cannot process the error in other components, e.g. Engine or Manager.

      class Processor(EngineWorker):
          ...
          def _execute(self):
             ...
             try:
                ...
                sync_handler(doc_pair, local_client, remote_client)
                ...
             except ThreadInterrupt:
                raise
             except PairInterrupt:
                ...
                continue
             except Exception as e:
                if isinstance(e, IOError) and e.errno == 28:
                   self._engine.syncCompleted.emit()
                   self._engine.noSpaceLeftOnDevice.emit()
                log.exception(e)
                self.increase_error(doc_pair, "SYNC HANDLER: %s" % handler_name, exception=e)
                ...
                continue
      

      The generic Exception block deals with only one specific exception (disk full), but other exceptions just increase error count (of the corresponding item or "docpair") without the ability of other components to participate in processing the error.

      We should use a method in Processor to allow easier override of the error management

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 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 - 2 hours, 1 minute
                  2h 1m