ea125b1c394cb6a281c6120f5396faa11fcb268b |
|
12-Sep-2016 |
Phil Carmody <phil@dovecot.fi> |
plugins: fts - replace i_assert under _expunge_log_subtract with warning (API change)
The helper whose interface is changing currently has no other known
clients (there's little need for it to be exposed at all).
This should never happen, but if it does, just tally the number of times
it happened, and squirt out a warning message after the whole subtract.
If it happens at all, there's no reason not to expect a lot, so only
warn once per file.
In particular - do not assert crash when this is seen - it has been seen
on live test systems where file corruption seems to have occured. As
this can only be associated with corrupt fts indexes, seeing this error
implies that the whole FTS index should be rebuilt for that user.
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
573424407a2d3c1453638a643583a7cf10c129e1 |
|
16-May-2016 |
Phil Carmody <phil@dovecot.fi> |
lib: istream - more migration to i_stream_read_bytes()
This time a coccinelle semantic patch, again hand checked:
git grep 'i_stream_read_data' | sed s/:.*// | \
while read f; do spatch --sp-file istream.cocci --in-place "$f" ; done
-- 8< --- istream.cocci ---
@@
expression e1, e2, e3, e4;
@@
- i_stream_read_data(e1, e2, e3, e4 - 1)
+ i_stream_read_bytes(e1, e2, e3, e4)
-- 8< --- end
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
b22dcc3c0c84919fe500cf877d8dfd9bddbef76f |
|
15-Mar-2016 |
Phil Carmody <phil@dovecot.fi> |
plugins: fts-expunge-log - subtraction from and dumping of a flattened log
This permits you to read a whole expunge log, remove records from the
in-memory copy of it, and write it back out to file.
NOTE: Inefficiently implemented. The hash is effectively rebuilt, this
time backed by a file, a record at a time, which implies O(n^2)
possibilities.
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
2442c230b6c95b20d26ead752f9de1cb40544a53 |
|
21-Jan-2015 |
Phil Carmody <phil@dovecot.fi> |
plugins/fts: expunge-log - permit append helpers to have no log to write to
This is for creating an in-RAM, later queriable, structure which you do not
want to be written to backing storage. As when you've finished with one, there's
no concept of a "commit", provide an alternative "abort" way out. These are
identical apart from the call to the write() routine, so refactor the two.
Signed-off-by: Phil Carmody <phil@dovecot.fi> |