11 Aug 2011 16:37
Durus repair
David Hess <dhess <at> fishsoftware.com>
2011-08-11 14:37:31 GMT
2011-08-11 14:37:31 GMT
We have servers that deal with power outages (and dirty power in general) and have ended up with some
corrupted durus databases. We've used the normal "repair" feature to handle a lot of the cases but we have
another that's occurring on occasion that is not handled by repair. It is failing as this exception:
Traceback (most recent call last):
File "/usr/local/bin/durus", line 22, in <module>
client_main()
File "/usr/local/lib/python2.6/dist-packages/durus/client.py", line 108, in client_main
options.startup)
File "/usr/local/lib/python2.6/dist-packages/durus/client.py", line 35, in interactive_client
storage = FileStorage(file, readonly=readonly, repair=repair)
File "/usr/local/lib/python2.6/dist-packages/durus/file_storage.py", line 73, in __init__
self.shelf = Shelf(filename, readonly=readonly, repair=repair)
File "/usr/local/lib/python2.6/dist-packages/durus/shelf.py", line 91, in __init__
self.file, repair=repair)
File "/usr/local/lib/python2.6/dist-packages/durus/shelf.py", line 296, in read_transaction_offsets
file.seek(position + 8 + record_length)
File "/usr/local/lib/python2.6/dist-packages/durus/file.py", line 41, in seek
self.file.seek(n, whence)
IOError: [Errno 22] Invalid argument
We've come up with the following patch:
--- /usr/local/lib/python2.6/dist-packages/durus/shelf.py 2007-04-24 16:10:16.000000000 -0500
+++ durus/shelf.py 2011-08-11 08:18:51.169288642 -0500
<at> <at> -297,18 +297,17 <at> <at>
if file.tell() != transaction_end:
raise ShortRead
return transaction_offsets
- except ShortRead, e:
(Continue reading)
RSS Feed