aox:aox.git
13 years agoDon't forget to reset the revision after downgrading. v3.1.0
Abhijit Menon-Sen [Mon, 30 Mar 2009 13:06:34 +0000 (18:36 +0530)]
Don't forget to reset the revision after downgrading.

13 years agoFix mis-escaped backslash.
Abhijit Menon-Sen [Mon, 30 Mar 2009 12:55:00 +0000 (18:25 +0530)]
Fix mis-escaped backslash.

13 years agoI saw a segfault when log() was called really early
Arnt Gulbrandsen [Fri, 27 Mar 2009 11:15:52 +0000 (12:15 +0100)]
I saw a segfault when log() was called really early

13 years agoUpdate version.
Abhijit Menon-Sen [Thu, 26 Mar 2009 17:37:33 +0000 (23:07 +0530)]
Update version.

13 years agohandle "c-t-e: %random%" acceptably
Arnt Gulbrandsen [Thu, 26 Mar 2009 16:21:10 +0000 (17:21 +0100)]
handle "c-t-e: %random%" acceptably

13 years agoparsing a header used to be O(n^2) where n is the number of fields.
Arnt Gulbrandsen [Thu, 26 Mar 2009 15:20:27 +0000 (16:20 +0100)]
parsing a header used to be O(n^2) where n is the number of fields.

some spammer sent 15,000 header fields, which was a major pain for us.

13 years agouse ++i instead of i++ with iterators
Arnt Gulbrandsen [Thu, 26 Mar 2009 14:52:18 +0000 (15:52 +0100)]
use ++i instead of i++ with iterators

postfix ++ is a lot slower and it shows up on the call graph too often

13 years agoold code was O(n^something) where n is the number of addresses. better O now.
Arnt Gulbrandsen [Thu, 26 Mar 2009 14:44:18 +0000 (15:44 +0100)]
old code was O(n^something) where n is the number of addresses. better O now.

13 years agoMerge branch 'master' of ssh://down/oryx/aox
Arnt Gulbrandsen [Thu, 26 Mar 2009 12:03:46 +0000 (13:03 +0100)]
Merge branch 'master' of ssh://down/oryx/aox

13 years agoUpdate to #87.
Abhijit Menon-Sen [Thu, 26 Mar 2009 12:02:47 +0000 (17:32 +0530)]
Update to #87.

13 years agoUpdate current revision.
Abhijit Menon-Sen [Thu, 26 Mar 2009 11:46:38 +0000 (17:16 +0530)]
Update current revision.

13 years agolist aliases too in the "all nouns" list. the user is right.
Arnt Gulbrandsen [Thu, 26 Mar 2009 11:14:19 +0000 (12:14 +0100)]
list aliases too in the "all nouns" list. the user is right.

13 years agolist aliases too in the "all verbs" list
Arnt Gulbrandsen [Thu, 26 Mar 2009 11:10:16 +0000 (12:10 +0100)]
list aliases too in the "all verbs" list

13 years agoCreate non-existent intermediate mailboxes too.
Abhijit Menon-Sen [Thu, 26 Mar 2009 07:55:14 +0000 (13:25 +0530)]
Create non-existent intermediate mailboxes too.

13 years agoSet CreateFoo command verbs to "create", not "add"
Abhijit Menon-Sen [Thu, 26 Mar 2009 07:51:26 +0000 (13:21 +0530)]
Set CreateFoo command verbs to "create", not "add"

Otherwise we translate add to create and look for create and find
nothing.

13 years agoMerge branch 'master' of ssh://down/oryx/aox
Arnt Gulbrandsen [Wed, 25 Mar 2009 13:59:28 +0000 (14:59 +0100)]
Merge branch 'master' of ssh://down/oryx/aox

13 years agoif a query fails, the transaction must cope
Arnt Gulbrandsen [Wed, 25 Mar 2009 13:55:53 +0000 (14:55 +0100)]
if a query fails, the transaction must cope

13 years agoCope with upgrade/downgrade asymmetry a bit better.
Abhijit Menon-Sen [Wed, 25 Mar 2009 13:47:05 +0000 (19:17 +0530)]
Cope with upgrade/downgrade asymmetry a bit better.

