aox:aox.git
13 years agoUpdate VERSION. v3.0.6
Abhijit Menon-Sen [Thu, 29 Jan 2009 09:59:52 +0000 (15:29 +0530)]
Update VERSION.

13 years agoRevert "Revert "Revert "s/String::append( fn( ... ) )/appendNumber( ... )"""
Abhijit Menon-Sen [Mon, 26 Jan 2009 13:11:10 +0000 (18:41 +0530)]
Revert "Revert "Revert "s/String::append( fn( ... ) )/appendNumber( ... )"""

I cherry-picked a commit, reverted it, then reverted the reversion. Now
I'm reverting the reversion of the reversion, because I don't want the
original commit.

This reverts commit 46d183ff9e54e478ab5629816cbd3839529798ce.

13 years agoRevert "Revert "s/String::append( fn( ... ) )/appendNumber( ... )""
Abhijit Menon-Sen [Mon, 26 Jan 2009 13:07:37 +0000 (18:37 +0530)]
Revert "Revert "s/String::append( fn( ... ) )/appendNumber( ... )""

Not a bugfix, and doesn't pull enough weight to justify its inclusion.

This reverts commit d6b58a8acd7857754b9e6ae2889d5e53bdd0d765.

13 years agoRevert "new function to check whether this Log is a child (or granchild) of that"
Abhijit Menon-Sen [Mon, 26 Jan 2009 13:05:17 +0000 (18:35 +0530)]
Revert "new function to check whether this Log is a child (or granchild) of that"

Not needed in 3.0.x (because the cancel changes that depend on it aren't
going in either).

This reverts commit 4fbc9d7fc9b4af2adebb7aafd8faa314182019a7.

13 years agoRevert "s/String::append( fn( ... ) )/appendNumber( ... )"
Abhijit Menon-Sen [Mon, 26 Jan 2009 13:03:20 +0000 (18:33 +0530)]
Revert "s/String::append( fn( ... ) )/appendNumber( ... )"

It's not a bugfix.

This reverts commit 41eebd0c98a201accbf51d2bab4b919cd09d7740.

13 years agos/String::append( fn( ... ) )/appendNumber( ... )
Arnt Gulbrandsen [Wed, 14 Jan 2009 10:50:54 +0000 (11:50 +0100)]
s/String::append( fn( ... ) )/appendNumber( ... )

saves RAM, and some of these calls happen often

13 years agoAdd 'on delete cascade' to t_i.message.
Abhijit Menon-Sen [Sat, 24 Jan 2009 15:15:43 +0000 (20:45 +0530)]
Add 'on delete cascade' to t_i.message.

Otherwise vacuuming fails, as reported by Sam Homer.

13 years agoSchema #79: Add thread_indexes to help unfuck Outlook threading.
Abhijit Menon-Sen [Mon, 8 Dec 2008 15:30:18 +0000 (21:00 +0530)]
Schema #79: Add thread_indexes to help unfuck Outlook threading.

13 years agonew function to check whether this Log is a child (or granchild) of that
Arnt Gulbrandsen [Thu, 22 Jan 2009 12:58:59 +0000 (13:58 +0100)]
new function to check whether this Log is a child (or granchild) of that

untested

13 years agodon't wipe out the AddressField's addresses() when the parser dies
Arnt Gulbrandsen [Thu, 22 Jan 2009 11:59:27 +0000 (12:59 +0100)]
don't wipe out the AddressField's addresses() when the parser dies

3.0.6 material

13 years agouse madvise() to release RAM to the OS if possible
Arnt Gulbrandsen [Wed, 21 Jan 2009 15:44:03 +0000 (16:44 +0100)]
use madvise() to release RAM to the OS if possible

this should cut down the amount of actual RAM archiveopteryx uses

13 years agodo NOT rename variables after testing
Arnt Gulbrandsen [Mon, 19 Jan 2009 14:06:30 +0000 (15:06 +0100)]
do NOT rename variables after testing

13 years agocheck that each Session is connected to a live Connection.
Arnt Gulbrandsen [Mon, 19 Jan 2009 13:42:20 +0000 (14:42 +0100)]
check that each Session is connected to a live Connection.

