Search is uninterruptable

Scott Q. qmail at top-consulting.net
Mon Mar 1 20:53:57 EET 2021


Hi Aki,

sorry for hijacking this thread, but when you do a SEARCH at least
there's an 'Indexing update' being returned from the server.

If the mailbox is not indexed and you do a SORT it just hangs with no
update whatsoever until it completes.


I think it would be beneficial to update the client on the indexing
progress when doing SORT as well..



On Monday, 01/03/2021 at 12:57 Aki Tuomi wrote:


> On 01/03/2021 15:30 van der Kamp, John  wrote:
> 
>  
> Hi,
> 
> When a user is doing a search, and the data is not indexed, then a
search can take a very long time. It seems that search process is
uninterruptable. The IMAP connection gets a status message with an ETA
every so often, but an administrator on the server cannot stop it. Any
SIGTERM or doveadm kick is ignored. Also, when the client times out
(it seems clients are not seeing the ETA as a reason to keep the
connection open) and the client disconnects is this search process
continuing, even though any write to the socket would return an error.
> 
> I believe the server is stuck in this loop:
https://github.com/dovecot/core/blob/master/src/lib-storage/index/index-search.c#L1788
> 
> Somehow the server needs to check for disconnected clients and let
the session be kicked from the server too. You probably know better
what to do about this then me.
> 
> John
> 
> 
> 
> Amazon Development Center (Netherlands) B.V., Johanna
Westerdijkplein 1, 2521 EN The Hague, Registration No. Chamber of
Commerce 56869649, VAT: NL 852339859B01

Hi!

One solution would be to use FTS. While it does not make search any
more terminatable, it would increase the likelihood of search
returning in few seconds.

Aki
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20210301/eba9a7dd/attachment.html>


More information about the dovecot mailing list