Opened 2 years ago

Closed 14 months ago

Last modified 14 months ago

#1060 closed defect (fixed)

Ctrc-C is not handled properly in bibdocfile

Reported by: adeiana Owned by: skaplun
Priority: major Milestone: v1.2
Component: BibDocFile Version: maint-1.1
Keywords: Cc:

Description

You can refer to this ticket if you have access
https://inspirert.cern.ch/Ticket/Display.html?id=203418

When running a script and pressing Ctrl-C it is handled as an error to read from the disk and list of md5sums is reset.

Attachments (1)

traceback.txt (9.0 KB) - added by adeiana 2 years ago.

Download all attachments as: .zip

Change History (9)

Changed 2 years ago by adeiana

comment:1 Changed 14 months ago by skaplun

  • Status changed from new to infoneeded_new

Hi Alessio,

I just checked this, and actually, also from your attachment, as you can see from:

http://invenio-software.org/attachment/ticket/1060/traceback.txt#L150

	-------------------------------------------------------------------------------
147	      3248         except IOError:
148	      3249             self.update()
149	      3250         except Exception, e:
150	----> 3251             register_exception()
151	      3252             raise InvenioWebSubmitFileError, "Encountered an exception while loading .md5 for folder '%s': '%s'" % (self.folder, e)
152	      3253
153	      3254     def check(self, filename = ''):
154	-------------------------------------------------------------------------------

The exception is caught in general, and only registered. the update() of the MD5 is only called in case of real IOError, not KeyboardInterrupt (a.k.a. Ctrl-C)

comment:2 Changed 14 months ago by skaplun

  • Status changed from infoneeded_new to new

Ah nope, I see. Just later there is the .update() call in case of generic InvenioWebSubmitFileError. D'oh.

comment:3 Changed 14 months ago by skaplun

  • Milestone set to v1.2
  • Owner set to skaplun
  • Status changed from new to assigned
  • Version set to maint-1.1

comment:4 Changed 14 months ago by skaplun

  • Status changed from assigned to in_merge

Improvements in this sense are now implemented in my public branch sam/1060-fix-md5-exception-handling

comment:5 Changed 14 months ago by simko

Thanks, I've fixed one issue (register_exception(alert_admin(True)) and I'll merge shortly.

comment:6 Changed 14 months ago by skaplun

  • Resolution set to fixed
  • Status changed from in_merge to closed

In 14b3fde07dadbb69194df52ab4b8ab0dbd513cdf/invenio:

BibDocFile: handling of exceptions in Md5Folder

  • Improves handling of exceptions in Md5Folder by not causing automatic reload of md5 in case of Exceptions. (closes #1060)
  • Additionally, always use register_exception(alert_admin=True) in case of MD5 related issues, as these are severe enough to call for further human check.
  • Introduces Md5Folder regression tests.

Reported-by: Alessio Deiana <alessio.deiana@…>
Reviewed-by: Tibor Simko <tibor.simko@…>

comment:7 Changed 14 months ago by skaplun

In 14b3fde07dadbb69194df52ab4b8ab0dbd513cdf/invenio:

BibDocFile: handling of exceptions in Md5Folder

  • Improves handling of exceptions in Md5Folder by not causing automatic reload of md5 in case of Exceptions. (closes #1060)
  • Additionally, always use register_exception(alert_admin=True) in case of MD5 related issues, as these are severe enough to call for further human check.
  • Introduces Md5Folder regression tests.

Reported-by: Alessio Deiana <alessio.deiana@…>
Reviewed-by: Tibor Simko <tibor.simko@…>

comment:8 Changed 14 months ago by skaplun

In 14b3fde07dadbb69194df52ab4b8ab0dbd513cdf/invenio:

BibDocFile: handling of exceptions in Md5Folder

  • Improves handling of exceptions in Md5Folder by not causing automatic reload of md5 in case of Exceptions. (closes #1060)
  • Additionally, always use register_exception(alert_admin=True) in case of MD5 related issues, as these are severe enough to call for further human check.
  • Introduces Md5Folder regression tests.

Reported-by: Alessio Deiana <alessio.deiana@…>
Reviewed-by: Tibor Simko <tibor.simko@…>

Note: See TracTickets for help on using tickets.