]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
indexer: Remove worker-specific request queue
authorSiavash Tavakoli <siavash.tavakoli@open-xchange.com>
Mon, 21 Dec 2020 10:45:32 +0000 (10:45 +0000)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 15 Jan 2021 18:14:24 +0000 (18:14 +0000)
commit141766b24f885259508ae39f2e18811018373bc7
treee54c0f5cc47162cd6333a38415714890aa221345
parent9466769ab637dc0721e1d2aa7cd8d42a715c3709
indexer: Remove worker-specific request queue

- Each request is done in a single connection and indexer master disconnects
from worker after indexing job is complete.
- No need to keep a worker queue since it always have length of 1. Instead,
keep a pointer to indexer_request for each worker connection.
- If indexing is in progress for a user, don't try to use the same connection
when a new request arrives for the same user. Instead, move the request to the
back of the queue and wait for the in progress request to finish then
create a new connection and submit request to worker.
src/indexer/indexer-queue.c
src/indexer/indexer-queue.h
src/indexer/indexer.c
src/indexer/worker-connection.c
src/indexer/worker-connection.h