[tahoe-dev] CHKUploadHelper._finish vs. windows buildbot

Brian Warner warner-tahoe at allmydata.com
Thu Jan 17 21:57:05 PST 2008


> robk mentions in the [1923] checkin..

So, does the following seem accurate: the [1922] checkin (add
self._reader.close() to CHKUploadHelper._finish) was *not* the one to solve
this test failure, but the [1923] checkin (treat ConnectionLost the same as
ConnectionDone in the unit test code) *was* the fix?

I'm asking because I believe the call to _reader.close() in [1922] is
redundant. The _reader is an IEncryptedUploadable, and it is the
responsibility of the Encoder to call that close() method.. there's a line to
do that in encode.py:464 (Encoder.finish_hashing). It hits this point before
CHKUploadHelper._finished gets called, via the Encoder's main Deferred chain.

Adding some printouts to LocalCiphertextReader.close() shows a double-hit,
once when Encoder.finish_hashing does the close, and then a second one when
CHKUploadHelper._finish does it.

robk: I just wanted to confirm with you that this makes sense before
reversing the [1922] patch. That double-close is currently harmless
(file.close can be called multiple times without error, and the
callRemote("close") currently does the same thing), but it's Not Right, and
I'll remove it if you agree.

cheers,
 -Brian


More information about the tahoe-dev mailing list