Mercurial > dovecot > core-2.2
view doc/man/doveadm-batch.1.in @ 22930:bfeda12bb54a
lib-index: mail_index_sync_map() - Don't try to-resync extension updates
This was done to call extension record sync handlers, but the previous
commit removes them. Fixes a problem where obsolete cache offsets were
used in some situations:
- Some cache updates are from external transactions and some are from
non-external transactions. This is because cache offset updates are being
added by whatever the parent index transaction is.
- When mail_index_sync_map() is mapping MAIL_INDEX_SYNC_HANDLER_FILE, it
has already synced the map. But it's calling mail_index_sync_record()
for non-external transactions to call expunge handlers and extension
update handlers. It's calling the regular mail_index_sync_record() to do
this work.
- But mail_index_sync_record() is actually still updating the map. So now
mail_index_sync_record() is called for all non-external cache updates,
but not for external cache updates! And since these are somewhat
randomly either external or non-external, the end result is that the
cache offset may be obsolete.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Sun, 29 Apr 2018 12:31:23 +0300 |
parents | cb108f786fb4 |
children |
line wrap: on
line source
.\" Copyright (c) 2013-2018 Dovecot authors, see the included COPYING file .TH DOVEADM\-BATCH 1 "2015-05-09" "Dovecot v2.2" "Dovecot" .SH NAME doveadm\-batch \- Execute multiple commands for multiple users .\"------------------------------------------------------------------------ .SH SYNOPSIS .BR doveadm " [" \-Dv "] " batch " [" \-S .IR socket_path "] " .BI \-A " sep command sep command" [...] .br .\"------------------------------------- .BR doveadm " [" \-Dv "] " batch " [" \-S .IR socket_path "] " .BI \-F " file sep command sep command" [...] .br .\"------------------------------------- .BR doveadm " [" \-Dv "] " batch " [" \-S .IR socket_path "] " .BI \-u " usermask sep command sep command" [...] .\"------------------------------------------------------------------------ .SH DESCRIPTION The command .B doveadm batch is used to execute multiple .BR doveadm (1) .IR command s sequentially for multiple users. This is primarily an optimization where Dovecot can do all the mailbox operations for the same user at once, instead of having to go through the users multiple times. .PP In the first form .BR doveadm (1) will loop over all users, defined in the configured .IR user_db (s), and execute the sequence of .IR command s for each of them. .PP In the second form .BR doveadm (1) will loop over all users, listed in the given .IR file . .PP In the third form the .IR command s will be executed for each user matching the given .IR usermask . .\"------------------------------------------------------------------------ @INCLUDE:global-options@ .\" --- command specific options --- "/. .PP Command specific .IR options : .\"------------------------------------- @INCLUDE:option-A@ .\"------------------------------------- @INCLUDE:option-F-file@ .\"------------------------------------- @INCLUDE:option-S-socket@ .\"------------------------------------- @INCLUDE:option-u-user@ .\"------------------------------------------------------------------------ .SH ARGUMENTS .TP .I command Any .BR doveadm (1) command, with arguments and options \(em except for the .BR \-A ", " \-S " and " \-u " options." .\"------------------------------------- .TP .I sep A single character used as command separator, e.g. \(aq:\(aq. Be careful, unquoted characters, like .BR ; " or " & , may be interpreted by your shell and .BR doveadm (1) will never see them. .\"------------------------------------------------------------------------ .SH EXAMPLE In this example we move seen mails, older than one month, for all example.net users to the alternative storage under /nfsmount: .br .nf mail_location = mdbox:~/mdbox:ALT=/nfsmount/%h/mdbox .fi The second command will remove messages with refcount=0 from the primary storage. .PP .nf .ft B doveadm batch \-u \(rs*@example.net : altmove seen savedbefore 30d : purge .ft P .fi .\"------------------------------------------------------------------------ @INCLUDE:reporting-bugs@ .\"------------------------------------------------------------------------ .SH SEE ALSO .BR doveadm (1)