Arnt Gulbrandsen [Thu, 4 Dec 2008 15:58:46 +0000 (16:58 +0100)]
typo
Arnt Gulbrandsen [Thu, 4 Dec 2008 15:58:16 +0000 (16:58 +0100)]
http://
Arnt Gulbrandsen [Thu, 4 Dec 2008 15:40:49 +0000 (16:40 +0100)]
mention where to find more configuration stuff
twice, slightly differently, just in case one way fails for some reader.
Abhijit Menon-Sen [Tue, 2 Dec 2008 16:31:25 +0000 (22:01 +0530)]
Update VERSION.
Arnt Gulbrandsen [Tue, 2 Dec 2008 10:09:46 +0000 (11:09 +0100)]
just more comments about the state machine
Abhijit Menon-Sen [Mon, 1 Dec 2008 19:13:08 +0000 (00:43 +0530)]
Udoc fix.
Arnt Gulbrandsen [Mon, 1 Dec 2008 16:49:58 +0000 (17:49 +0100)]
don't leak memory badly
3.0.5, here we come
Arnt Gulbrandsen [Mon, 1 Dec 2008 14:39:24 +0000 (15:39 +0100)]
reduce and improve the debug support in Allocator.
remove the functions that use stdout, since stdout tends to be closed when
I need it.
make sizeOf return the correct number, at the cost of marking the object
as reachable for the next collection cycle.
Arnt Gulbrandsen [Mon, 1 Dec 2008 14:13:45 +0000 (15:13 +0100)]
free some space in the allocator block
we don't need more than 127 pointers anyway, except when an object is
all-pointer, which is bad.
Arnt Gulbrandsen [Mon, 1 Dec 2008 13:19:10 +0000 (14:19 +0100)]
log the number of objects reachable from each root, if large
Arnt Gulbrandsen [Fri, 28 Nov 2008 14:09:47 +0000 (15:09 +0100)]
we shouldn't change a single quoted string to a single string starting
with quote signs ( {"x"} -> "x" (one character to begin with, then three)
Arnt Gulbrandsen [Fri, 28 Nov 2008 13:54:13 +0000 (14:54 +0100)]
process pointers in ascending order
judging by list and patriciatree, ascending order seems more likely to
avoid a giant object stack in the allocator
Arnt Gulbrandsen [Fri, 28 Nov 2008 13:02:35 +0000 (14:02 +0100)]
the old code would misinterpret a full read buffer
fix
Abhijit Menon-Sen [Thu, 27 Nov 2008 18:16:12 +0000 (23:46 +0530)]
Make aox documentation (mostly) agree with its capabilities.
Arnt Gulbrandsen [Thu, 27 Nov 2008 18:11:30 +0000 (19:11 +0100)]
generally unbreak vacation.
most importantly, sending a vacation message to an address which wasn't in
the database now works.
still broken: there's a race on the autoresponses table. we need to lock
that entire table. very evil.
Arnt Gulbrandsen [Thu, 27 Nov 2008 18:07:55 +0000 (19:07 +0100)]
give users the ability to insert extra addresses in the database as part
of injection, and get the ID of those addresses.
helpful for sieve/vacation.
Arnt Gulbrandsen [Thu, 27 Nov 2008 13:14:47 +0000 (14:14 +0100)]
teach the injector to work with a subtransaction.
this will please sieve, which needs to do vacatio work along with
injection.
Abhijit Menon-Sen [Thu, 27 Nov 2008 11:02:48 +0000 (16:32 +0530)]
Don't segfault.
Abhijit Menon-Sen [Wed, 26 Nov 2008 11:05:44 +0000 (16:35 +0530)]
Rename MessageSet to IntegerSet and use it to avoid "new uint".
"new uint" was used mostly to populate List<uint>s that were passed to
Query::bind() and then forgotten—but never garbage collected. Using an
IntegerSet (because we know from inspection that there won't be any
duplicates) eliminates the problem neatly.
Arnt Gulbrandsen [Wed, 26 Nov 2008 09:26:24 +0000 (10:26 +0100)]
don't assume there to be annotations
Arnt Gulbrandsen [Tue, 25 Nov 2008 22:20:10 +0000 (23:20 +0100)]
sieve vacation was a tiny little bit broken.
3.0.5 stuff.
there seems to be something more.
Arnt Gulbrandsen [Tue, 25 Nov 2008 15:53:47 +0000 (16:53 +0100)]
trust the Flag cache very little, if at all
Arnt Gulbrandsen [Tue, 25 Nov 2008 14:42:46 +0000 (15:42 +0100)]
get rid of AnnotationName.
use database work instead, so there's no chance for the cache and db to
get out of sync, and so life is generally simpler.
Arnt Gulbrandsen [Tue, 25 Nov 2008 09:15:54 +0000 (10:15 +0100)]
make autoresponses work even when the autoresponses table is empty.
this is 3.0.5 fodder. 3.0.4 was broken.
Arnt Gulbrandsen [Tue, 25 Nov 2008 09:10:32 +0000 (10:10 +0100)]
make the autoresponses table less of an eyesore for selecting DBAs.
the sent_from and sent_to columns contain an address, any address so long
as localpart and domain are right. this change tries to pick the one whose
displayname is an empty string, if there is one.
Arnt Gulbrandsen [Mon, 24 Nov 2008 15:57:20 +0000 (16:57 +0100)]
it's executable
Arnt Gulbrandsen [Mon, 24 Nov 2008 11:44:36 +0000 (12:44 +0100)]
be more efficient about mmap()
Arnt Gulbrandsen [Mon, 24 Nov 2008 11:20:56 +0000 (12:20 +0100)]
collect garbage a little less often, and don't log quite as much.
the logging helped, so we shouldn't need it for a while.
Arnt Gulbrandsen [Mon, 24 Nov 2008 11:20:16 +0000 (12:20 +0100)]
a new byteforwarded which allocates less memory. more or less none.
Arnt Gulbrandsen [Mon, 24 Nov 2008 09:18:40 +0000 (10:18 +0100)]
get rid of FieldName
it wasn't carrying its load, and may have contributed to memory cancer
(actual memory usage didn't increase much over time, but the number of 1MB
blocks used did)
Abhijit Menon-Sen [Sat, 22 Nov 2008 22:31:31 +0000 (04:01 +0530)]
Fix typo.
Arnt Gulbrandsen [Sat, 22 Nov 2008 12:11:36 +0000 (13:11 +0100)]
make sure we can collect garbage even if nothing in particular is happening
Arnt Gulbrandsen [Fri, 21 Nov 2008 12:17:24 +0000 (13:17 +0100)]
free more allocator blocks
instead of freeing only some unused blocks after sweeping, this frees all.
doesn't really make a difference since that memory would not be touched,
but that the "144312 objects across 342 1MB blocks" line is more accurate.
Abhijit Menon-Sen [Sat, 22 Nov 2008 14:16:29 +0000 (19:46 +0530)]
Fix state machine.
Arnt Gulbrandsen [Fri, 21 Nov 2008 14:47:21 +0000 (15:47 +0100)]
reset peak, and do it so it's reported, too
Arnt Gulbrandsen [Fri, 21 Nov 2008 10:10:42 +0000 (11:10 +0100)]
call reserve() here and there in order to use less RAM
Arnt Gulbrandsen [Fri, 21 Nov 2008 10:09:46 +0000 (11:09 +0100)]
an easy way to get a breakpoint every time a megabyte is allocated:
break oneMegabyteAllocated
Arnt Gulbrandsen [Fri, 21 Nov 2008 10:09:05 +0000 (11:09 +0100)]
try to get one batch every 15 seconds isntead of every 90
90 seconds means a lot of messages means a lot of RAM
Arnt Gulbrandsen [Thu, 20 Nov 2008 14:51:19 +0000 (15:51 +0100)]
avoid pgsql warning
Arnt Gulbrandsen [Thu, 20 Nov 2008 12:44:50 +0000 (13:44 +0100)]
IMAP EXAMINE was too broken for squirrelmail. fix.
Abhijit Menon-Sen [Thu, 20 Nov 2008 11:26:46 +0000 (16:56 +0530)]
Fix typo.
Arnt Gulbrandsen [Wed, 19 Nov 2008 13:19:43 +0000 (14:19 +0100)]
plug leak
Abhijit Menon-Sen [Wed, 19 Nov 2008 13:04:44 +0000 (18:34 +0530)]
Integrate another line that got missed from
Arnt Gulbrandsen [Wed, 19 Nov 2008 11:51:02 +0000 (12:51 +0100)]
dot an i.
the session is too much of an imap thing. pop needs to bend over and
pretend to be imap.
Arnt Gulbrandsen [Wed, 19 Nov 2008 11:41:30 +0000 (12:41 +0100)]
superclass virtual changed signature; follow the change in subclass
Abhijit Menon-Sen [Wed, 19 Nov 2008 11:35:28 +0000 (17:05 +0530)]
Internaldate is also trivia.
(One line missed due to a bad merge earlier.)
Abhijit Menon-Sen [Wed, 19 Nov 2008 11:30:28 +0000 (17:00 +0530)]
Remove some debug logging.
Abhijit Menon-Sen [Wed, 19 Nov 2008 11:28:24 +0000 (16:58 +0530)]
Revert "udoc fixes."
This reverts part of commit
6991eb2b7bf49592d60e653a8fc9d657686941aa,
which depends on a patch that was not integrated into 3.0.x.
Abhijit Menon-Sen [Wed, 19 Nov 2008 11:25:44 +0000 (16:55 +0530)]
Revert "code changed; doc needs to change"
This reverts commit
b3423fe5a118225e948c1d2f88bfc07817fa92fe, which was
dependent on another patch that was not integrated.
Arnt Gulbrandsen [Wed, 19 Nov 2008 11:07:15 +0000 (12:07 +0100)]
if we need to send the query, then we need to ask for all the results.
(the code below assumes that the results are complete.)
Arnt Gulbrandsen [Wed, 19 Nov 2008 10:14:46 +0000 (11:14 +0100)]
duplicating state is bad. clean up.
Arnt Gulbrandsen [Wed, 19 Nov 2008 10:12:13 +0000 (11:12 +0100)]
better logging in case a large sparse UID set is used
Arnt Gulbrandsen [Thu, 6 Nov 2008 11:15:39 +0000 (12:15 +0100)]
simpler (faster?) IMAP COPY.
a side effect is that a concurrent expunge could break the COPYUID
response, but not any more.
(Was meant for 3.1, but it's convenient to integrate it here because of
the changes to Mailbox to make it use subtransactions. -- AMS)
Arnt Gulbrandsen [Tue, 18 Nov 2008 15:33:50 +0000 (16:33 +0100)]
try to free up garbage sooner if we're over 2*limit
if limit is 0.... hm?
Arnt Gulbrandsen [Tue, 18 Nov 2008 15:27:37 +0000 (16:27 +0100)]
use mmap() to provide memory if MAP_ANON is available, else malloc.
this might relieve memory stress, by making us able to drop RAM back to
the OS.
Arnt Gulbrandsen [Tue, 18 Nov 2008 14:38:40 +0000 (15:38 +0100)]
notify the owner whenever the fetcher has achieved something.
the owner may be able to use the results, even if other results are
missing still.
Arnt Gulbrandsen [Tue, 18 Nov 2008 14:33:57 +0000 (15:33 +0100)]
try to use really small batches with pg81, to avoid seqscans on header_fields
I know we should be raising some statistics target, but even we aren't
doing that, so...
Arnt Gulbrandsen [Tue, 18 Nov 2008 14:28:11 +0000 (15:28 +0100)]
emit fetch responses sooner (don't wait for the end of the commmand)
helps fight memory blowup
Arnt Gulbrandsen [Tue, 18 Nov 2008 09:53:29 +0000 (10:53 +0100)]
avoid those scary noops.
we'd enqueue the deliveries change n times, even after commit, and log
'delivered' n times too.
Arnt Gulbrandsen [Tue, 18 Nov 2008 09:23:08 +0000 (10:23 +0100)]
rollback in case two processes service the spool at teh same time
Arnt Gulbrandsen [Tue, 18 Nov 2008 09:13:50 +0000 (10:13 +0100)]
the ocd manpage is gone. compile.
Abhijit Menon-Sen [Tue, 18 Nov 2008 03:32:08 +0000 (09:02 +0530)]
Get rid of ocd manpage.
Thanks for pointing it out, Germán.
Arnt Gulbrandsen [Fri, 14 Nov 2008 11:41:38 +0000 (12:41 +0100)]
make store finish its work provided that the session is active when it starts.
earlier, the store would stop working if the imap session closed while
store was working. which shouldn't happen but sometimes clients are
naughty. now, Store picks up a session when execute() is first called, and
uses that until it's done.
it would also be possible to have Store abort cleanly. I think I prefer to
finish.
Arnt Gulbrandsen [Fri, 14 Nov 2008 11:36:07 +0000 (12:36 +0100)]
don't notify the parent's owner when a subtransaction concludes. not our job.
Arnt Gulbrandsen [Fri, 14 Nov 2008 11:35:49 +0000 (12:35 +0100)]
more documentation, more comments, particularly for subtransactions
Arnt Gulbrandsen [Fri, 14 Nov 2008 11:33:43 +0000 (12:33 +0100)]
don't rely on a subtransaction to notify its parent's owner when it concludes.
simplies the code nicely, overall.
3.1 stuff.
Arnt Gulbrandsen [Thu, 13 Nov 2008 15:29:30 +0000 (16:29 +0100)]
unfucked version of previous commit.
don't send '' as an integer if the array is empty
Arnt Gulbrandsen [Thu, 13 Nov 2008 15:20:32 +0000 (16:20 +0100)]
change lock order so that if we lock both mm and mailboxes, we lock mm LAST.
a non-peek fetch may now lock the mailbox, if it retrieves both the modseq
and needs to set \seen. unfortunate, but if we didn't do this, then the
store could lock the mailbox after fetch locks mm, and the sub-fetch used
to report blah could deadlock against this or another fetch. (even against
itself because the store wasn't even a subtransaction until now.)
store is a subtransaction so that a modseq non-peek fetch won't deadlock
against itself via store and the flag update.
store and expunge lock mailboxes before mailbox_messages.
Arnt Gulbrandsen [Thu, 13 Nov 2008 15:18:48 +0000 (16:18 +0100)]
code changed; doc needs to change
Arnt Gulbrandsen [Thu, 13 Nov 2008 12:09:20 +0000 (13:09 +0100)]
unbreak queries that use empty arrays.
(1 is not the only number that's smaller than 2.)
Arnt Gulbrandsen [Thu, 13 Nov 2008 11:43:44 +0000 (12:43 +0100)]
exit dead code
Arnt Gulbrandsen [Thu, 13 Nov 2008 11:38:27 +0000 (12:38 +0100)]
sometimes the injector is called with zero messages. log that gracefully
and consider everything done.
Arnt Gulbrandsen [Thu, 13 Nov 2008 11:29:45 +0000 (12:29 +0100)]
handle injection of messages with zero bodyparts
Arnt Gulbrandsen [Thu, 13 Nov 2008 10:59:25 +0000 (11:59 +0100)]
all transactions must have owners.
the rule has to apply to subtransactions, because we assume it to be true
and I don't care to look for the code that assumes so. easier to make the
rule hole.
Abhijit Menon-Sen [Thu, 13 Nov 2008 10:10:34 +0000 (15:40 +0530)]
Update VERSION.
Arnt Gulbrandsen [Wed, 12 Nov 2008 15:28:08 +0000 (16:28 +0100)]
make memory-limit apply to archiveopteryx only
tlsproxy and logd collect memory down to zero anyway
Arnt Gulbrandsen [Wed, 12 Nov 2008 15:16:02 +0000 (16:16 +0100)]
debug logging to catch possible problems wrt. large unflushed data
Arnt Gulbrandsen [Wed, 12 Nov 2008 14:42:31 +0000 (15:42 +0100)]
collect garbage only if discarding the cache makes sense.
garbage allocation is slow if the result set is large. so let's just not
collect garbage unless we'll the cache.
Arnt Gulbrandsen [Wed, 12 Nov 2008 08:01:46 +0000 (09:01 +0100)]
build on linux/ppc
tested by aox@visteya.net; must ask for retesting
Arnt Gulbrandsen [Tue, 11 Nov 2008 14:11:08 +0000 (15:11 +0100)]
report on what's done. number of messages, mailbox.
Arnt Gulbrandsen [Tue, 11 Nov 2008 13:57:12 +0000 (14:57 +0100)]
aox undelete misused generate_series. use a sequence instead.
this works.
Arnt Gulbrandsen [Tue, 11 Nov 2008 13:42:12 +0000 (14:42 +0100)]
log the die()
suse the Log ID that's in scope when die() is called; that'll probably be
the right one.
doesn't log die( Memory ) since that's often called within Allocator, so
we may not be able to allocate any memory for logging.
Arnt Gulbrandsen [Tue, 11 Nov 2008 13:31:31 +0000 (14:31 +0100)]
messageset doesn't benefit from that sorting any more, so don't bother
Arnt Gulbrandsen [Tue, 11 Nov 2008 11:53:51 +0000 (12:53 +0100)]
debug logging away again
Arnt Gulbrandsen [Tue, 11 Nov 2008 11:51:53 +0000 (12:51 +0100)]
if we log a client out, we tell it NO, but the commands it has sent aren't
all that BAD.
Arnt Gulbrandsen [Tue, 11 Nov 2008 11:43:26 +0000 (12:43 +0100)]
better error messages in case an IMAP command isn't permitted due to the
IMAP state.
if the old message could confuse us, it could confuse anyone.
Arnt Gulbrandsen [Tue, 11 Nov 2008 11:13:48 +0000 (12:13 +0100)]
make Transaction::execute() fail all queries if it can't.
the most common case would be if the parent has already been committed or
rolled back.
Abhijit Menon-Sen [Tue, 11 Nov 2008 11:01:56 +0000 (16:31 +0530)]
udoc fix.
Arnt Gulbrandsen [Tue, 11 Nov 2008 10:48:12 +0000 (11:48 +0100)]
ask the db whether we're blocked instead of maintaining duplicate state
make rollback() work for subtransactions (the release savepoint wasn't sent)
Arnt Gulbrandsen [Mon, 10 Nov 2008 14:39:49 +0000 (15:39 +0100)]
avoid casting pointers to int, it has bad karma
Arnt Gulbrandsen [Mon, 10 Nov 2008 14:13:23 +0000 (15:13 +0100)]
the merge didn't know that I had just removed idCache
Abhijit Menon-Sen [Mon, 10 Nov 2008 13:36:54 +0000 (19:06 +0530)]
Another idate.
But is this the only problem?
Arnt Gulbrandsen [Mon, 10 Nov 2008 13:17:49 +0000 (14:17 +0100)]
make PreparedStatement not be freed.
as of this change, it's no longer necessary to addEternal every single
PreparedStatement.
Arnt Gulbrandsen [Mon, 10 Nov 2008 13:10:54 +0000 (14:10 +0100)]
drop the addresscache map from id. it's not used.
also simplify some code; there isn't any point to avoiding those pointers
since we'll drop the cache when we drop those buffers.
Arnt Gulbrandsen [Mon, 10 Nov 2008 11:54:41 +0000 (12:54 +0100)]
get rid of the address cache when we run up against the memory limit.
this makes addresses behave like messages.
Abhijit Menon-Sen [Sun, 9 Nov 2008 02:50:49 +0000 (08:20 +0530)]
Another arrays vs. Postgres 8.1 hack.
If we use =any($x) where $x is bound to a single-element array, we
rewrite both query and parameter so that we can use =$x instead.
QV::position() changes type to avoid comparison warnings.
Untested.
Arnt Gulbrandsen [Sat, 8 Nov 2008 23:09:22 +0000 (00:09 +0100)]
I wish it weren't true
Arnt Gulbrandsen [Sat, 8 Nov 2008 10:55:34 +0000 (11:55 +0100)]
support duplicate message ids in one mailbox
(a message copied twice into one mailbox, both copies fetched with one
fetch)
Arnt Gulbrandsen [Fri, 7 Nov 2008 21:10:22 +0000 (22:10 +0100)]
was broken for really large sets (e.g. value=100000, i=20000)
Arnt Gulbrandsen [Fri, 7 Nov 2008 20:43:00 +0000 (21:43 +0100)]
make forwarding submitted mail to the smarthost work