(That is, don't complain if stepTo85() is run when some of the functions
already exist.)

13 years agosegfaulting is no good. is this even 3.0.7 stuff?
Arnt Gulbrandsen [Wed, 25 Mar 2009 12:59:43 +0000 (13:59 +0100)]
segfaulting is no good. is this even 3.0.7 stuff?

13 years agopreserve seen and deleted in copy
Arnt Gulbrandsen [Wed, 25 Mar 2009 12:52:25 +0000 (13:52 +0100)]
preserve seen and deleted in copy

has been broken since the move to mailbox_messages

13 years agosort LIST responses by the canonical titlecased name of the mailbox
Arnt Gulbrandsen [Wed, 25 Mar 2009 12:11:56 +0000 (13:11 +0100)]
sort LIST responses by the canonical titlecased name of the mailbox

we used to sort almost like that. lately we haven't really sorted, which
annoys testing.

13 years agoit's not enough to BE ABLE TO take other sessions' data, we need to DO it
Arnt Gulbrandsen [Wed, 25 Mar 2009 10:40:16 +0000 (11:40 +0100)]
it's not enough to BE ABLE TO take other sessions' data, we need to DO it

13 years agodon't endSession() explicitly before beginSession()
Arnt Gulbrandsen [Wed, 25 Mar 2009 09:42:59 +0000 (10:42 +0100)]
don't endSession() explicitly before beginSession()

beginSession() does it automatically, and better (it emits OK CLOSED)

13 years agoMerge branch 'master' of ssh://down/oryx/aox
Arnt Gulbrandsen [Wed, 25 Mar 2009 09:41:57 +0000 (10:41 +0100)]
Merge branch 'master' of ssh://down/oryx/aox

13 years agoexempt commit and rollback from being cancelled.
Arnt Gulbrandsen [Wed, 25 Mar 2009 09:39:36 +0000 (10:39 +0100)]
exempt commit and rollback from being cancelled.

we often issue commit() (and sometimes rollback()) and them immediately
finish. that could be wrong, but there are many cases where we wouldn't
react to a commit failure anyway.

those commits are killed by cancelQueries() if the client goes away very
soon after the command finishes.

13 years agoSchema #87: materialise virtual mailbox nodes.
Abhijit Menon-Sen [Tue, 24 Mar 2009 19:57:31 +0000 (01:27 +0530)]
Schema #87: materialise virtual mailbox nodes.

Seems to work, but there must be more to it.

13 years agospeling
Arnt Gulbrandsen [Tue, 24 Mar 2009 14:56:33 +0000 (15:56 +0100)]
speling

13 years agochange things so Mailbox::setup() is (sometimes) unnecessary
Arnt Gulbrandsen [Tue, 24 Mar 2009 14:56:22 +0000 (15:56 +0100)]
change things so Mailbox::setup() is (sometimes) unnecessary

change NO callers. I started out changing all, but rolled back change
after change. I just want 3.1 to work, prettiments can wait.

13 years agocall "Global" "/" and expect no nulls
Arnt Gulbrandsen [Mon, 23 Mar 2009 15:44:17 +0000 (16:44 +0100)]
call "Global" "/" and expect no nulls

13 years agolovely. that is already done!
Arnt Gulbrandsen [Mon, 23 Mar 2009 15:04:54 +0000 (16:04 +0100)]
lovely. that is already done!

13 years agouse explicit state so we won't happen to send the request twice
Arnt Gulbrandsen [Fri, 20 Mar 2009 14:40:27 +0000 (15:40 +0100)]
use explicit state so we won't happen to send the request twice

why would we do that? no idea but it happens

13 years agofix the tlsproxy race
Arnt Gulbrandsen [Fri, 20 Mar 2009 14:35:07 +0000 (15:35 +0100)]
fix the tlsproxy race

13 years agoa bit of extra debugging to see what happens on vice
Arnt Gulbrandsen [Fri, 20 Mar 2009 13:39:38 +0000 (14:39 +0100)]
a bit of extra debugging to see what happens on vice

