c04adbeb0f214dc323ced079c7380fe9a226cdc5 |
|
24-Jan-2018 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-index: Add and use CACHE_TRANS_CONTEXT_REQUIRE
Satisfies static analyzers |
bcb4e51a409d94ae670de96afb8483a4f7855294 |
|
01-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2018. |
139143f1b798472438b813343a48601f1c564060 |
|
15-Dec-2017 |
Sergey Kitov <sergey.kitov@open-xchange.com> |
global: Change calls to array_idx_modifiable to array_idx_get_space.
Only calls that require space allocation are to be changed. |
c147bff818798a979d93537f72f5c1f68f5d5ba8 |
|
24-Nov-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
global: Use t_buffer_create
sed -i -e 's/buffer_create_dynamic(pool_datastack_create(), */t_buffer_create(/g' |
19557f192d37cd54a1a090a8a26d9d47265e4413 |
|
01-Nov-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
global: Fix spelling mistakes in comments
Original work by @andreasschulze and @jsoref |
67bbcd664bebce9a507a49c67273be4814d07c97 |
|
12-Oct-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Add mail_index_cache_optimization_settings |
6307d76096764e66bddc63d4a3e5a1aa19cc528f |
|
19-Sep-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
global: start relying on buffer_free(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- buffer_free(&E);
- }
+ buffer_free(&E); |
93cb78fb1947d34e98efffecc2b73f035e711f18 |
|
21-Aug-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Add mail_cache_close_mail() to smartly drop cached data with INDEX=MEMORY
Instead of reseting the entire transaction buffer when 256 kB is reached,
just drop mails have have been marked closed with mail_cache_close_mail().
If that's not enough, continue deleting forcibly until the buffer is below
256 kB.
This is especially important when mail_prefetch_count>0 and INDEX=MEMORY.
In that case there can be multiple mails that are being added to cache
and used later on. If they were dropped from cache too early, the work
would have to be done all over again. |
3da9825732c865b8ea11ea070e5b6f881ffae424 |
|
14-Jun-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Fix cache lookups from uncommitted transactions with in-memory indexes
This especially fixes mail_get_header_stream() with imapc and
imapc_features=fetch-headers, because it works by first fetching the
specific headers and putting them to the cache transaction, then later on
relying on index_mail_get_header_stream() to get them from the transaction.
Before this fix they wouldn't be found, which triggered another unnecessary
FETCH BODY.PEEK[HEADER]. |
e6d4f540bf5c3b7ef5d6e154b217a2422210048c |
|
08-Jun-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Use i_realloc_type() wherever possible |
2454dfa32c93c20a8522c6ed42fe057baaac9f9a |
|
01-Jan-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2017. |
efe78d3ba24fc866af1c79b9223dc0809ba26cad |
|
24-Dec-2016 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
global: Replaced all instances of memset(p, 0, sizeof(*p)) with the new i_zero() macro.
Used the following script:
C_FILES=`git ls-files *.c`
H_FILES=`git ls-files *.h`
for F in "$C_FILES $H_FILES"; do
echo "$F"
perl -p -i -e 's/safe_memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero_safe(&$1)/g' $F
perl -p -i -e 's/safe_memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero_safe($1)/g' $F
perl -p -i -e 's/memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero(&$1)/g' $F
perl -p -i -e 's/memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero($1)/g' $F
done |
1c783b6d9cbdf0cdb84507472f0aa6a50a1861cd |
|
24-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Fix potential error when reading from uncommitted cache transaction
If dovecot.index.cache is compressed during the transaction, the new cache
fields mapping doesn't necessarily match what is in the transaction.
Fixes:
Error: Corrupted index cache file .../dovecot.index.cache: field index too large (27 >= 17)
Although there may be other cache corruption errors it also fixes. |
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] |
02c335c23bf5fa225a467c19f2c063fb0dc7b8c3 |
|
12-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: freshen copyright
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-5]/$1-2016/g;s/ (201[0-5]) Dovecot/ $1-2016 Dovecot/' |
7cb128dc4cae2a03a742f63ba7afee23c78e3af0 |
|
05-Jan-2015 |
Phil Carmody <phil@dovecot.fi> |
global: freshen copyright
Robomatically:
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-4]/$1-2015/g;s/ (201[0-4]) Dovecot/ $1-2015 Dovecot/'
Happy 2015 everyone!
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
0f833d18af36bf307cd69f235eb3fb779245b478 |
|
07-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib-index: Delay unlocking cache compression until changes to transaction log are committed.
This should fix race condition with two processes compressing the file at
the same time with same file_seq and becoming confused. |
ab70f55bb8d824ca1ed7c74196f2f502edd29cc7 |
|
07-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib-index: mail_cache_lock() partial rewrite.
require_same_reset_id is no longer needed, if it ever was. If we're locking
the cache file, we always want the latest one. The logic of locking in
general was somewhat confusing and it probably didn't always successfully
lock when it should have, because the reset_id happened to match an old
file. |
2219015cc814b18a72d8d37696a5bffc52edd767 |
|
07-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib-index: Don't keep cache file locked for as long while syncing index.
The earlier code was required for updating the cache offsets, but this code
no longer exists. Now we just need to update the record counts in the
header, which can be done quickly at the end of the sync. |
a8c5a86d183db25a57bf193c06b41e092ec2e151 |
|
04-Feb-2014 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2014. |
7f5ddd0423db2e2e3d578e017c4eae32a08a4ed7 |
|
16-Nov-2013 |
Timo Sirainen <tss@iki.fi> |
lib-index: Recent change broke cache transactions for more than 1 mail. |
91496fd60a7980f4ebdf93cbb099b9db198a0e74 |
|
16-Nov-2013 |
Timo Sirainen <tss@iki.fi> |
lib-index: Support a small in-memory cache even with INDEX=MEMORY |
127f99adeb10d9f9e06896f97dc187eac4ca8852 |
|
16-Nov-2013 |
Timo Sirainen <tss@iki.fi> |
lib-index: mail_cache_lookup*() can now finds also the latest mail_cache_add()ed data. |
d33fc6c584718efd46159e1d8f46488b9dfc66f5 |
|
26-May-2013 |
Timo Sirainen <tss@iki.fi> |
lib-index: mail_cache_lookup*() can now return fields recently added with mail_cache_add()
Previously it was returning them if they had already been written to
dovecot.index.cache, but not if they were still in the in-memory buffer.
This avoids caching/parsing the same field multiple times when messages
aren't accessed in ascending order (e.g. when sorting messages). |
8ae72ad7d0c69e972cfa65d1e2ce4e3e9a8b765c |
|
24-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Replaced all -1U and (unsigned int)-1 with UINT_MAX.
It's somewhat clearer this way. Also clang's -fsanitize=integer gives
runtime errors about -1U (but not about explicit casts, so no need to change
(type)-1 casts). |
03860f6dd70abfa2551a846e77a5c41cb40dc141 |
|
16-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
lib-index: Avoid getting expunged-status in index lookups when not necessary.
This especially improves dsync performance. |
5a580c3a38ced62d4bcc95b8ac7c4f2935b5d294 |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Oops :) Update copyrights to 2013 without breaking all .c files. |
cca4ba2a504d70a9fe9fee37f8433997359de52c |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2013. |
daf0035ef39182601facf6d01c5c39e113c024c5 |
|
28-Nov-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Fixed randomly failing to write to dovecot.index.cache file |
285e73e04966dd57d5eda183be56e8a59e081c93 |
|
27-Nov-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Added v2.2+ forwards compatibility to dovecot.index.cache |
f0ff961282e618945dfe997dc45ff95d656e5790 |
|
03-Nov-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Replaced cache's deleted_space with deleted_record_count.
This way when expunging messages we don't need to actually read through the
cache file and calculate how many bytes will be freed, we can simply
increase the deleted_record_count by 1. We'll still compress the cache file
approximately after 20% of the space (records) has been deleted.
This also converts the old "hole offset" header field to tracking the number
of records in the cache file. Otherwise we'd have to assume that all of the
messages in mailbox have a cache record, but that isn't true for users who
have only temporary cache fields. This "hole offset" cannot be trusted
completely, because nothing prevents old Dovecot version from simply writing
a hole offset there and messing up the record counts. Because of this there
are a couple of extra sanity checks for it. (Unfortunately there wasn't any
easy way to simply add a new field to header without breaking backwards
compatibility.) |
330d54e9e3bf076efe91f101c562d1268160b128 |
|
03-Nov-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: If a cache record is larger than 64 kB, don't add it to cache file.
This shouldn't affect anything except mails that probably shouldn't exist in
the first place. |
131b073bdc3650083b00616dc778dd3017c2bbb5 |
|
03-Nov-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Cache record linking is now while writing new records, not later with pwrite().
This should make performance somewhat better. It also means that now the
only overwrites to cache file are to the file header and the fields header.
This means that we no longer have to invalidate file_cache (with
mmap_disable=yes) except when reading the headers, which is always done
anyway.
It would be nice to move the overwritten fields in the headers to a cache
header in dovecot.index file, but this is a bit tricky currently. When
writing these headers the cache file needs to be locked to avoid race
conditions. To avoid deadlocks the transaction log would have to be locked
before the cache. The code to do all this would still be a bit complex, and
to keep backwards compatibility with old Dovecot versions it would still
have to do the overwriting until the backwards compatibility code is
disabled. |
c1b9c4531186c6a7cd92d2c353273a834f8ee66f |
|
29-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
Make static analyzer happier. |
82ed69779f49bd71ef1b570ce8aca67d357dbee8 |
|
18-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: mail_cache_map() API cleanup |
c58c35722c23363b83db38641a928274def96725 |
|
12-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Error handling fix to cache transaction flushing. |
289064eb21595d3e4460439eccdc48232d13f5e1 |
|
04-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Simplified writing to dovecot.index.cache file.
The old method was basically:
- write max. 32 kB to internal buffer
- flush it by writing to reserved areas (with no locks)
The reserved areas were acquired by doing (whenever needed):
- lock dovecot.index.cache
- reserve data from dovecot.index.cache for writing, potentially increasing
the file size by writing 0 bytes. the reserved area size varies.
- unlock dovecot.index.cache
This worked, but if multiple processes were writing to the cache file it
could have left incomplete reserved areas as holes. The holes were attempted
to be filled if they were large enough.
The new method is:
- write max. 256 kB to internal buffer
- lock dovecot.index.cache
- append the buffer to dovecot.index.cache
- unlock dovecot.index.cache
No reserved areas, holes or anything else weird going on.
Ideally no data would be overwritten in the dovecot.index.cache file, only
appended. Unfortunately currently some data is still overwritten:
- mail_cache_header.{deleted_space,continued_record_count}
- mail_cache_header_fields.next_offset when writing a new one
- mail_cache_header_fields.{last_used,decision}
- mail_cache_record.prev_offset
The changing headers could eventually be moved to dovecot.index. This
however is a backwards-incompatible change. The record's prev_offset could
maybe simply just not be written in those (somewhat rare) problematic
situations. |
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. |
a10ed8c47534b4c6b6bf2711ccfe577e720a47b4 |
|
23-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Marked functions parameters that are allowed to be NULL. Some APIs were also changed.
The non-obvious APIs where NULL parameter was changed to "" are
master_service_init() and auth_master_user_list_init().
These checks can currently be enabled only on a patched clang:
http://llvm.org/bugs/show_bug.cgi?id=6786 |
5f5870385cff47efd2f58e7892f251cf13761528 |
|
12-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2012. |
2e37d45867d081db150ab78dad303b9077aea24f |
|
04-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2011. |
183bea41fa640dc8117f3eb45ff935cd81377a84 |
|
04-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2011. |
16c28dd75976f94acc4940d6ba68b6cd4853aac7 |
|
06-Oct-2010 |
Timo Sirainen <tss@iki.fi> |
lib-index: Cache offsets were sometimes written pointing to an older cache file. |
b780aa272b742a43579cdb523cc79cc8d4521306 |
|
25-Jun-2010 |
Timo Sirainen <tss@iki.fi> |
Renamed fsync_disable to mail_fsync=optimized|always|never.
--HG--
branch : HEAD |
20ecea31024db11ea4ca51c87f34fa15470e9c28 |
|
05-Apr-2010 |
Timo Sirainen <tss@iki.fi> |
lib-index: Minor code cleanup.
--HG--
branch : HEAD |
8bb360f9e5de1c25e4f875205bb06e8bf15dae14 |
|
05-Apr-2010 |
Timo Sirainen <tss@iki.fi> |
Removed dead code.
--HG--
branch : HEAD |
afacb5855315ffa03936025b8f24de26c35ce090 |
|
27-Jan-2010 |
Timo Sirainen <tss@iki.fi> |
mail cache: Avoid infinite loops.
--HG--
branch : HEAD |
e59faf65ce864fe95dc00f5d52b8323cdbd0608a |
|
25-Jan-2010 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2010.
--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 |
741d705983e10046f07ef372b760bcdd169b068a |
|
06-Oct-2009 |
Timo Sirainen <tss@iki.fi> |
Don't assert-crash after noticing cache file corruption.
--HG--
branch : HEAD |
66ecc94150cbce23aad3240135e0782e0a74d479 |
|
30-Jul-2009 |
Timo Sirainen <tss@iki.fi> |
index: Removed duplication of mail_index_open_flags from struct mail_index.
--HG--
branch : HEAD |
61b6d1256936065321153bcd9228b9e45d95c9ab |
|
14-Jul-2009 |
Timo Sirainen <tss@iki.fi> |
More fixes to cache changes.
--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 |
9404a7b90dcb80d31bd37ee2493f03751acdb1bd |
|
11-Mar-2009 |
Timo Sirainen <tss@iki.fi> |
Removed rarely used parameters from mail_index_transaction_commit().
mail_index_transaction_commit_get_pos() can be used where they're required.
--HG--
branch : HEAD |
45312f52ff3a3d4c137447be4c7556500c2f8bf2 |
|
06-Jan-2009 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2009.
--HG--
branch : HEAD |
8fcaba5977f7d596632df1ed2af8541e5f154258 |
|
14-Oct-2008 |
Timo Sirainen <tss@iki.fi> |
Cache file was never updated if the file existed but index didn't have cache extension.
--HG--
branch : HEAD |
d6693dac50e4fb547d8dc61b85820f1761a33575 |
|
02-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
Optimized cache record loop tracking.
--HG--
branch : HEAD |
ba8bdb9dfc467ed2e6a988c42567fc44a28bebfc |
|
02-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
Optimized cache record loop tracking.
--HG--
branch : HEAD |
19e8adccba16ff419f5675b1575358c2956dce83 |
|
11-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
Renamed T_FRAME_BEGIN/END to T_BEGIN/END. Removed T_FRAME() macro and
replaced them with T_BEGIN/END calls. T_FRAME() made it difficult to debug
code with gdb.
--HG--
branch : HEAD |
eee852da15c907d2aa20bce58fbfcaae04b558d5 |
|
30-Jan-2008 |
Timo Sirainen <tss@iki.fi> |
Removed cache prev_offset optimization for now. It could have caused cache
record loops.
--HG--
branch : HEAD |
6a7f64562ddd0dd2fec755ec4e9c9afde8e85cf1 |
|
10-Jan-2008 |
Timo Sirainen <tss@iki.fi> |
Link cache records together directly when writing the new records, instead
of delaying them until later and causing lots of small writes. We still do
this delayed check and do the writes when it's required, but it shouldn't
happen normally.
--HG--
branch : HEAD |
ddbad7a661c0663fafd2b79393efa85f840d6af6 |
|
04-Jan-2008 |
Timo Sirainen <tss@iki.fi> |
Fixes to handling when fields are dropped from cache file.
--HG--
branch : HEAD |
76b43e4417bab52e913da39b5f5bc2a130d3f149 |
|
01-Jan-2008 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2008.
--HG--
branch : HEAD |
31050c3df6cbe403e8ced8ef11b5c4e12124d354 |
|
29-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
Fixed crashes at error conditions.
--HG--
branch : HEAD |
eddd9bf1a1369aea4a2715f6be1137da6d17d293 |
|
05-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
Replaced t_push/t_pop calls with T_FRAME*() macros.
--HG--
branch : HEAD |
956f7778e413d3184d69e7b96e4a6b3cd5570bcd |
|
22-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
mail_cache_field_want_add(): Return TRUE for temp fields only if we're
adding the field to a new enough message.
--HG--
branch : HEAD |
d24daa83c25063ef12b524c9ffcc9ecca34dadb9 |
|
18-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
When we create the initial cache file or recreate a broken one, write the
offsets to transaction log using a temporary transaction instead of a
long-running one which may get aborted.
--HG--
branch : HEAD |
dc0474dc9d5652d76cb41f439844dd80c8b96642 |
|
18-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
If cache file's file_seq appears to be broken, handle it by compressing the
cache instead of just never using it.
--HG--
branch : HEAD |
959a66f100887ce0acf442a397cfaec89570436a |
|
08-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
We don't really care if we lost a cache file or if it gets broken, so don't
ever fsync it unless mail_nfs_index=yes.
--HG--
branch : HEAD |
da5dd6f1141e8b134199e1a2a23af4e05173464a |
|
08-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Crashfix if cache file got unusable in the middle of a transaction.
--HG--
branch : HEAD |
3157004d1281d5c203f739fa2e83f7a8488de92d |
|
08-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Crashfix in error conditions
--HG--
branch : HEAD |
b159b7fb9740b6e37238016d8395a351de498d50 |
|
06-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Reopen cache file early enough in the transaction if it has changed.
--HG--
branch : HEAD |
f501ad38c51cf1d8f4f84313922c785e6ae6e81f |
|
06-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Keep a separate copy of mail_cache_header when mmap_disable=yes, otherwise
it could get cleared unexpectedly.
--HG--
branch : HEAD |
ac90bc1130bc014e41c47a1eb81dc1a3d1108115 |
|
06-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Last change caused assert-crashes.
--HG--
branch : HEAD |
fe6cf42464c36ab281c0e0740f0255be77453670 |
|
05-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
When adding new fields to the cache file, add all the fields we currently
know about to avoid adding them one-by-one.
--HG--
branch : HEAD |
17118d434fcd48b0f0211bdac2747276f0b05223 |
|
03-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Assert-crashfix
--HG--
branch : HEAD |
b387ee112301fef59d16ab3b120e3821cd0c70df |
|
02-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Last change broke cache file creation completely.
--HG--
branch : HEAD |
cfbf891f065b18602703ed6fa2af1a541d4d0b04 |
|
28-Oct-2007 |
Timo Sirainen <tss@iki.fi> |
Fixed a race condition causing cache corruption when creating/compressing
cache file.
--HG--
branch : HEAD |
9b8845adeadccbdac21cb7971ba4c7732f79eef2 |
|
21-Oct-2007 |
Timo Sirainen <tss@iki.fi> |
Don't give "Newly added field got lost unexpectedly" errors when cache file
is created while adding a new field.
--HG--
branch : HEAD |
6f73af3a3a6ee900c7e736874587968d76a20bc0 |
|
22-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
mail_cache_transaction_commit()/rollback() API is now public and takes a **
pointer. Don't break if transaction is committed/rollbacked multiple times
for a cache view.
--HG--
branch : HEAD |
8c02331f9f569d8b30e74b6bc8550734d65f9dae |
|
22-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Code cleanups and some minor fixes.
--HG--
branch : HEAD |
89a126810703c666309310d0f3189e9834d70b5b |
|
16-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Replaced my Copyright notices. The year range always ends with 2007 now.
My name was replaced with "Dovecot authors". In many cases I didn't really
even own the copyright, so this is more correct.
--HG--
branch : HEAD |
0f66f12eb4cdbf47670975044c88d8f388bf92df |
|
15-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Changed buffer_free() and buffer_free_without_data() APIs to take ** pointer
which is set to NULL instead of hiding it with a macro.
--HG--
branch : HEAD |
9a583c7a827f7a4d89ee43774f2d51ea6a214543 |
|
13-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
Drop fields that haven't been used for 30 days when compressing.
--HG--
branch : HEAD |
988f9ad3b5e973c12453a780effc477031107648 |
|
15-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
mail_cache_add(): Update existing fields array so mail_cache_field_exists()
works right.
--HG--
branch : HEAD |
65b73edef55f8d1a4e343fdc47c2a3f9d4554db3 |
|
12-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
Make sure cache is opened when mail_cache_field_can_add() or
mail_cache_field_want_add() is called.
--HG--
branch : HEAD |
0e35156f9193e194699d356f79640d6f613ac18b |
|
12-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
If we couldn't add a new header field, don't crash.
--HG--
branch : HEAD |
df6478c4cf605bd81b3891c148b84c14eb6c4035 |
|
12-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
Don't create cache file until something is actually being added to it.
--HG--
branch : HEAD |
710deabc6b3c305c3a842e7a2e0d173c526d13a7 |
|
14-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
s/field/field_idx/
--HG--
branch : HEAD |
1b97a59edb073e9a89ac43a21a9abe5d590d4a56 |
|
14-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
Cache code cleanups
--HG--
branch : HEAD |
c740209eb3db031022c6fd436fa2ef1aa0ec46b8 |
|
14-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
Declare a global uint32_t array type.
--HG--
branch : HEAD |
1f6653c23f792401623734d783ede1653ba65436 |
|
25-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
compile fix
--HG--
branch : HEAD |
2623ed55e5bc547363abc7bc9de6b4ad2c53e531 |
|
23-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
If we update the fields list in header, it's committed immediately so if the
transaction gets rollbacked, don't overwrite the already committed header.
--HG--
branch : HEAD |
1a5fcc972dbadfe7959011b8ad422707e2dfc19f |
|
22-Feb-2007 |
Timo Sirainen <tss@iki.fi> |
Crashfix in error conditions.
--HG--
branch : HEAD |
5a643ed4d602e9738399341c5e91e805238be708 |
|
02-Feb-2007 |
Timo Sirainen <tss@iki.fi> |
crashfix
--HG--
branch : HEAD |
6a669919418a1c7469f9faf55d11b3c723f72cff |
|
01-Feb-2007 |
Timo Sirainen <tss@iki.fi> |
If cache file wasn't opened yet when flushing a transaction, the changes
weren't written to the file. Also fixes a "invalid record size" bug which
could have happened when transaction flush failed.
--HG--
branch : HEAD |
369a1084c500a9df7448ffa9409ce32e42060bc2 |
|
17-Dec-2006 |
Timo Sirainen <tss@iki.fi> |
Added fsync_disable setting. Also added missing fsync()ing to dbox when
saving mails.
--HG--
branch : HEAD |
a2ec607689dc88112bf08785960e441153f35d57 |
|
15-Oct-2006 |
Timo Sirainen <tss@iki.fi> |
Fix to delayed cache file opening, cached data might have been lost.
--HG--
branch : HEAD |
91dca97b367c54a139c268b56a0c67f564bd9197 |
|
10-Sep-2006 |
Timo Sirainen <tss@iki.fi> |
Replaced ARRAY_CREATE() macro with [ipt]_array_init() macros. The macro
has no side effects so it might as well be lowercased.
--HG--
branch : HEAD |
26a8b7deb3a5b6f26f9c4d71538e1248f680e4be |
|
10-Sep-2006 |
Timo Sirainen <tss@iki.fi> |
Removed type parameter from ARRAY_CREATE since it's not needed anymore.
--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 |
e0127c3244319fffb07bf65a3ed9e4a5d6e555b7 |
|
08-May-2006 |
Timo Sirainen <timo.sirainen@movial.fi> |
Added mail_cache_field_want_add() and mail_cache_field_can_add()
--HG--
branch : HEAD |
6cd02a9525acb9897a65b05bfeee9b8d283e0f74 |
|
28-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Changed reservations buffer to array.
--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 |
2e0019296a16e0ea8c47fd9fe796d92f50f27539 |
|
02-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Don't fdatasync() cache file. It's not all that important.
--HG--
branch : HEAD |
874b2d1471ae936c6666432b09bf761b866f7067 |
|
28-Oct-2005 |
Timo Sirainen <tss@iki.fi> |
mail_cache_delete(): Make sure we don't get to infinite loop if cache
records contain a loop.
--HG--
branch : HEAD |
a817fdcc43aedf423e2134091d5f83f91d64bcc9 |
|
30-Sep-2005 |
Timo Sirainen <tss@iki.fi> |
Unlocking cache file can also corrupt it since it modifies it. Added a
return value for it and checks to handle the failure. Fixes a crash in some
error situations.
--HG--
branch : HEAD |
dd0ba1bab2c1b89c7e063fa45d156fa72b8260d5 |
|
28-Aug-2005 |
Timo Sirainen <tss@iki.fi> |
We could have written corrupted data to cache file if it had just been
compressed. Also did some other cleanups.
--HG--
branch : HEAD |
16f816d3f3c32ae3351834253f52ddd0212bcbf3 |
|
04-Jul-2005 |
Timo Sirainen <tss@iki.fi> |
Moved array declaration to array-decl.h and include it in lib.h. So array.h
needs to be now included to use any array_*() functions.
--HG--
branch : HEAD |
dbd9604da561399cc6255289d5b6f6f662ab2d00 |
|
14-May-2005 |
Timo Sirainen <tss@iki.fi> |
Whenever writing to cache file, also updated file_cache. Fixes problems with
mmap_disable=yes.
--HG--
branch : HEAD |
e9f2d9104d395bcf54be3f8ba8d9f63aecf0bcbe |
|
08-Apr-2005 |
Timo Sirainen <tss@iki.fi> |
buffer -> array
--HG--
branch : HEAD |
b30499429feee4f16f1e09c7047101dc7ff38304 |
|
07-Mar-2005 |
Timo Sirainen <tss@iki.fi> |
Space reservation fixes and cleanups.
--HG--
branch : HEAD |
cccce0b7144735bcfec4da50298f2a9fc5e3c207 |
|
05-Mar-2005 |
Timo Sirainen <tss@iki.fi> |
Cache file space reservation assertfix.
--HG--
branch : HEAD |
bb1e9bd834c04f272b6e3f4d4a7686c26d6e5c2a |
|
09-Feb-2005 |
Timo Sirainen <tss@iki.fi> |
cache growing crashfix
--HG--
branch : HEAD |
e37fbcda56ab154557e84f990012502be53aa6c6 |
|
04-Feb-2005 |
Timo Sirainen <tss@iki.fi> |
cleanups / minor fixes
--HG--
branch : HEAD |
8d9c0c59e2b1432e4083028c88d46f043a36709d |
|
19-Dec-2004 |
Timo Sirainen <tss@iki.fi> |
Type changes, was probably broken with 64bit systems.
--HG--
branch : HEAD |
fcfb528483369975066c6adf1c55c16e6fb6e91f |
|
29-Nov-2004 |
Timo Sirainen <tss@iki.fi> |
Crashfixes for reading corrupted cache files.
--HG--
branch : HEAD |
cfbb3ff45d6bd27e6442e332fa69c43c984ca651 |
|
29-Nov-2004 |
Timo Sirainen <tss@iki.fi> |
Make sure we don't try to write to cache file when it's already closed
(could happen if it was corrupted).
--HG--
branch : HEAD |
114a0f74e0f825c6bd8aeadfafb248a030762a1f |
|
08-Nov-2004 |
Timo Sirainen <tss@iki.fi> |
More correct file cache invalidating.
--HG--
branch : HEAD |
1098fc409a45e7603701dc94635927a673bee0c1 |
|
08-Nov-2004 |
Timo Sirainen <tss@iki.fi> |
Cache file works now with mmap_disable=yes. Still needs a few optimizations.
--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 |
faef57a36800fe952a5794328467f846d5480ae6 |
|
15-Oct-2004 |
Timo Sirainen <tss@iki.fi> |
Holes in cache file were broken
--HG--
branch : HEAD |
4b058f90f9e8a2c6b2eed275de4eb8cc5195a71d |
|
08-Oct-2004 |
Timo Sirainen <tss@iki.fi> |
Buffer API change: we no longer support limited sized buffers where
writes past limit wouldn't kill the process. They weren't used hardly
anywhere, they could have hidden bugs and the code for handling them was too
complex.
This also changed base64 and hex-binary APIs.
--HG--
branch : HEAD |
a13dd0ece98f62f61c64bff9c9c29ed3f3d82d54 |
|
11-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
Use global null4[] now.
--HG--
branch : HEAD |
0e7a1bd9b7b39e57a22dbd4ba12df9b9603e6391 |
|
11-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
extra asserts
--HG--
branch : HEAD |
7496b0969019303b4917eaccd1f4f771584d8a48 |
|
11-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
one more "cache file reopened" fix.
--HG--
branch : HEAD |
ee26329cb5cc679b5645e4933d529f86accb976a |
|
11-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
Don't crash when cache isn't usable.
--HG--
branch : HEAD |
f79a807865222dc8d5afd21667d2ace67f6c831b |
|
11-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
More fixes to make sure we don't write buffered data to cache file after
it's been reopened.
--HG--
branch : HEAD |
a2ce2eb4c266e2854fd34416ea5cfbe05dfd3971 |
|
11-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
If cache file was recreated the buffered transaction changes were written
into the new file which may have corrupted it.
--HG--
branch : HEAD |
5ebddd2d812296900bc255b24bcd508878784c37 |
|
10-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
Before adding new fields to cache file, make sure they weren't already
added by re-reading the header after file is locked.
--HG--
branch : HEAD |
531fa12126fc7abf63244a7ed4505896a8694206 |
|
10-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
If we detect cache corruption, try to avoid printing tons of "bad file
descriptor" error messages for writes.
--HG--
branch : HEAD |
31854ec69857e384882bcade5cf0c5dea8abf230 |
|
15-Aug-2004 |
Timo Sirainen <tss@iki.fi> |
rollback: don't lock file if we don't need to
--HG--
branch : HEAD |
44ff75ca53188056ff5a3e50428e3f2078800b3c |
|
31-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Transaction log file is now read-lockless.
--HG--
branch : HEAD |
e1f05b193ac1edd3267294e9501e8063aa0f791a |
|
23-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Assert crashfix in certain situations when adding new cache records.
--HG--
branch : HEAD |
0a51697f82fbd45a511710479e99efd42dc18453 |
|
20-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Limit how much a single transaction can reserve space
--HG--
branch : HEAD |
4bbee99b3aef449a9a2a11a5b5cf1ca486915c49 |
|
20-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Cache fixes. Decisions are saved again.
--HG--
branch : HEAD |
e015e2f7e7f48874495f9df8b0dd192b7ffcb5cc |
|
18-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Header caching redesigned. New design allows caching decisions per field, so
they can be divided to temporary/permanent. Cached headers are now always
returned in original order, old code didn't guarantee it. Some other caching
changes. (still missing code to store changes in caching decisions)
--HG--
branch : HEAD |
50c4a9739b55370b1d3950d7b3ec2f7cd2ed5f49 |
|
15-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Delay memory allocations for cache transaction. We don't always need it.
--HG--
branch : HEAD |
ca316aeb7648d3f1bcf45231f73ddeb1b67a6961 |
|
10-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Cache fixes. Lookups now look into transactions too.
--HG--
branch : HEAD |
992a13add4eea0810e4db0f042a595dddf85536a |
|
08-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Cache file fixes, API changes, etc. It's still in somewhat ugly state, but
getting better..
--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 |
a40d26f83af808a0ea1e212c001d682a96d870b0 |
|
04-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Caching fixes and optimizations. Removed all network byte ordering code -
it's not worth the trouble and would require massive changes in indexing
code as well to be useful. Changed next_offset to prev_offset which is
updated while syncing index.
--HG--
branch : HEAD |
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8 |
|
04-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Cache file compression works now and compressed cache file is reopened.
Several other cleanups related to opening - cache file isn't created
immediately anymore.
--HG--
branch : HEAD |
8aacc9e7c84f8376822823ec98c2f551d4919b2e |
|
28-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
Added some smartness for deciding what to cache. Cache compression code compiles, but untested.
--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 |
b44a50ea4123f21dfc8e1b6c602f690fd9721b67 |
|
21-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
Cache doesn't crash anymore if we're asking it about messages that exist
only in uncommitted transactions.
--HG--
branch : HEAD |
ba482d3624ca4f1b3d638e6e8470ba5134f21493 |
|
21-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
Disable cache with mmap_disabled=yes, for now.
--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 |
da5d50534cfca45d0aaaf0bdac17b287b4588809 |
|
20-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
Beginnings of getting cache file working again. Easy to break currently, but
basics seem to work.
--HG--
branch : HEAD |
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834 |
|
27-Apr-2004 |
Timo Sirainen <tss@iki.fi> |
importing new index code. mbox still broken.
--HG--
branch : HEAD |