about summary refs log tree commit homepage
path: root/lib/PublicInbox/V2Writable.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-10-27 07:54:28 +0000
committerEric Wong <e@80x24.org>2020-11-07 10:19:02 +0000
commit50c4fa0c8254366e0a83e237aca0c992fe669478 (patch)
tree15831ab02005e158bda2f715c7efa2f8e42817ad /lib/PublicInbox/V2Writable.pm
parent0e8186eb863daf05e71c35549aaff890b4709c65 (diff)
downloadpublic-inbox-50c4fa0c8254366e0a83e237aca0c992fe669478.tar.gz
This will make it easier to reuse some indexing code for ExtSearchIdx.
Diffstat (limited to 'lib/PublicInbox/V2Writable.pm')
-rw-r--r--lib/PublicInbox/V2Writable.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm
index c0306e82..3d3c25ec 100644
--- a/lib/PublicInbox/V2Writable.pm
+++ b/lib/PublicInbox/V2Writable.pm
@@ -882,7 +882,7 @@ sub index_oid { # cat_async callback
         my $eml = PublicInbox::Eml->new($$bref);
         my $mids = mids($eml);
         my $chash = content_hash($eml);
-        my $self = $arg->{v2w};
+        my $self = $arg->{self};
 
         if (scalar(@$mids) == 0) {
                 warn "E: $oid has no Message-ID, skipping\n";
@@ -1065,7 +1065,7 @@ sub sync_prepare ($$) {
         # our code and blindly injects "d" file history into git repos
         if (my @leftovers = keys %{delete($sync->{D}) // {}}) {
                 warn('W: unindexing '.scalar(@leftovers)." leftovers\n");
-                my $arg = { v2w => $self };
+                my $arg = { self => $self };
                 my $unindex_oid = $self->can('unindex_oid');
                 for my $oid (@leftovers) {
                         $oid = unpack('H*', $oid);
@@ -1099,7 +1099,7 @@ sub unindex_oid_aux ($$$) {
 
 sub unindex_oid ($$;$) { # git->cat_async callback
         my ($bref, $oid, $type, $size, $sync) = @_;
-        my $self = $sync->{v2w};
+        my $self = $sync->{self};
         my $unindexed = $sync->{in_unindex} ? $sync->{unindexed} : undef;
         my $mm = $self->{mm};
         my $mids = mids(PublicInbox::Eml->new($bref));
@@ -1172,7 +1172,7 @@ sub sync_ranges ($$) {
 
 sub index_xap_only { # git->cat_async callback
         my ($bref, $oid, $type, $size, $smsg) = @_;
-        my $self = $smsg->{v2w};
+        my $self = $smsg->{self};
         my $idx = idx_shard($self, $smsg->{num});
         $smsg->{raw_bytes} = $size;
         $idx->index_raw($bref, undef, $smsg);
@@ -1192,7 +1192,7 @@ sub index_xap_step ($$$;$) {
         }
         for (my $num = $beg; $num <= $end; $num += $step) {
                 my $smsg = $ibx->over->get_art($num) or next;
-                $smsg->{v2w} = $self;
+                $smsg->{self} = $self;
                 $ibx->git->cat_async($smsg->{blob}, \&index_xap_only, $smsg);
                 if ($self->{transact_bytes} >= $self->{batch_bytes}) {
                         ${$sync->{nr}} = $num;
@@ -1245,7 +1245,7 @@ sub xapian_only {
                 $sync //= {
                         need_checkpoint => \(my $bool = 0),
                         -opt => $opt,
-                        v2w => $self,
+                        self => $self,
                         nr => \(my $nr = 0),
                         -regen_fmt => "%u/?\n",
                 };
@@ -1290,7 +1290,7 @@ sub index_sync {
                 unindex_range => {}, # EPOCH => oid_old..oid_new
                 reindex => $opt->{reindex},
                 -opt => $opt,
-                v2w => $self,
+                self => $self,
                 ibx => $self->{ibx},
                 epoch_max => $epoch_max,
         };