13 years agoMerge branch 'master' of ssh://down/oryx/aox
Arnt Gulbrandsen [Fri, 20 Mar 2009 12:52:17 +0000 (13:52 +0100)]
Merge branch 'master' of ssh://down/oryx/aox

13 years agotry to handle segfaults, but as less of a special case
Arnt Gulbrandsen [Fri, 20 Mar 2009 12:51:58 +0000 (13:51 +0100)]
try to handle segfaults, but as less of a special case

13 years agotypo
Arnt Gulbrandsen [Fri, 20 Mar 2009 10:00:51 +0000 (11:00 +0100)]
typo

13 years agodisable TLS as extension, too
Arnt Gulbrandsen [Fri, 20 Mar 2009 09:18:35 +0000 (10:18 +0100)]
disable TLS as extension, too

13 years agowe disable TLS only if we cannot connect to tlsproxy.
Arnt Gulbrandsen [Fri, 20 Mar 2009 09:14:48 +0000 (10:14 +0100)]
we disable TLS only if we cannot connect to tlsproxy.

any other error (e.g. during negotiation) may prompt us to close that
connection, but we still accept TLS-wrapped connections and still
advertise TLS on future connections.

13 years agoomit needless space! omit needless space! omit needless space!
Arnt Gulbrandsen [Fri, 20 Mar 2009 09:06:00 +0000 (10:06 +0100)]
omit needless space! omit needless space! omit needless space!

13 years agonew command: aox flush queue
Arnt Gulbrandsen [Fri, 20 Mar 2009 09:05:35 +0000 (10:05 +0100)]
new command: aox flush queue

13 years agoFix trigger.
Abhijit Menon-Sen [Thu, 19 Mar 2009 16:28:48 +0000 (21:58 +0530)]
Fix trigger.

Damn, I should have noticed this earlier. Revision #87 to fix, or not?

13 years agoSplit 'aox set retention' into 'aox retain/delete mail' commands.
Abhijit Menon-Sen [Thu, 19 Mar 2009 16:24:26 +0000 (21:54 +0530)]
Split 'aox set retention' into 'aox retain/delete mail' commands.

13 years agoMerge branch 'master' of ssh://down/oryx/aox
Arnt Gulbrandsen [Thu, 19 Mar 2009 14:46:38 +0000 (15:46 +0100)]
Merge branch 'master' of ssh://down/oryx/aox

13 years agounbreak '( not flag seen ) and'
Arnt Gulbrandsen [Thu, 19 Mar 2009 14:46:07 +0000 (15:46 +0100)]
unbreak '( not flag seen ) and'

13 years agoMerge branch 'master' of ssh://down.oryx.com/oryx/aox
Arnt Gulbrandsen [Thu, 19 Mar 2009 09:46:32 +0000 (10:46 +0100)]
Merge branch 'master' of ssh://down.oryx.com/oryx/aox

13 years agowe implement 5257
Arnt Gulbrandsen [Thu, 19 Mar 2009 09:46:04 +0000 (10:46 +0100)]
we implement 5257

13 years agoSyntax fixes etc.
Abhijit Menon-Sen [Thu, 19 Mar 2009 05:40:15 +0000 (11:10 +0530)]
Syntax fixes etc.

13 years agoGlobal FIRST
Arnt Gulbrandsen [Thu, 19 Mar 2009 07:27:35 +0000 (08:27 +0100)]
Global FIRST

13 years agoreorder to make the SQL queries easier to read/review
Arnt Gulbrandsen [Wed, 18 Mar 2009 22:30:08 +0000 (23:30 +0100)]
reorder to make the SQL queries easier to read/review

long SQL queries are hard on the eyes and brain

13 years agoreorder Selector clauses to make a nicer SQL query.
Arnt Gulbrandsen [Wed, 18 Mar 2009 22:25:20 +0000 (23:25 +0100)]
reorder Selector clauses to make a nicer SQL query.

I don't line "not ... and ...", it's hard to count parents.
"... and not ..." is better.

13 years agoretention_policies.duration is days, not seconds
Arnt Gulbrandsen [Wed, 18 Mar 2009 22:17:04 +0000 (23:17 +0100)]
retention_policies.duration is days, not seconds

