]> Sergey Matveev's repositories - public-inbox.git/commitdiff
Merge branch 'regen'
authorEric Wong <e@80x24.org>
Tue, 22 Oct 2019 07:45:38 +0000 (07:45 +0000)
committerEric Wong <e@80x24.org>
Wed, 23 Oct 2019 18:13:30 +0000 (18:13 +0000)
* regen:
  v2writable: use msgmap as multi_mid queue
  v2writable: move git->cleanup to the correct place
  v2writable: reindex handles 3-headered monsters
  v2writable: improve "num_for" API and disambiguate
  v2writable: set unindexed article number

1  2 
TODO
lib/PublicInbox/OverIdx.pm

diff --combined TODO
index 7eecde08b19f851903e52d71064f95d4132d2ed8,61c44a845ed8268fe998f799f366b492afed1d3e..f9122a5d8e8c8d0cdcc449a9c088851679ab51e8
--- 1/TODO
--- 2/TODO
+++ b/TODO
@@@ -21,9 -21,6 +21,9 @@@ all need to be considered for everythin
    yet storing large amounts of data on computers without a
    public IP behind a home Internet connection.
  
 +* DHT (distributed hash table) for mapping Message-IDs to various
 +  archive locations to avoid SPOF.
 +
  * optional Cache::FastMmap support so production deployments won't
    need Varnish (Varnish doesn't protect NNTP, either)
  
    for coderepos
  
  * configurable diff output for solver-generated blobs
+ * fix search for messages with multiple Subject:/To:/From:/Date:
+   headers (some wacky examples out there...)
index e8df01c4e325d40c3fb9b5c53e4436224d787f87,64277342a15e809f31ac1d12565c8f6d135c3d04..01ca6f1160ffbfb6092b7941d9a4835cf9df26f7
@@@ -320,6 -320,12 +320,6 @@@ INSERT INTO id2num (id, num) VALUES (?,
        }
  }
  
 -sub delete_articles {
 -      my ($self, $nums) = @_;
 -      my $dbh = $self->connect;
 -      $self->delete_by_num($_) foreach @$nums;
 -}
 -
  # returns number of removed messages
  # $oid may be undef to match only on $mid
  sub remove_oid {
        $nr;
  }
  
+ sub num_mid0_for_oid {
+       my ($self, $oid, $mid) = @_;
+       my ($num, $mid0);
+       $self->begin_lazy;
+       each_by_mid($self, $mid, ['ddd'], sub {
+               my ($smsg) = @_;
+               my $blob = $smsg->{blob};
+               return 1 if (!defined($blob) || $blob ne $oid); # continue;
+               ($num, $mid0) = ($smsg->{num}, $smsg->{mid});
+               0; # done
+       });
+       ($num, $mid0);
+ }
  sub create_tables {
        my ($dbh) = @_;