D18664: Baloo engine: treat every non-success code as a failure

Stefan BrĂ¼ns noreply at phabricator.kde.org
Sat Feb 23 16:09:19 GMT 2019


bruns requested changes to this revision.
bruns added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> poboiko wrote in postingdb.cpp:238
> Can it happen that `rc == MDB_NOTFOUND` just after some iterations of `MDB_NEXT` operation (i.e. we've reached the end of DB), but keys which popped up previously are perfectly valid, and we're just ignoring them here?
> (shouldn't it read `rc != 0 && rc != MDB_NOTFOUND`, just like above?)

Yes, this is indeed wrong - it only works if the loop is left via 'if (!arr.startsWith(prefix)) break`, but not when all entries in the key range have a matching prefix.

If an additional `rc` check here is correct is hard to say. We **are** in an error condition when `rc != {NOTFOUND, SUCCESS}`, but all the values in `termIterators` are valid.

I vote for removing the rc check here again.

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D18664

To: valeriymalov, #baloo, bruns, poboiko
Cc: cullmann, ngraham, bruns, kde-frameworks-devel, #baloo, domson, ashaposhnikov, michaelh, astippich, spoorun, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190223/c5afc58f/attachment.html>


More information about the Kde-frameworks-devel mailing list