about summary refs log tree commit homepage
path: root/lib/PublicInbox/Msgmap.pm
diff options
context:
space:
mode:
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-04-05 21:45:25 +0000
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-04-06 21:18:34 +0000
commit5e8be4aa1e6adb321e2b85f8f96ad1e2646c093a (patch)
treef448f425b48f380fb675e298f0128517b0cfa416 /lib/PublicInbox/Msgmap.pm
parent79c5fdeacf75a2daeb57a7a5f00a170044e28634 (diff)
downloadpublic-inbox-5e8be4aa1e6adb321e2b85f8f96ad1e2646c093a.tar.gz
For upgrades, this will let users keep an old version
running while performing "public-inbox-index" on the
newest version.
Diffstat (limited to 'lib/PublicInbox/Msgmap.pm')
-rw-r--r--lib/PublicInbox/Msgmap.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/PublicInbox/Msgmap.pm b/lib/PublicInbox/Msgmap.pm
index 5c37e169..f5f88431 100644
--- a/lib/PublicInbox/Msgmap.pm
+++ b/lib/PublicInbox/Msgmap.pm
@@ -92,9 +92,12 @@ sub last_commit {
         $self->meta_accessor('last_commit', $commit);
 }
 
-sub last_commit_n {
-        my ($self, $i, $commit) = @_;
-        $self->meta_accessor('last_commit'.$i, $commit);
+# v2 uses this to keep track of how up-to-date Xapian is
+# old versions may be automatically GC'ed away in the future,
+# but it's a trivial amount of storage.
+sub last_commit_xap {
+        my ($self, $version, $i, $commit) = @_;
+        $self->meta_accessor("last_xap$version-$i", $commit);
 }
 
 sub created_at {