swift/test/unit/proxy
Matthew Oliver 9acc44b15c Add some extra logging when EC decode fails
When a pyeclib decode fails, we just get a stack trace in Swift. This
patch adds some extra details around the failed decode to give us a
better idea of why.

In this patch we now track the number of segments returned and the lengths
of each fragment, and also stitch the message of the exception returned
from liberasurecode. So all together a line looks something like:

  Nov 22 02:53:34 saio1 proxy-server[30535]: Error decoding fragments for \
  '/AUTH_test/ec/obj'. segments decoded: 0, lengths: [82, 82, 82, 82]: \
  pyeclib_c_decode ERROR: Fragment integrity check failed. Please inspect \
  syslog for liberasurecode error report. \
  (txn: txbabfabdd22ed4999834fa-00619b062e) (client_ip: 127.0.0.1)

NOTE: The fragments lengths could be done down in pyeclib
and passed back through the error, but doing in ECIter means it'll work
for all EC drivers.

Thre is a still a stack trace, as we always reraise when we encouter an
exception during the ECIter is in flight. But the log line before it
should now tell us why.

Change-Id: I04ee8149e895ec66a33b4f21fea3def770a248f5
2021-12-03 16:36:01 +11:00
..
controllers Add some extra logging when EC decode fails 2021-12-03 16:36:01 +11:00
__init__.py Initial commit of Swift code 2010-07-12 17:03:45 -05:00
test_mem_server.py Fix socket leak on object-server death 2019-01-31 18:38:35 +00:00
test_server.py Quarantine stale EC fragments after checking handoffs 2021-05-10 20:45:17 +01:00
test_sysmeta.py Cleanup tests' import of debug_logger 2021-04-27 12:04:41 +01:00