this should "fix" the horrible memory leak. no idea how, but somehow some
connections managed to close themselves and leave a Session still attached
to its Mailbox.

this change checks that a Session is sane before notifying it of new mail,
so when that bug hits, its effects will be cancelled next time the mailbox
is changed.

13 years agoclose the POP connection if we see an error
Arnt Gulbrandsen [Thu, 15 Jan 2009 19:24:36 +0000 (20:24 +0100)]
close the POP connection if we see an error

13 years agothat log line wasn't all that useful, really
Arnt Gulbrandsen [Thu, 15 Jan 2009 19:16:59 +0000 (20:16 +0100)]
that log line wasn't all that useful, really

13 years agoimprove the logging when connections come and go
Arnt Gulbrandsen [Thu, 15 Jan 2009 19:15:40 +0000 (20:15 +0100)]
improve the logging when connections come and go

13 years agoUpdate rrdglue.
Abhijit Menon-Sen [Tue, 13 Jan 2009 15:20:16 +0000 (20:50 +0530)]
Update rrdglue.

13 years agoavoid leaving zombies
Arnt Gulbrandsen [Tue, 13 Jan 2009 08:47:19 +0000 (09:47 +0100)]
avoid leaving zombies

3.0.6 stuff

13 years agojust a note
Arnt Gulbrandsen [Mon, 12 Jan 2009 13:53:51 +0000 (14:53 +0100)]
just a note

13 years agosome documentation for patriciatree.
Arnt Gulbrandsen [Thu, 8 Jan 2009 13:02:47 +0000 (14:02 +0100)]
some documentation for patriciatree.

the iterator still isn't documented.

13 years agoFix a few comments.
Abhijit Menon-Sen [Thu, 8 Jan 2009 11:28:19 +0000 (16:58 +0530)]
Fix a few comments.