13 years agoaox vacuum now handles mailbox-limited deletes
Arnt Gulbrandsen [Wed, 18 Mar 2009 22:11:07 +0000 (23:11 +0100)]
aox vacuum now handles mailbox-limited deletes

13 years agonow aox vacuum consumes modseqs appropriately
Arnt Gulbrandsen [Wed, 18 Mar 2009 22:04:41 +0000 (23:04 +0100)]
now aox vacuum consumes modseqs appropriately

13 years agomake aox work a little better wrt retention
Arnt Gulbrandsen [Wed, 18 Mar 2009 21:37:44 +0000 (22:37 +0100)]
make aox work a little better wrt retention

13 years agomake aox vacuum enforce 'set retention delete'.
Arnt Gulbrandsen [Wed, 18 Mar 2009 16:09:26 +0000 (17:09 +0100)]
make aox vacuum enforce 'set retention delete'.

13 years agotweak output to be informative and nice
Arnt Gulbrandsen [Wed, 18 Mar 2009 15:39:47 +0000 (16:39 +0100)]
tweak output to be informative and nice

13 years agosql speling
Arnt Gulbrandsen [Wed, 18 Mar 2009 15:35:57 +0000 (16:35 +0100)]
sql speling

13 years agoreparse gave a warning (but worked). kill the warning.
Arnt Gulbrandsen [Wed, 18 Mar 2009 11:01:02 +0000 (12:01 +0100)]
reparse gave a warning (but worked). kill the warning.

13 years agotwo new RFCs; we already implement both
Arnt Gulbrandsen [Wed, 18 Mar 2009 10:08:52 +0000 (11:08 +0100)]
two new RFCs; we already implement both

13 years agobase log IDs on the pid instead of a small integer or nothing.
Arnt Gulbrandsen [Wed, 18 Mar 2009 09:06:28 +0000 (10:06 +0100)]
base log IDs on the pid instead of a small integer or nothing.

if using syslog, the log IDs would be rather redundant. if using logd,
most of the interesting IDs would start with 2/. this change uses the pid
as base, which should make the log more greppable.

good in general and particularly when starting from the deleted_messages
table.

13 years agosql speling
Arnt Gulbrandsen [Tue, 17 Mar 2009 17:10:40 +0000 (18:10 +0100)]
sql speling

13 years agostop using prepared statements
Arnt Gulbrandsen [Tue, 17 Mar 2009 15:47:44 +0000 (16:47 +0100)]
stop using prepared statements

we do want to use them, but they have to be dynamically chosen by postgres
at the time we send queries

13 years agodon't rewrite a prepared statement based on the values from any single use
Arnt Gulbrandsen [Tue, 17 Mar 2009 15:42:33 +0000 (16:42 +0100)]
don't rewrite a prepared statement based on the values from any single use

13 years agodon't delete things to which pointers may still exist
Arnt Gulbrandsen [Tue, 17 Mar 2009 15:26:07 +0000 (16:26 +0100)]
don't delete things to which pointers may still exist

13 years agoomit needless state
Arnt Gulbrandsen [Tue, 17 Mar 2009 15:12:25 +0000 (16:12 +0100)]
omit needless state

13 years agosa_restorer isn't there on most OSes and we don't use it, so...
Arnt Gulbrandsen [Tue, 17 Mar 2009 14:47:40 +0000 (15:47 +0100)]
sa_restorer isn't there on most OSes and we don't use it, so...

13 years agodon't specify logfile and logfile-mode in the default config file
Arnt Gulbrandsen [Tue, 17 Mar 2009 14:40:18 +0000 (15:40 +0100)]
don't specify logfile and logfile-mode in the default config file

they aren't something people really should consider changing, so why
should they be in the privileged 15% of settings that we add there?

13 years agouse syslog by default and start logd only if needed
Arnt Gulbrandsen [Tue, 17 Mar 2009 14:38:15 +0000 (15:38 +0100)]
use syslog by default and start logd only if needed

13 years agomake 'set retention' delete older policies that conflict with the new one
Arnt Gulbrandsen [Tue, 17 Mar 2009 11:56:38 +0000 (12:56 +0100)]
make 'set retention' delete older policies that conflict with the new one

