D23008: [baloo_file_extractor] Be more resistant to multiple QSocketNotifier events

Igor Poboiko noreply at phabricator.kde.org
Thu Aug 8 09:31:40 BST 2019


poboiko added inline comments.

INLINE COMMENTS

> anthonyfieroni wrote in app.cpp:76-81
> processNextFile should be called till m_ids ends, why it does not happen, probably that's why @bruns reject your patch

Well, if that happens, something went wrong, and we have to do something.
As far as I can see, the options are:

1. Ignore new batch (that would be simply `return`)
2. Ignore old batch (that is done now - committing something that was extracted from the old one if there is any)
3. Try to merge batches and process everything (that would be `m_ids.append(new batch)` and do not create a new transaction). This might require some additional housekeeping though, as we do not want resulting transaction to be larger than `batchSize`. And we probably do not want to do our own splitting here - as it would duplicate work done in the parent `baloo_file` process.

However, since ignored batch do not get removed from `ContentIndexingDB`, our parent process `baloo_file` will retry those documents eventually. I believe it should be pretty safe to just drop one of the batches here.

> broulik wrote in app.h:50
> It doens't have an EXPORT macro to it, so I suppose not?

It's not. It's only used inside `main.cpp` of `baloo_file_extractor`.

REPOSITORY
  R293 Baloo

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

To: poboiko, #baloo, bruns, ngraham
Cc: anthonyfieroni, broulik, kde-frameworks-devel, LeGast00n, fbampaloukas, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190808/0c5992ee/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list