#1512 closed defect (fixed)

zero-length reads break new mutable downloader

Reported by: warner Owned by: Kevan Carstensen <kevan@…>
Priority: major Milestone: 1.9.0
Component: code-mutable Version: 1.9.0a1
Keywords: Cc:
Launchpad Bug:


The new mutable downloader, landed as part of MDMF in #393, has problems when asked to download zero bytes: it returns more than zero bytes.

We have tests in test_mutable.Version to catch this, currently disabled.

This is a blocker for 1.9beta

Attachments (1)

fix-zero-length-reads.darcspatch (9.8 KB) - added by kevan at 2011-08-30T21:09:41Z.
fix zero-length reads; enable tests of zero-length reads

Download all attachments as: .zip

Change History (5)

comment:1 Changed at 2011-08-30T20:23:41Z by kevan

  • Owner set to kevan
  • Status changed from new to assigned

Changed at 2011-08-30T21:09:41Z by kevan

fix zero-length reads; enable tests of zero-length reads

comment:2 Changed at 2011-08-30T22:25:43Z by kevan

  • Keywords review-needed added
  • Owner kevan deleted
  • Status changed from assigned to new

comment:3 Changed at 2011-08-31T05:10:23Z by Kevan Carstensen <kevan@…>

  • Owner set to Kevan Carstensen <kevan@…>
  • Resolution set to fixed
  • Status changed from new to closed

In 32e30c9023479e3c:

mutable/retrieve: handle the case where self._read_length is 0.

Note that the downloader will still fetch a segment for a zero-length
read, which is wasteful. Fixing that isn't specifically required to fix
#1512, but it should probably be fixed before 1.9.

comment:4 Changed at 2011-08-31T05:40:33Z by warner

  • Keywords review-needed removed

I agree with the comment that it'd be nice to improve efficiency of zero-byte reads by not actually downloading any segments (I've opened #1518 to track that), but I'm not going to hold up 1.9 for that.. correctness is sufficient.

Note: See TracTickets for help on using tickets.