[Nepomuk] Review Request 108550: Cancel in-flight dbus queries to avoid leaks.
Xuetian Weng
wengxt at gmail.com
Tue Jan 22 17:54:46 UTC 2013
> On Jan. 22, 2013, 5:46 p.m., Xuetian Weng wrote:
> > nepomuk/query/queryserviceclient.cpp, line 412
> > <http://git.reviewboard.kde.org/r/108550/diff/1/?file=108692#file108692line412>
> >
> > reply.value() actually will block until reply is returned.
> >
> > see QDBusPendingReply document.
> >
> > Is that what we really want here (I'm not familiar with nepomuk, so if this pending call always return immediately, that would be more acceptable here.
> >
> > And you should check reply.isError() first.
> >
> > I think the correct approach is also doing garbage collection on server side.
> >
> > query services can get the dbus sender name (by subclass QDBusContext), and mark the query with service name (the private name like :2.3), once all name associate to the same query disappeared, this query can be garbage collected.
> >
> > This can also avoid the possible crash on client side and leave a dangling query.
Ah.. so garbage collection is already done.. I just saw the related code, ignore my latter part. So what this patch really affects is some "long" running client..
- Xuetian
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108550/#review25998
-----------------------------------------------------------
On Jan. 22, 2013, 2:55 p.m., Till Adam wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108550/
> -----------------------------------------------------------
>
> (Updated Jan. 22, 2013, 2:55 p.m.)
>
>
> Review request for Nepomuk, David Faure and Vishesh Handa.
>
>
> Description
> -------
>
> Cancel in-flight dbus queries to avoid leaks.
>
> If close() is called on the query service client while dbus queries
> are still in flight, they were left dangling. This change makes sure they are
> properly cancelled. Without this, all such dangling queries are maintained by
> nepomuk and updated constantly, causing extreme loads, over time.
>
>
> Diffs
> -----
>
> nepomuk/query/queryserviceclient.cpp 7d3ef0fdff56ae91b89ab95d140634af06b4c218
>
> Diff: http://git.reviewboard.kde.org/r/108550/diff/
>
>
> Testing
> -------
>
> I've been running this for several hours with no more hanging queries. Used to accumulate 10 or more in the same time frame before.
>
>
> Thanks,
>
> Till Adam
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/nepomuk/attachments/20130122/1322e76e/attachment.html>
More information about the Nepomuk
mailing list