13 years agoif the root mailbox is materialised in the db, then ask for its policies
Arnt Gulbrandsen [Tue, 17 Mar 2009 11:37:35 +0000 (12:37 +0100)]
if the root mailbox is materialised in the db, then ask for its policies
explicitly

should not matter

13 years agoorder the results of 'show retention'
Arnt Gulbrandsen [Tue, 17 Mar 2009 11:31:21 +0000 (12:31 +0100)]
order the results of 'show retention'

this is partly just sense and partly testability

sense: we want to show the policies ordered from the global to the
specific, and I think it's good if retain vs. delete is shown in a
predictable order.

testability: it's easier to test if the response is 100% predictable.

13 years agoshow the retention policies in a sane format
Arnt Gulbrandsen [Tue, 17 Mar 2009 11:22:52 +0000 (12:22 +0100)]
show the retention policies in a sane format

untested

13 years agoMerge branch 'master' of ssh://down/oryx/aox
Arnt Gulbrandsen [Tue, 17 Mar 2009 11:11:41 +0000 (12:11 +0100)]
Merge branch 'master' of ssh://down/oryx/aox

13 years agouse sigaction instead of signal
Arnt Gulbrandsen [Tue, 17 Mar 2009 11:08:47 +0000 (12:08 +0100)]
use sigaction instead of signal

explicitly say that we want the signal more than once

13 years agotry to close a connection and go in case of segfaults
Arnt Gulbrandsen [Tue, 17 Mar 2009 10:40:45 +0000 (11:40 +0100)]
try to close a connection and go in case of segfaults

this is not entirely satisfactory. if we find a connection, fine. if we
don't, what then? also we must change to sigaction().

13 years agoa little bit of sanity... this should't happen any more, but I want to see
Arnt Gulbrandsen [Tue, 17 Mar 2009 10:05:36 +0000 (11:05 +0100)]
a little bit of sanity... this should't happen any more, but I want to see
it in the logs if it does.

13 years agothe views we want
Arnt Gulbrandsen [Tue, 17 Mar 2009 10:03:51 +0000 (11:03 +0100)]
the views we want

13 years agoSchedule update.
Abhijit Menon-Sen [Mon, 16 Mar 2009 16:20:00 +0000 (21:50 +0530)]
Schedule update.

13 years agoMerge branch 'master' of ssh://down.oryx.com/oryx/aox
Arnt Gulbrandsen [Mon, 16 Mar 2009 15:54:59 +0000 (16:54 +0100)]
Merge branch 'master' of ssh://down.oryx.com/oryx/aox

13 years agoBuffer::removeLine() returns the same code in two _different_ cases
Arnt Gulbrandsen [Mon, 16 Mar 2009 15:53:37 +0000 (16:53 +0100)]
Buffer::removeLine() returns the same code in two _different_ cases

some callers don't mind
two callers mind, and already disambiguate
two callers mind, but didn't disambiguate until now

3.0.7 stuff

13 years agoMerge branch 'master' of ssh://down/oryx/aox
Arnt Gulbrandsen [Mon, 16 Mar 2009 13:09:35 +0000 (14:09 +0100)]
Merge branch 'master' of ssh://down/oryx/aox

13 years agoImplement aox show retention.
Abhijit Menon-Sen [Mon, 16 Mar 2009 12:56:40 +0000 (18:26 +0530)]
Implement aox show retention.

13 years agoAdd a UStringList Query::bind().
Abhijit Menon-Sen [Mon, 16 Mar 2009 12:56:24 +0000 (18:26 +0530)]
Add a UStringList Query::bind().

13 years agouse fewer IDs in case of conflict, and domains are case-insensitive
Arnt Gulbrandsen [Mon, 16 Mar 2009 12:38:05 +0000 (13:38 +0100)]
use fewer IDs in case of conflict, and domains are case-insensitive

13 years agocount messages with a big-enough integer. 1 bit won't cut it.
Arnt Gulbrandsen [Mon, 16 Mar 2009 12:17:32 +0000 (13:17 +0100)]
count messages with a big-enough integer. 1 bit won't cut it.

