user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: meta@public-inbox.org
Subject: Re: [PATCH] SearchIdx: Decrement regen_down even for added messages that are later deleted.
Date: Wed, 18 Jul 2018 10:15:31 +0000	[thread overview]
Message-ID: <20180718101531.4abxuxjtv7kmqrk3@whir> (raw)
In-Reply-To: <87wottjz52.fsf@xmission.com>

"Eric W. Biederman" <ebiederm@xmission.com> wrote:
> Decrement regen_down when visiting messages that appear in %D that we
> know will later be deleted.  This ensures consistent message numbers are
> generated no matter which commit number is on top.  Allowing deletes to
> propagage separately from the messages they delete without causing
> problems.

Thanks!  I completely forgot I did regen_down for
017fed7bc4d33ac474a19356994be5bd0bfe68ba

> The v2 trees already do this and when the indexes are deleted and
> rebuilt they maintain they commit numbers.
> 
> Add a v1 version of the v2reindex test to verify that reindexing is
> working properly on v1 as well as v2.

I noticed a few minor nits in the test, so I will squash the
following in to quiet down git-init and ensure warnings are
tested:

diff --git a/t/v1reindex.t b/t/v1reindex.t
index 7b8d883..0df36d3 100644
--- a/t/v1reindex.t
+++ b/t/v1reindex.t
@@ -15,7 +15,7 @@ foreach my $mod (qw(DBD::SQLite Search::Xapian)) {
 use_ok 'PublicInbox::SearchIdx';
 use_ok 'PublicInbox::Import';
 my $mainrepo = tempdir('pi-v1reindex-XXXXXX', TMPDIR => 1, CLEANUP => 1);
-is(system(qw(git init --bare), $mainrepo), 0);
+is(system(qw(git init -q --bare), $mainrepo), 0);
 my $ibx_config = {
 	mainrepo => $mainrepo,
 	name => 'test-v1reindex',
@@ -79,7 +79,7 @@ $rw = PublicInbox::SearchIdx->new($ibx, 1);
 ok(!-d $xap, 'Xapian directories removed again');
 {
 	my @warn;
-	#local $SIG{__WARN__} = sub { push @warn, @_ };
+	local $SIG{__WARN__} = sub { push @warn, @_ };
 	eval { $rw->index_sync({reindex => 1}) };
 	is($@, '', 'no error from reindexing without msgmap');
 	is(scalar(@warn), 0, 'no warnings from reindexing');

      reply	other threads:[~2018-07-18 10:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-17 22:06 [PATCH] SearchIdx: Decrement regen_down even for added messages that are later deleted Eric W. Biederman
2018-07-18 10:15 ` Eric Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180718101531.4abxuxjtv7kmqrk3@whir \
    --to=e@80x24.org \
    --cc=ebiederm@xmission.com \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).