Review Request: Make the maximum # of connection per host in KIO::Scheduler user-configurable
Dawit Alemayehu
adawit at kde.org
Mon Mar 5 15:45:59 GMT 2012
> On March 5, 2012, 3:19 p.m., David Faure wrote:
> > Looks good to me, thanks for this long-due fix.
> >
> > I don't know how well the underlying feature works (e.g. will the jobs wait for a connection or fail immediately, and will getConnectedSlave return 0 when the limit is reached) -- but this patch looks ok, it's just "more (configurability) of the same (feature)".
The jobs will be queued and they will wait until an ioslave becomes available to service them. For example, if you set the number of connections allowed to a ftp server to "1" and attempt to download two files, the requests will be handled one at a time. That is the download of the second file will not begin until the first download is either canceled or done.
- Dawit
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104120/#review11139
-----------------------------------------------------------
On March 3, 2012, 5:48 p.m., Dawit Alemayehu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104120/
> -----------------------------------------------------------
>
> (Updated March 3, 2012, 5:48 p.m.)
>
>
> Review request for kdelibs and Andreas Hartmetz.
>
>
> Description
> -------
>
> This patch is an alternate approach to making the number of ioslaves connections allowed per server configurable by the user. Unlike the patch proposed in bug# 64647, the approach taken in this patch neither requires any new API additions to KIO::Scheduler nor does it limit configurablity per protocol.
>
> For restricting the number of ioslaves per server/host all a user would have to do is add a "MaxInstancesPerHost" property to the specific protocols configuration file. For example, to limit the number of ftp connections to "ftp://ftp.foo.bar" to 1, one would only have to add the following to $KDEHOME/share/config/kio_ftprc:
>
> [ftp.foo.bar]
> MaxInstancesPerHost=1
>
> But that is not all. The user can make that restriction apply globally to all ftp connections by simply moving property to the global section of of the configuration file. That is move it out of the host ("[ftp.foo.bar]") section. And to make it apply to every protocol, simply move the property to the generic ioslave configuration file, $KDEHOME/share/config/kioslaverc.
>
>
> This addresses bug 64647.
> http://bugs.kde.org/show_bug.cgi?id=64647
>
>
> Diffs
> -----
>
> kio/kio/scheduler.cpp 6b4ed52
>
> Diff: http://git.reviewboard.kde.org/r/104120/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Dawit Alemayehu
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20120305/e7ee56f4/attachment.htm>
More information about the kde-core-devel
mailing list