From 5e8be4aa1e6adb321e2b85f8f96ad1e2646c093a Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Thu, 5 Apr 2018 21:45:25 +0000 Subject: v2writable: allow tracking parallel versions For upgrades, this will let users keep an old version running while performing "public-inbox-index" on the newest version. --- lib/PublicInbox/Msgmap.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/PublicInbox/Msgmap.pm') 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 { -- cgit v1.2.3-24-ge0c7