13 years agobasesubject blobchars cannot contain [
Arnt Gulbrandsen [Tue, 6 Jan 2009 14:51:30 +0000 (15:51 +0100)]
basesubject blobchars cannot contain [

this broke threading of doubly-forwarded messages
  [fwd: re: [fwd: re: stuff]]

13 years agoTypo.
Abhijit Menon-Sen [Thu, 18 Dec 2008 07:04:00 +0000 (12:34 +0530)]
Typo.

13 years agodon't log an error if listening on ipv6/any also listens on ipv4/any
Arnt Gulbrandsen [Wed, 17 Dec 2008 09:27:17 +0000 (10:27 +0100)]
don't log an error if listening on ipv6/any also listens on ipv4/any

13 years agounbreak the GC timing code for the nth time (not serious this time though).
Arnt Gulbrandsen [Wed, 10 Dec 2008 15:32:26 +0000 (16:32 +0100)]
unbreak the GC timing code for the nth time (not serious this time though).

this code has needed fixing too many times. it needs to die.

13 years agoocd is long gone.
Abhijit Menon-Sen [Wed, 10 Dec 2008 13:07:15 +0000 (18:37 +0530)]
ocd is long gone.

13 years agoudoc fix.
Abhijit Menon-Sen [Mon, 8 Dec 2008 15:34:00 +0000 (21:04 +0530)]
udoc fix.

13 years agoavoid creating an ImapExpungeResponse if we already have one for that UID.
Arnt Gulbrandsen [Fri, 5 Dec 2008 11:28:18 +0000 (12:28 +0100)]
avoid creating an ImapExpungeResponse if we already have one for that UID.

helps avoid spurious "no MSN for UID" log errors, which occur when two
expunges occur and the first one cannot be reported to an IMAP client
before the second happens.

13 years agonew debug function to find out what points at a given location.
Arnt Gulbrandsen [Wed, 7 Jan 2009 20:59:14 +0000 (21:59 +0100)]
new debug function to find out what points at a given location.

In gdb
    call pointers( 0x12345678 )
to get some information about all heap-based pointers to that value.

13 years agokeep stderr open unless -f
Arnt Gulbrandsen [Wed, 7 Jan 2009 20:58:56 +0000 (21:58 +0100)]
keep stderr open unless -f

13 years agotypo v3.0.5
Arnt Gulbrandsen [Thu, 4 Dec 2008 15:58:46 +0000 (16:58 +0100)]
typo

13 years agohttp://
Arnt Gulbrandsen [Thu, 4 Dec 2008 15:58:16 +0000 (16:58 +0100)]
http://

13 years agomention where to find more configuration stuff
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.

13 years agoUpdate VERSION.
Abhijit Menon-Sen [Tue, 2 Dec 2008 16:31:25 +0000 (22:01 +0530)]
Update VERSION.

13 years agojust more comments about the state machine
Arnt Gulbrandsen [Tue, 2 Dec 2008 10:09:46 +0000 (11:09 +0100)]
just more comments about the state machine

13 years agoUdoc fix.
Abhijit Menon-Sen [Mon, 1 Dec 2008 19:13:08 +0000 (00:43 +0530)]
Udoc fix.

13 years agodon't leak memory badly
Arnt Gulbrandsen [Mon, 1 Dec 2008 16:49:58 +0000 (17:49 +0100)]
don't leak memory badly

3.0.5, here we come

13 years agoreduce and improve the debug support in Allocator.
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.

13 years agofree some space in the allocator block
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.

13 years agolog the number of objects reachable from each root, if large
Arnt Gulbrandsen [Mon, 1 Dec 2008 13:19:10 +0000 (14:19 +0100)]
log the number of objects reachable from each root, if large

13 years agowe shouldn't change a single quoted string to a single string starting
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)

13 years agoprocess pointers in ascending order
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

13 years agothe old code would misinterpret a full read buffer
Arnt Gulbrandsen [Fri, 28 Nov 2008 13:02:35 +0000 (14:02 +0100)]
the old code would misinterpret a full read buffer

fix

13 years agoMake aox documentation (mostly) agree with its capabilities.
Abhijit Menon-Sen [Thu, 27 Nov 2008 18:16:12 +0000 (23:46 +0530)]
Make aox documentation (mostly) agree with its capabilities.

13 years agogenerally unbreak vacation.
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.

13 years agogive users the ability to insert extra addresses in the database as part
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.

13 years agoteach the injector to work with a subtransaction.
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.

13 years agoDon't segfault.
Abhijit Menon-Sen [Thu, 27 Nov 2008 11:02:48 +0000 (16:32 +0530)]
Don't segfault.

13 years agoRename MessageSet to IntegerSet and use it to avoid "new uint".
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.

13 years agodon't assume there to be annotations
Arnt Gulbrandsen [Wed, 26 Nov 2008 09:26:24 +0000 (10:26 +0100)]
don't assume there to be annotations

13 years agosieve vacation was a tiny little bit broken.
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.

13 years agotrust the Flag cache very little, if at all
Arnt Gulbrandsen [Tue, 25 Nov 2008 15:53:47 +0000 (16:53 +0100)]
trust the Flag cache very little, if at all

13 years agoget rid of AnnotationName.
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.

13 years agomake autoresponses work even when the autoresponses table is empty.
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.

13 years agomake the autoresponses table less of an eyesore for selecting DBAs.
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.

13 years agoit's executable
Arnt Gulbrandsen [Mon, 24 Nov 2008 15:57:20 +0000 (16:57 +0100)]
it's executable

13 years agobe more efficient about mmap()
Arnt Gulbrandsen [Mon, 24 Nov 2008 11:44:36 +0000 (12:44 +0100)]
be more efficient about mmap()

13 years agocollect garbage a little less often, and don't log quite as much.
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.

13 years agoa new byteforwarded which allocates less memory. more or less none.
Arnt Gulbrandsen [Mon, 24 Nov 2008 11:20:16 +0000 (12:20 +0100)]
a new byteforwarded which allocates less memory. more or less none.

13 years agoget rid of FieldName
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)

13 years agoFix typo.
Abhijit Menon-Sen [Sat, 22 Nov 2008 22:31:31 +0000 (04:01 +0530)]
Fix typo.

13 years agomake sure we can collect garbage even if nothing in particular is happening
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

13 years agofree more allocator blocks
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.

13 years agoFix state machine.
Abhijit Menon-Sen [Sat, 22 Nov 2008 14:16:29 +0000 (19:46 +0530)]
Fix state machine.

13 years agoreset peak, and do it so it's reported, too
Arnt Gulbrandsen [Fri, 21 Nov 2008 14:47:21 +0000 (15:47 +0100)]
reset peak, and do it so it's reported, too

