14660f677e16a5c36f3c43e9e64f5e021fda627b |
|
25-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Don't send USERs in handshake that were already sent between handshake
If the user was refreshed since the handshake was started, it means that
the same user was already sent to the other side (added to the stream
immediately after it was received/handled). There's no need to send it
again.
This fixes a potentally infinite handshake when users are rapidly changing
and the handshake iterator never sees the end of the list. (Each refreshed
user is moved to the end of the list, so handshaking can keep sending the
same user over and over again.) |
b3e36790ca9e16d022118012b46ed50f73a45046 |
|
26-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Avoid USER loops when ring latency is over 1 second
Do this by adding a timestamp parameter to USER events. This way if it
takes over 1 second for the USER event to traverse the ring, it won't get
into an infinite loop getting the user updated over and over again. |
1a7ed931e58827e3048360be8341f29dfb85837b |
|
08-Nov-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
director: Code cleanup - typedef user_free_hook
This is done because user_free_hook needs to be
also used in mail_host. If it changes, this
reduces the places that need touching. |
de92873c366becfaea1554642f89b9169d7955e2 |
|
08-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Code cleanup - moved username_hash generation to director.h
It's not really user_directory specific. This is especially important
in the following patches that add per-tag user_directories. It's also not
always known which tag the username_hash refers to, so there can't be
different tag-specific username_hash generators. |
0f5dc4da3982053036be65190e44bf28a67b1ca2 |
|
02-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: API change - var_expand*() now returns error string.
This allows callers to fail properly if the format string is invalid. |
1b7cd57585d8c2f133dd612d2d5d9c775595659f |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Moved all user killing state to struct director_kill_context
This should make it a bit easier to understand the life time of user
killing. It also simplifies code by removing struct
director_user_kill_finish_ctx.
Finally, this already reduces memory usage with 32bit systems, and would
make it possible to reduce also on 64bit systems if timestamp is shrank to
31 bits and weak bit moved after it. I'm not sure if that would be better
for performance though. In any case it would provide free space for 4 extra
bytes if that were needed in future. |
79ee504bdf920f01e12e28f238799bf2616489df |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Code cleanup - added USER_IS_BEING_KILLED() macro |
c13fce16374a6fa8d127742c527498d38e777789 |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Code cleanup - move enum user_kill_state to director.h
This will be needed by following commits |
6af8cc0573832465c621bcd91634e15461e8bf58 |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Execute director_flush_socket only from one director.
Having each director do it would be redundant since they're all supposed to
be performing the same flush task to the same backend. |
f9c76559302e6485f59ab0e6050b76fd6d268fee |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Prevent race conditions by adding USER_KILL_STATE_FLUSHING
In theory it's possible that a user is freed during a flush and added back
before flush is finished, possibly even being moved again. This check makes
sure that we don't finish such move unless we're actually at the correct
flushing state. (If there's another flush also running for the user it'll
be ignored.)
This is also useful for logging purposes. |
11ee3b40320a31669bd717fecbe1e332dad4fd84 |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: HOST-RESET-USERS moves users more slowly now.
By default only 100 users can be moved in parallel. This can be overridden
with HOST-RESET-USERS parameter.
This delaying is especially useful when director_flush_socket is used to
avoid huge floods to the script service. Even without the socket it's still
good for avoiding unnecessary load spikes when all users are kicked at once
and they reconnect back at the same time. |
ade4a0e1a8f4bc3467f4fcff9c219558fe348abf |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Log user's kill_state with a human-readable string. |
0dffa25d211be541ee3c953b23566a1a990789df |
|
06-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: unsigned int:1 -> bool:1
perl -i -pe 's/unsigned int ([^,:;]+):1;/bool $1:1;/' **/*.[ch] |
5c1733e9e572e242598b8b2f12a0068897caf5b7 |
|
15-May-2015 |
Timo Sirainen <tss@iki.fi> |
director: Moving a user to another host sometimes caused the move to fail.
It could have given "User hash .. is being redirected to two hosts" error
and afterwards moved the user back to its original host. |
ece0a20249ce26208db3415ba2e79423678856f8 |
|
13-May-2015 |
Timo Sirainen <tss@iki.fi> |
director: Include useful statistics in process title. |
8621be3846dc097420cce325ad36d1b646f72a09 |
|
29-Jul-2013 |
Timo Sirainen <tss@iki.fi> |
director: Update existing users' timestamps during handshake. |
32a93320fd2b6ada5ac8027166819463c1a007b6 |
|
20-Apr-2012 |
Timo Sirainen <tss@iki.fi> |
director: Removed special (time_t)-1 code, it's not actually needed.
Also this fixes a user refreshing issue. |
447bf65ddb82ec279e7386828748ef47e199a6af |
|
19-Apr-2012 |
Timo Sirainen <tss@iki.fi> |
director: Optimized adding users to linked list during handshake. |
b6b9c99fefbbc662bd9a0006566133c4480bf0e8 |
|
08-Mar-2012 |
Timo Sirainen <tss@iki.fi> |
director: Avoid user getting redirected to different servers near its expiration.
Fixes a problem when user is logging in at the same time on director1 which
thinks the user is expired, and on director2 which thinks the user expires
only in 1 second. |
5733207dc3ec10e6e5a6e0a8b30fbd1b061062b9 |
|
05-Mar-2012 |
Timo Sirainen <tss@iki.fi> |
Added director_username_hash setting to specify what part of the username is hashed.
The default is "%u" meaning the full username. Another potentially useful
value is "%d" for hashing only the domain (i.e. redirect users from the same
domain always to same server so they can safely access each others'
shared mailboxes). |
15ab2452b0220a115f4351ad9d7fd5ec70ae7966 |
|
23-May-2011 |
Timo Sirainen <tss@iki.fi> |
director: Added support for moving user to another server with "doveadm director move". |
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fb |
|
19-May-2010 |
Timo Sirainen <tss@iki.fi> |
Added initial implementation of a director process (for NFS users).
There are still some unimplemented features and bugs. Also changing mail
server list doesn't yet make sure that other directors won't assign the
same user to a different server at the same time.
--HG--
branch : HEAD |