user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 2/2] v2writable: index_sync adds new epochs to alternates
  2019-03-08 22:52  5% [PATCH 0/2] make "public-inbox-index" friendlier to clone mirrors Eric Wong
@ 2019-03-08 22:52  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2019-03-08 22:52 UTC (permalink / raw)
  To: meta

Newly-cloned epochs need to be in alternates file of
all.git for the web and NNTP interfaces to work.  So
allow invocations of "public-inbox-index" to idempotently
ensure the epoch is visible from the all.git repo.
---
 lib/PublicInbox/V2Writable.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm
index bc31ffa..6829a34 100644
--- a/lib/PublicInbox/V2Writable.pm
+++ b/lib/PublicInbox/V2Writable.pm
@@ -941,6 +941,7 @@ sub index_sync {
 		my $git_dir = git_dir_n($self, $i);
 		die "already reindexing!\n" if delete $self->{reindex_pipe};
 		-d $git_dir or next; # missing parts are fine
+		fill_alternates($self, $i);
 		my $git = PublicInbox::Git->new($git_dir);
 		my $unindex = delete $self->{"unindex-range.$i"};
 		$self->unindex($opts, $git, $unindex) if $unindex;
-- 
EW


^ permalink raw reply related	[relevance 7%]

* [PATCH 0/2] make "public-inbox-index" friendlier to clone mirrors
@ 2019-03-08 22:52  5% Eric Wong
  2019-03-08 22:52  7% ` [PATCH 2/2] v2writable: index_sync adds new epochs to alternates Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2019-03-08 22:52 UTC (permalink / raw)
  To: meta

While I remembered to clone the 7.git epoch of LKML and
run "public-inbox-index"; new messages were inaccessible
via read-only PSGI and NNTP interfaces since I forgot to
add the new epoch to $INBOX_DIR/all.git/objects/info/alternates.

Eric Wong (2):
      v2writable: hoist out fill_alternates
      v2writable: index_sync adds new epochs to alternates

 lib/PublicInbox/V2Writable.pm | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)



^ permalink raw reply	[relevance 5%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2019-03-08 22:52  5% [PATCH 0/2] make "public-inbox-index" friendlier to clone mirrors Eric Wong
2019-03-08 22:52  7% ` [PATCH 2/2] v2writable: index_sync adds new epochs to alternates Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).