6a0855a04d75bce3c0a2f68517d02f86ae72087f |
|
13-Feb-2018 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Add mail_index_transaction_commit_result.changes_mask
This can be used to determine what type of changes were committed in a
transaction. |
a102d189881a35d72ac3106a9e7e00577ae69310 |
|
20-Feb-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-index: Unconstifty pointer array
clang complained about the extra const. |
26e5bdf37d7d0deed1e2e8483366c83631b9d251 |
|
20-Feb-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-index: Add missing initialization for chained hooks |
2b8ff102f5117f917248f98ccbdc8e6a6af83c87 |
|
20-Feb-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-index: Allow multiple hooks for transaction creation |
d97f939b1c09e9f90b01b6f81bfb1c05da990148 |
|
16-Feb-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Add day_stamp parameter to mail_index_update_day_headers()
This will help creating a unit test. |
9e6d83a3ef6abb393eeebca423cfd0d8cb08d430 |
|
18-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Added mail_index_transaction_get_highest_modseq() |
a42d489d99bcf7d18cfd0352fdf0c9348cb224fc |
|
18-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Added internal mail_index_transaction_finish_so_far()
This can be called multiple times before mail_index_transaction_finish().
It's going to perform all the work of reordering mails and dropping
unnecessary changes that can be done before changing sequences to UIDs.
This will be needed for the following patch that implements
mail_index_transaction_get_highest_modseq(). |
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] |
082e82792b8ac33ad42beac510441b37a3c50737 |
|
07-Jul-2014 |
Timo Sirainen <tss@iki.fi> |
lib-index: Don't update log_file_tail_offset unnecessarily.
Update it only if we're already writing to transaction log anyway or if
we're required to update the offset because mail_index_sync_commit() has
increased it past non-external transactions (this is especially important
with mdbox map index). |
ef4d0eafab4d26bba047551db1e23ceff8aa9404 |
|
15-Jan-2014 |
Timo Sirainen <tss@iki.fi> |
lib-index: Keep track of views and transactions in linked lists.
This makes debugging easier. |
238812433b4f7965fd662dce0f4efccb092630a8 |
|
05-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
lib-index: Add timestamps and value lengths to attribute change records in transaction log.
The timestamps will be useful for dsync, and value lengths will be useful
for metadata quota. |
fee561b9d9162b130e662914fcebc9dd99b5c320 |
|
14-Mar-2013 |
Timo Sirainen <tss@iki.fi> |
lib-index: mail_index_attribute_[un]set() adds changed attributes' keys to transaction log.
This provides them both a modseq (so their changes become visible) as well
as an efficient way to see what attributes have changed by reading the
transaction log. The values themselves aren't written to the log, because
they could be large. |
4ee00532a265bdfb38539d811fcd12d51210ac35 |
|
19-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
Array API changed: ARRAY_DEFINE(name, type) -> ARRAY(type) name
Easy way to update your existing code:
perl -i -pe 's:ARRAY_DEFINE\(([^,]+), *([^)]+)\);:ARRAY($2) $1;:' **/*.[ch] |
e34d170f8f0e084bd94bfbc1a7085ece67e508df |
|
25-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Make sure we check all the functions' return values. Minor API changes to simplify this.
Checked using a patched clang that adds attribute(warn_unused_result) to all
functions. This commit fixes several error handling mistakes. |
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62 |
|
11-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
shared mailboxes: Per-user flags can now be stored in private index files.
This can be enabled by adding e.g.:
mail_location = mdbox:/var/shared/mdbox:INDEXPVT=~/mdbox/shared |
515f81466f673c1b4f72e053f1a9686e6fca6b61 |
|
03-May-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Fixed MAIL_INDEX_SYNC_FLAG_AVOID_FLAG_UPDATES with concurrent keyword changes.
If session 1 saw keywords="a", session 2 added keyword "b" and session 1
(without the client syncing session) replaced flags with "a", the "b"
keyword wasn't removed. |
250105a1440167ef000323cdb2721cd2a3688e1e |
|
22-May-2012 |
Timo Sirainen <tss@iki.fi> |
Don't write "keyword reset" records to transaction log anymore.
These are a bit problematic for dsync's keyword merging to handle. |
491178793199e62320f7bc6292e7b8fd843ae5bc |
|
09-Aug-2011 |
Timo Sirainen <tss@iki.fi> |
lib-index: MAIL_INDEX_SYNC_FLAG_DELETING_INDEX now allows committing changes to deleted index.
This fixes deleting mailboxes. |
5e88e4624aa6d482b5b195acd2f4e02aeb385f20 |
|
06-Oct-2010 |
Timo Sirainen <tss@iki.fi> |
lib-index: Always update index map while committing a transaction.
The previous code was doing this only in some situations, which was probably
enough, except maybe in some special cases. The log file was also read until
EOF always anyway, so the only thing this was saving was some CPU. With the
new behavior the committing stage should be more reliable, and also makes it
easier to do changes without accidentally breaking it. |
16c28dd75976f94acc4940d6ba68b6cd4853aac7 |
|
06-Oct-2010 |
Timo Sirainen <tss@iki.fi> |
lib-index: Cache offsets were sometimes written pointing to an older cache file. |
de9d79337eca11a7f9c1cd476c74dfe4f09a4bd7 |
|
30-Jun-2010 |
Timo Sirainen <tss@iki.fi> |
Removed mail_update_uid() / mail_index_update_uid().
It was working properly only with mdbox and there wasn't really a need for it.
--HG--
branch : HEAD |
8872e5c991430f96138a46e36b7f3c2c40d8e5c2 |
|
09-Feb-2010 |
Timo Sirainen <tss@iki.fi> |
lib-index: Added support for undeleting a deleted index.
--HG--
branch : HEAD |
651fc0f1e43fef3e02e0e7b5f498973b05f641d7 |
|
07-Feb-2010 |
Timo Sirainen <tss@iki.fi> |
Added support for marking mailbox index deleted. Don't allow any changes after that.
This is going to help with race conditions when deleting mailboxes.
--HG--
branch : HEAD |
9f19a50d5966643c4d1c5ca06868ac2ad31bc4d5 |
|
19-Nov-2009 |
Timo Sirainen <tss@iki.fi> |
Transaction commits can now track how many uid/modseq updates were ignored.
--HG--
branch : HEAD |
4b89231f4ec9cc69f4aea715e1d34f405c7e317d |
|
06-Aug-2009 |
Timo Sirainen <tss@iki.fi> |
lib-index: Added mail_index_update_highest_modseq().
--HG--
branch : HEAD |
ad48319996942463675b53877092ab7e13a7a75a |
|
29-Jul-2009 |
Timo Sirainen <tss@iki.fi> |
Added ability to specify message's minimum modseq value.
--HG--
branch : HEAD |
bddd52cb7f3e5a894c080f60750aa76b5aeaf103 |
|
28-Jul-2009 |
Timo Sirainen <tss@iki.fi> |
Added ability to change existing messages' UIDs with mail_[index_]update_uid().
--HG--
branch : HEAD |
02bb8313a711dfe50c7f01e8132e13ca93ecfb42 |
|
14-Jul-2009 |
Timo Sirainen <tss@iki.fi> |
mail index transactions: More code cleanups and unit tests.
--HG--
branch : HEAD |
0c909e3461607eadcd66f4eac69b7f34e37fccf1 |
|
14-Jul-2009 |
Timo Sirainen <tss@iki.fi> |
Keep track of expunged messages' GUIDs and expose them via mailbox_get_expunges().
The message GUIDs are stored in expunge records to transaction log. Before
doing the final expunge, Maildir and dbox verify that the GUID in expunge
request matches the current actual GUID. The GUID is stored in 128 bit
field. If the real GUID isn't 128 bit, the bits are taken from SHA1 of the
GUID.
--HG--
branch : HEAD |
b346610430690398b8c840006004a2df4aa8ce92 |
|
14-Jul-2009 |
Timo Sirainen <tss@iki.fi> |
Moved around mail-index-transaction code and added initial unit tests.
--HG--
branch : HEAD |
54b51a9c2705a19dfb1639647bc7e9378e37f881 |
|
14-Jul-2009 |
Timo Sirainen <tss@iki.fi> |
mail_index_update_flags*() now does a better job of merging flag changes together.
--HG--
branch : HEAD |
bc397dfcbe6e22aa1ca2e15a9f3cd42f39e2ec4e |
|
13-Jul-2009 |
Timo Sirainen <tss@iki.fi> |
Moved mail_index_seq_array_*() to mail-index-util.c and added its own .h file.
--HG--
branch : HEAD |
5e40ed3f0a2c2acddc9b8eab59670c7a850114c5 |
|
13-Jul-2009 |
Timo Sirainen <tss@iki.fi> |
Isolated all cache transaction handling code to a single file.
--HG--
branch : HEAD |
1279090ba03f9c176976a69ab7718f0ed77b19af |
|
09-May-2009 |
Timo Sirainen <tss@iki.fi> |
Moved transaction commiting code to mail-index-transaction-*.c
--HG--
branch : HEAD |
5d264bf541597af95a31c342644f6bb0fa6e0708 |
|
10-Mar-2009 |
Timo Sirainen <tss@iki.fi> |
indexes: Fixes to handling shrinking tail offsets.
--HG--
branch : HEAD |
99f482c13492c443ad550872dac59313c9e48026 |
|
10-Mar-2009 |
Timo Sirainen <tss@iki.fi> |
indexes: Removed unnecessary code.
--HG--
branch : HEAD |
f153a2cec0319f549388d28f8cfd4d50229d1132 |
|
10-Mar-2009 |
Timo Sirainen <tss@iki.fi> |
indexes: Fixes to handling shrinking tail offsets.
--HG--
branch : HEAD |
1aa80711dcef7f193038b1f3ff65f331b43a4beb |
|
10-Mar-2009 |
Timo Sirainen <tss@iki.fi> |
indexes: Removed unnecessary code.
--HG--
branch : HEAD |
c5794838af9995f50bfecb06a3cd4f9a0ac77858 |
|
04-Mar-2009 |
Timo Sirainen <tss@iki.fi> |
Added mail_index_atomic_inc_ext() for atomically incrementing numbers in extensions.
--HG--
branch : HEAD |
cf93189100a9136f2fd508c26e1573410bc8c1aa |
|
22-Jan-2009 |
Timo Sirainen <tss@iki.fi> |
mail_index_transaction_get_next_uid() shouldn't sort appends. They may still be modified!
Fixes a dbox rebuild bug.
--HG--
branch : HEAD |
3fe9483b2b412a14493e3120751b0e99ecfe9388 |
|
14-Dec-2008 |
Timo Sirainen <tss@iki.fi> |
mail_get_flags/keywords() now returns updated values if they've been changed within transaction.
--HG--
branch : HEAD |
48270badadd82279bfe50ae3d187aea8b0b2b30e |
|
21-Jun-2008 |
Timo Sirainen <tss@iki.fi> |
CONDSTORE: STORE UNCHANGEDSINCE conflicts are now checked atomically.
--HG--
branch : HEAD |
81a5d8714c566ce50c4a2409f59e82e716d576d2 |
|
18-Jun-2008 |
Timo Sirainen <tss@iki.fi> |
mail_index_update_header_ext() can now be called multiple times for the same
extension.
--HG--
branch : HEAD |
6e07b4251bf6a3cf34019c351a32a65c08392e58 |
|
29-May-2008 |
Timo Sirainen <tss@iki.fi> |
Added mail_index_ext_reset_inc() to atomically increase extension's
reset_id. Added clear_data parameter to mail_index_ext_reset*().
--HG--
branch : HEAD |
c25356d5978632df6203437e1953bcb29e0c736f |
|
16-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Changed .h ifdef/defines to use <NAME>_H format.
--HG--
branch : HEAD |
a022088674a5ae72ed29ae001834cbad62a4f19f |
|
19-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
Keep flag updates separately from transaction.log_updates flag, because the
flag updates array can become empty.
--HG--
branch : HEAD |
db87d16551d1081ada01f787ea21aa3ed1402c31 |
|
19-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
Changed mail_transaction_begin() API to take flags parameter instead of two
booleans.
--HG--
branch : HEAD |
1d3f7c1278168d5b1cbfa9a2cc9929a0909056b4 |
|
16-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
Recent flag handling rewrite. Still not perfect with maildir.
--HG--
branch : HEAD |
a2cbf1d392ee983520451bc9b849a490f28ac298 |
|
14-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
If mail_index_ext_set_reset_id() is called, the transaction may go back to
unchanged state and we don't want to write it to transaction log then.
--HG--
branch : HEAD |
893e5bbd5184ec5c21f47c67c8ea6efbea41f7d0 |
|
12-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
Added mail_index_ext_set_reset_id().
--HG--
branch : HEAD |
beb6125ee872e7fed57745ab33e6de99639180f3 |
|
08-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
Implemented mail_index_update_header_ext()
--HG--
branch : HEAD |
ae8817f05005f57bba32479a610b52d083e2b6eb |
|
01-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
Added support for resetting index.
--HG--
branch : HEAD |
46c31f64b9f0949f00b7819f45b22f2d64b2ea27 |
|
29-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
Better type safety to module_contexts arrays. Already fixed some bugs.
--HG--
branch : HEAD |
985fa802913c96ce6f2e25bbc788ee39c416a7e0 |
|
06-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
When adding mails to index in non-sorted UID order and then using
mail_index_get_header(), the next_uid field could have been wrong.
--HG--
branch : HEAD |
687bb904e1bb76c21a6e392f60c990486b298ea4 |
|
15-Oct-2006 |
Timo Sirainen <tss@iki.fi> |
After saving messages the mailbox wasn't synced, which caused deliver to
treat the mailbox as unsynced and not update the indexes.
--HG--
branch : HEAD |
d6badc27cd6e8d3398877b6766cb0aaeef3a7800 |
|
28-Jun-2006 |
Timo Sirainen <timo.sirainen@movial.fi> |
Beginnings of joining mail-storage API more closely to mail-index, so that
mail-index could be directly used if needed. Currently only transactions
are joined.
--HG--
branch : HEAD |
8d80659e504ffb34bb0c6a633184fece35751b18 |
|
28-Jun-2006 |
Timo Sirainen <tss@iki.fi> |
Array API redesigned to work using unions. It now provides type safety
without having to enable DEBUG, as long as the compiler supports typeof().
Its API changed a bit. It now allows directly accessing the array contents,
although that's not necessarily recommended. Changed existing array usage to
be type safe in a bit more places. Removed array_t completely. Also did
s/modifyable/modifiable/.
--HG--
branch : HEAD |
a6745c1336427f5641715baee3d2369d3e91ebe0 |
|
15-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Added some checks and better logging for figuring out why (*seq != 0) assert
happens.
--HG--
branch : HEAD |
d5cebe7f98e63d4e2822863ef2faa4971e8b3a5d |
|
14-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
deinit, unref, destroy, close, free, etc. functions now take a pointer to
their data pointer, and set it to NULL. This makes double-frees less likely
to cause security holes.
--HG--
branch : HEAD |
6ef7e31619edfaa17ed044b45861d106a86191ef |
|
13-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Added "bool" type and changed all ints that were used as booleans to bool.
--HG--
branch : HEAD |
406393bc328f056c49df0804f894ac2070aa5846 |
|
21-Dec-2005 |
Timo Sirainen <tss@iki.fi> |
Allow appending mails in wrong UID order. Sort them internally when
committing.
--HG--
branch : HEAD |
aa38d1a0945f0bc13a225d043f53fad2eec666b1 |
|
23-Apr-2005 |
Timo Sirainen <tss@iki.fi> |
If UIDVALIDITY changes, don't invalidate the whole index. Just expunge all
existing messages and update uidvalidity/nextuid fields. Now we don't have
to re-login when this happens.
--HG--
branch : HEAD |
bb10ebcf076c959c752f583746d83805d7686df8 |
|
02-Apr-2005 |
Timo Sirainen <tss@iki.fi> |
Keywords are now stored in X-Keywords headers in mbox. Did several related
API changes to get better performance.
--HG--
branch : HEAD |
287ba82a8da3eaa473b5735d4eeac2fb4c5d8117 |
|
12-Mar-2005 |
Timo Sirainen <tss@iki.fi> |
Changed many buffers to arrays. Cleans up the code a lot.
--HG--
branch : HEAD |
faed8babca9914257f34fb2e603d74016d563b2d |
|
05-Feb-2005 |
Timo Sirainen <tss@iki.fi> |
Internal changes in how keywords are handled. struct mail_keywords isn't
automatically freed anymore, added *_keywords_free() for that.
--HG--
branch : HEAD |
c251a38df327599a62d341bf5c2282f31352faa5 |
|
22-Jan-2005 |
Timo Sirainen <tss@iki.fi> |
Added mail_index_update_flags_range() and optimized the non-range version as
well.
--HG--
branch : HEAD |
41e1c7380edda701719d8ce1fb4d465d2ec4c84d |
|
10-Jan-2005 |
Timo Sirainen <tss@iki.fi> |
Keyword fixes.
--HG--
branch : HEAD |
16c89b1260c9d07c01c83a9219424d3727069b2e |
|
26-Dec-2004 |
Timo Sirainen <tss@iki.fi> |
Initial support for keywords. Syncing to mbox/maildir doesn't work yet.
--HG--
branch : HEAD |
1b3bb8d39686ed24730cbc31cc9a33dc62c8c6c3 |
|
14-Nov-2004 |
Timo Sirainen <tss@iki.fi> |
Update view's header only after syncing the view. This and other changes fix
several view syncing problems and crashes.
--HG--
branch : HEAD |
7c95b03620a03a43dd72d39608cea5fc77393ad6 |
|
11-Nov-2004 |
Timo Sirainen <tss@iki.fi> |
Allow specifying to transaction if it's external. Make mail saving
transactions external to avoid problems with uids.
--HG--
branch : HEAD |
6a19e109ee8c5a6f688da83a86a7f6abeb71abdd |
|
06-Nov-2004 |
Timo Sirainen <tss@iki.fi> |
Removed cache_offset from mail_index_record and changed it to use extension
instead. Added possibility to register sync and expunge handlers for
extensions. Changed the way extension resets work: all extension updates
which were committed without having seen the reset are ignored.
--HG--
branch : HEAD |
d143077bd518de129b8d446fb58e003903e50867 |
|
17-Oct-2004 |
Timo Sirainen <tss@iki.fi> |
New way of handling extension introductions in transaction log.
--HG--
branch : HEAD |
bbf796c17f02538058d7559bfe96d677e5b55015 |
|
03-Oct-2004 |
Timo Sirainen <tss@iki.fi> |
Index extensions can now specify record alignment, and it's possible to
resize header and records. Fixes mbox crashes with some 64bit systems.
--HG--
branch : HEAD |
7797aa2479e99aeb71057b7a2584b2cb72e4d3f8 |
|
26-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
Renamed "extra record info" and variations of it to "extension" or "ext" in
short.
--HG--
branch : HEAD |
73e7998716853b5b7621c06aea0022dccda70ad1 |
|
12-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
We didn't include extra_rec_updates at checking if transaction had changed
anything, and so they didn't necessarily get written to transaction log.
This broke mbox offsets sometimes.
--HG--
branch : HEAD |
5a07b37a9df398b5189c14872a600384208ab74b |
|
05-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
Save extra record/header infos into index file permanently.
--HG--
branch : HEAD |
2ca4cb08680aebb1474d762738cf436871f095fb |
|
04-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Make sure we don't set cache_offsets to old cache files.
--HG--
branch : HEAD |
72cbf33ae81fde08384d30c779ff540752d9256c |
|
04-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Cache updating is done now by first reserving space where to write, and then
writing to it whenever buffer gets full. There is no persistent cache file
locks anymore because of this, but it also means that the same cached field
may be written multiple times to the file by different processes. Also since
we reserve more space than we actually need at first, it some space can be
wasted if multiple processes are updating the cache.
--HG--
branch : HEAD |
09c3a491f4f6ccebe290c7709bdc0d79a187610b |
|
03-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
UIDs for appended messages can now be assigned all at once. Maildir now
updates indexes immediately while saving messages.
--HG--
branch : HEAD |
7e94cf9d70ce9fdeccb7a85ff400b899e6386f36 |
|
24-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
Record size is allowed to change between index files. This will allow adding
extensions dynamically for existing indexes.
--HG--
branch : HEAD |
24fc71a693331ffe77e2b6d81c70aca6fa055e47 |
|
22-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
Added mail_index_transaction_get_updated_view() which can be used to access
uncommitted messages.
--HG--
branch : HEAD |
56f45b3f3ae20e5c933701f4657dda5ef1916855 |
|
19-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
Several fixes and cleanups to cache file code, still badly broken
--HG--
branch : HEAD |
1175f27441385a7011629f295f42708f9a3a4ffc |
|
14-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
Modifying extra_records should work now.
--HG--
branch : HEAD |
e06c0b65c16ccce69bbee009ead14d7d3d17a256 |
|
24-May-2004 |
Timo Sirainen <tss@iki.fi> |
Index header changes now go through transaction log. Removed the kludgy
parameters for mail_index_sync_end(). Removed code duplication of syncing
index root mapping and view mapping. Some fixes to handling uidvalidity and
nextuid in syncing.
--HG--
branch : HEAD |
31ddc75584c5cde53d2e78a737587f2e7fdcb0d2 |
|
28-Apr-2004 |
Timo Sirainen <tss@iki.fi> |
Forced locking to be right with mprotect()ing index file. Support for
disabling mmap for indexes, and disabling just mmap+write().
--HG--
branch : HEAD |
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834 |
|
27-Apr-2004 |
Timo Sirainen <tss@iki.fi> |
importing new index code. mbox still broken.
--HG--
branch : HEAD |