too many deletions => lost messages
Mariano Absatz
mailscanner at LISTS.COM.AR
Mon Nov 3 19:52:39 GMT 2003
El 3 Nov 2003 a las 15:42, Mariano Absatz escribió:
<snip>
> OTOH, the {deleted} attribute of the Message object, depending on where
> it is used means "must be deleted" or "has been deleted".
>
> I'm working with 4.23, but I don't think there were many changes in this
> neighborhood in 4.24 or 4.25...
>
> For what I have seen, it should be pretty easy to make {deleted} mean
> "has to be deleted" and create a new attribute {actuallydeleted} or
> something like that that be set after actual deletion and checked before
> it so we don't double-delete messages.
Attached is a (very raw) patch to 4.23-1 to do this... This _really_
needs testing & embelishment...
>
>
> More analysis seem to show that SMDiskStore::Delete() is never called...
> is this dead code?
Gee... I see this is gone in 4.24... sorry for the noise...
:-)
--
Mariano Absatz
El Baby
----------------------------------------------------------
CChheecckk yyoouurr dduupplleexx sswwiittcchh!!
-------------- next part --------------
--- Message.pm.orig.3110 Mon Nov 3 12:37:11 2003
+++ Message.pm Mon Nov 3 14:51:10 2003
@@ -751,7 +751,10 @@
# Write the new qf file, delete originals and unlock the message
$store->WriteHeader($this, $OutQ);
- $store->DeleteUnlock();
+ unless( $this->{reallydeleted} ) {
+ $store->DeleteUnlock();
+ $this->{reallydeleted} = 1;
+ }
# Note this does not kick the MTA into life here any more
}
@@ -1846,7 +1849,10 @@
# Write the new qf file, delete originals and unlock the message
$store->WriteHeader($this, $OutQ);
- $store->DeleteUnlock();
+ unless( $this->{reallydeleted} ) {
+ $store->DeleteUnlock();
+ $this->{reallydeleted} = 1;
+ }
# Note this does not kick the MTA into life here any more
}
@@ -1871,7 +1877,10 @@
my $entity = $this->{entity};
unless ($entity) {
#print STDERR "Deleting duff message\n";
- $store->DeleteUnlock();
+ unless( $this->{reallydeleted} ) {
+ $store->DeleteUnlock();
+ $this->{reallydeleted} = 1;
+ }
return;
}
@@ -2015,7 +2024,10 @@
# Write the new qf file, delete originals and unlock the message
#print STDERR "Writing the new qf file\n";
$store->WriteHeader($this, $OutQ);
- $store->DeleteUnlock();
+ unless( $this->{reallydeleted} ) {
+ $store->DeleteUnlock();
+ $this->{reallydeleted} = 1;
+ }
# Note this does not kick the MTA into life here any more
}
@@ -2026,9 +2038,11 @@
my $this = shift;
#print STDERR "DeletingMessage " . $this->{id} . "\n";
-
- $this->{store}->DeleteUnlock();
- $this->{deleted} = 1;
+ unless( $this->{reallydeleted} ) {
+ $this->{store}->DeleteUnlock();
+ $this->{deleted} = 1;
+ $this->{reallydeleted} = 1;
+ }
}
More information about the MailScanner
mailing list