13 years agocall reserve() here and there in order to use less RAM
Arnt Gulbrandsen [Fri, 21 Nov 2008 10:10:42 +0000 (11:10 +0100)]
call reserve() here and there in order to use less RAM

13 years agoan easy way to get a breakpoint every time a megabyte is allocated:
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

13 years agotry to get one batch every 15 seconds isntead of every 90
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

13 years agoavoid pgsql warning v3.0.4
Arnt Gulbrandsen [Thu, 20 Nov 2008 14:51:19 +0000 (15:51 +0100)]
avoid pgsql warning

13 years agoIMAP EXAMINE was too broken for squirrelmail. fix.
Arnt Gulbrandsen [Thu, 20 Nov 2008 12:44:50 +0000 (13:44 +0100)]
IMAP EXAMINE was too broken for squirrelmail. fix.

13 years agoFix typo.
Abhijit Menon-Sen [Thu, 20 Nov 2008 11:26:46 +0000 (16:56 +0530)]
Fix typo.

13 years agoplug leak
Arnt Gulbrandsen [Wed, 19 Nov 2008 13:19:43 +0000 (14:19 +0100)]
plug leak

13 years agoIntegrate another line that got missed from master.
Abhijit Menon-Sen [Wed, 19 Nov 2008 13:04:44 +0000 (18:34 +0530)]
Integrate another line that got missed from 

13 years agodot an i.
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.

13 years agosuperclass virtual changed signature; follow the change in subclass
Arnt Gulbrandsen [Wed, 19 Nov 2008 11:41:30 +0000 (12:41 +0100)]
superclass virtual changed signature; follow the change in subclass

13 years agoInternaldate is also trivia.
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.)

13 years agoRemove some debug logging.
Abhijit Menon-Sen [Wed, 19 Nov 2008 11:30:28 +0000 (17:00 +0530)]
Remove some debug logging.

13 years agoRevert "udoc fixes."
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.

13 years agoRevert "code changed; doc needs to change"
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.

13 years agoif we need to send the query, then we need to ask for all the results.
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.)

13 years agoduplicating state is bad. clean up.
Arnt Gulbrandsen [Wed, 19 Nov 2008 10:14:46 +0000 (11:14 +0100)]
duplicating state is bad. clean up.

13 years agobetter logging in case a large sparse UID set is used
Arnt Gulbrandsen [Wed, 19 Nov 2008 10:12:13 +0000 (11:12 +0100)]
better logging in case a large sparse UID set is used

13 years agosimpler (faster?) IMAP COPY.
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)

13 years agotry to free up garbage sooner if we're over 2*limit
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?

13 years agouse mmap() to provide memory if MAP_ANON is available, else malloc.
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.

13 years agonotify the owner whenever the fetcher has achieved something.
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.

13 years agotry to use really small batches with pg81, to avoid seqscans on header_fields
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...

13 years agoemit fetch responses sooner (don't wait for the end of the commmand)
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

13 years agoavoid those scary noops.
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.

13 years agorollback in case two processes service the spool at teh same time
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

13 years agothe ocd manpage is gone. compile.
Arnt Gulbrandsen [Tue, 18 Nov 2008 09:13:50 +0000 (10:13 +0100)]
the ocd manpage is gone. compile.

13 years agoGet rid of ocd manpage.
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.

13 years agomake store finish its work provided that the session is active when it starts.
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.

13 years agodon't notify the parent's owner when a subtransaction concludes. not our job.
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.

13 years agomore documentation, more comments, particularly for subtransactions
Arnt Gulbrandsen [Fri, 14 Nov 2008 11:35:49 +0000 (12:35 +0100)]
more documentation, more comments, particularly for subtransactions

13 years agodon't rely on a subtransaction to notify its parent's owner when it concludes.
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.

13 years agounfucked version of previous commit.
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

13 years agochange lock order so that if we lock both mm and mailboxes, we lock mm LAST.
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.

13 years agocode changed; doc needs to change
Arnt Gulbrandsen [Thu, 13 Nov 2008 15:18:48 +0000 (16:18 +0100)]
code changed; doc needs to change

13 years agounbreak queries that use empty arrays.
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.)