about summary refs log tree commit homepage
path: root/lib/PublicInbox/Inbox.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-07-14 02:14:31 +0000
committerEric Wong <e@yhbt.net>2020-07-14 23:22:59 +0000
commit322a79a6421b5993775f63ea25294a97c5203ac0 (patch)
tree32e94eb9dafead35e830fee28cb90d3bc43ec7c4 /lib/PublicInbox/Inbox.pm
parente9fc1290ead44e06d20ff58e0a6acb5306d4fbe2 (diff)
downloadpublic-inbox-322a79a6421b5993775f63ea25294a97c5203ac0.tar.gz
While it's even less common to experience a replaced
msgmap.sqlite3 file, BOFHs may do the darndest things.  This is
another step towards reducing the number of needless wakeups
we need to do in long-lived read-only daemons.
Diffstat (limited to 'lib/PublicInbox/Inbox.pm')
-rw-r--r--lib/PublicInbox/Inbox.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm
index 02186dac..3d9754dc 100644
--- a/lib/PublicInbox/Inbox.pm
+++ b/lib/PublicInbox/Inbox.pm
@@ -31,7 +31,7 @@ sub cleanup_task () {
         for my $ibx (values %$CLEANUP) {
                 my $again;
                 if ($have_devel_peek) {
-                        foreach my $f (qw(mm search)) {
+                        foreach my $f (qw(search)) {
                                 # we bump refcnt by assigning tmp, here:
                                 my $tmp = $ibx->{$f} or next;
                                 next if Devel::Peek::SvREFCNT($tmp) > 2;
@@ -47,7 +47,7 @@ sub cleanup_task () {
                 }
                 check_inodes($ibx);
                 if ($have_devel_peek) {
-                        $again ||= !!($ibx->{mm} || $ibx->{search});
+                        $again ||= !!$ibx->{search};
                 }
                 $next->{"$ibx"} = $ibx if $again;
         }
@@ -182,7 +182,6 @@ sub mm {
         my ($self) = @_;
         $self->{mm} ||= eval {
                 require PublicInbox::Msgmap;
-                _cleanup_later($self);
                 my $dir = $self->{inboxdir};
                 if ($self->version >= 2) {
                         PublicInbox::Msgmap->new_file("$dir/msgmap.sqlite3");
@@ -409,7 +408,7 @@ sub unsubscribe_unlock {
 
 sub check_inodes ($) {
         my ($self) = @_;
-        for (qw(over)) { # TODO: search, mm
+        for (qw(over mm)) { # TODO: search
                 $self->{$_}->check_inodes if $self->{$_};
         }
 }