13 years agohave aoximport try to aim to use [x/2,x] megs, where x is memory-limit
Arnt Gulbrandsen [Mon, 16 Mar 2009 12:04:59 +0000 (13:04 +0100)]
have aoximport try to aim to use [x/2,x] megs, where x is memory-limit

13 years agoif the server supplies error detail, when we use it when we tell the query
Arnt Gulbrandsen [Mon, 16 Mar 2009 12:04:33 +0000 (13:04 +0100)]
if the server supplies error detail, when we use it when we tell the query
what went wrong.

13 years agoa little more logging to help debugging
Arnt Gulbrandsen [Mon, 16 Mar 2009 11:47:13 +0000 (12:47 +0100)]
a little more logging to help debugging

13 years agosimpler progress reporting, hopefully better
Arnt Gulbrandsen [Mon, 16 Mar 2009 10:49:15 +0000 (11:49 +0100)]
simpler progress reporting, hopefully better

13 years agomore speed less cleverness
Arnt Gulbrandsen [Mon, 16 Mar 2009 10:38:56 +0000 (11:38 +0100)]
more speed less cleverness

process one mailbox at a time instead of four. the multimessage injector
makes that four-mailbox stuff obsolete. we're better off creating one
really big injection.

13 years agonotify the parent transaction's owner when a child completes
Arnt Gulbrandsen [Mon, 16 Mar 2009 10:38:03 +0000 (11:38 +0100)]
notify the parent transaction's owner when a child completes

usually what we need to do is service the parent's queue, but sometimes
there isn't any queue, instead, the parent's owner is waiting to issue
another query.

13 years agoallow the application to ask about the current GC limit
Arnt Gulbrandsen [Mon, 16 Mar 2009 10:37:03 +0000 (11:37 +0100)]
allow the application to ask about the current GC limit

13 years agouse a temptable rather than long queries if we need to insert >30 addresses
Arnt Gulbrandsen [Mon, 16 Mar 2009 10:36:10 +0000 (11:36 +0100)]
use a temptable rather than long queries if we need to insert >30 addresses

the long queries were a bit of a pain when inserting three- or four-digit
number of addresses.

13 years agomake injector create mailboxes
Arnt Gulbrandsen [Fri, 13 Mar 2009 15:13:53 +0000 (16:13 +0100)]
make injector create mailboxes

that is, if told to inject in something that doesn't exist. easier than
doing the same thing in aoximport and making the two state machines happy
with each other.

13 years agoteach Address to cache IDs to the greatest reasonable degree
Arnt Gulbrandsen [Fri, 13 Mar 2009 15:13:08 +0000 (16:13 +0100)]
teach Address to cache IDs to the greatest reasonable degree

aoximport spends most of its time looking up addresses rows. that has to
change. this should do it.

13 years agoretry the entire transaction once if the injector fails.
Arnt Gulbrandsen [Fri, 13 Mar 2009 11:16:29 +0000 (12:16 +0100)]
retry the entire transaction once if the injector fails.

the injector sometimes fails because pg shuts down, so it makes sense to
try the whole thing again. but only once. don't want an expensive loop in
case of injector bugs.

13 years agomake sure any created mailboxes are visible to the injector
Arnt Gulbrandsen [Fri, 13 Mar 2009 11:15:59 +0000 (12:15 +0100)]
make sure any created mailboxes are visible to the injector

otherwise, a cache effect could result in an injector crash

13 years agouse the owner's own scope
Arnt Gulbrandsen [Fri, 13 Mar 2009 10:16:43 +0000 (11:16 +0100)]
use the owner's own scope

13 years agolet's not shut down the server just because a mailbox is very big
Arnt Gulbrandsen [Fri, 13 Mar 2009 10:04:12 +0000 (11:04 +0100)]
let's not shut down the server just because a mailbox is very big

13 years agouse a single query to lock all mailboxes
Arnt Gulbrandsen [Fri, 13 Mar 2009 09:49:47 +0000 (10:49 +0100)]
use a single query to lock all mailboxes

use order by to get the lock order