[Sugar-devel] [PATCH Browse] Cancel a download if space is very tight SL #394

Martin Langhoff martin.langhoff at gmail.com
Mon Sep 10 18:52:43 EDT 2012


On Mon, Sep 10, 2012 at 6:39 PM, James Cameron <quozl at laptop.org> wrote:
> Some users pay for data by volume.  I don't think that cancelling a
> download is the right approach.  It should be paused, giving the user
> a chance to clean up.

Rather complex -- I haven't seen any webbrowser correctly implement
that correctly.

> Also, I agree with Martin that additional use of Content-Length
> headers can be made, to warn the user against trying a download larger
> than available space.

Thanks

> I disagree with Bernie in #394 comment 5 ... because the
> Content-Length of all concurrent downloads can be used in a
> calculation.

We agree in disagreeing with Bernie, but no, trying to have a
"download controller" pooling download information is another big ball
of complexity I would not want to get into. Specially since it is
ineffective -- _any other program in the system may be pushing you to
ENOSPC_. The kernel acts as the final FS controller.

What we _must_ have is solid recovery from ENOSPC. I think datastore
has it (that's worth a test :-) ) and if datastore has it, then Browse
can handle the exception gracefully with a small amount of coding
effort...

cheers,



m
-- 
 martin.langhoff at gmail.com
 martin at laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff


More information about the Sugar-devel mailing list