#2543 closed defect (fixed)

suspicious code — bug? dead code?

Reported by: zooko Owned by: daira
Priority: normal Milestone: 1.11.0
Component: code-mutable Version: 1.10.1
Keywords: error Cc:
Launchpad Bug:

Description

diff --git a/src/allmydata/mutable/layout.py b/src/allmydata/mutable/layout.py
index b938794..68d2992 100644
--- a/src/allmydata/mutable/layout.py
+++ b/src/allmydata/mutable/layout.py
@@ -1164,6 +1164,7 @@ class MDMFSlotWriteProxy:
                                   self._secrets,
                                   tw_vectors,
                                   self._readv)
+XXX this is not an addBoth so the failure will never (??) get passed to _result()
         def _result(results):
             if isinstance(results, failure.Failure) or not results[0]:
                 # Do nothing; the write was unsuccessful.

Change History (6)

comment:1 Changed at 2015-10-25T13:46:45Z by daira

  • Component changed from unknown to code-mutable
  • Keywords error added

Yes, this looks wrong.

comment:2 Changed at 2015-10-25T13:47:20Z by daira

  • Milestone changed from undecided to 1.10.3

comment:3 Changed at 2015-12-01T17:43:47Z by daira

I believe the correct fix for this is just to change addCallback to addBoth. We do not have a test; it seems that it would probably go in test_mutable.py, but there are no existing tests there that simulate failures from slot_testv_and_readv_and_writev.

comment:4 Changed at 2016-02-02T17:27:28Z by daira

We agreed to just change addCallback to addBoth.

comment:5 Changed at 2016-02-02T19:07:36Z by Daira Hopwood <daira@…>

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

In 278ee0d/trunk:

Fix an error handling path that would never have been reached. fixes ticket:2543

Signed-off-by: Daira Hopwood <daira@…>

comment:6 Changed at 2016-03-22T05:03:36Z by warner

  • Milestone changed from 1.10.3 to 1.11.0

Milestone renamed

Note: See TracTickets for help on using tickets.