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