unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: "Eric Wong (Contractor, The Linux Foundation)" <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH] v2writable: remove redundant remove from Over DB
Date: Thu, 5 Apr 2018 10:58:27 +0000	[thread overview]
Message-ID: <20180405105827.GA27067@starla> (raw)

The Xapian partitions will trigger the removal anyways.
Test this and fix some description/spelling errors
while we're at it.
---
 lib/PublicInbox/V2Writable.pm | 1 -
 t/v2writable.t                | 6 ++++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm
index 74953d3..671a9b8 100644
--- a/lib/PublicInbox/V2Writable.pm
+++ b/lib/PublicInbox/V2Writable.pm
@@ -295,7 +295,6 @@ sub remove_internal {
 			foreach my $idx (@$parts) {
 				$idx->remote_remove($oid, $mid);
 			}
-			$self->{over}->remove_oid($oid, $mid);
 		}
 		$self->barrier;
 	}
diff --git a/t/v2writable.t b/t/v2writable.t
index e49c06b..ab85e9a 100644
--- a/t/v2writable.t
+++ b/t/v2writable.t
@@ -218,7 +218,7 @@ EOF
 	$im->done;
 	my $tip = shift @after;
 	like($tip, qr/\A[a-f0-9]+ test removal\n\z/s,
-		'commit message propaged to git');
+		'commit message propagated to git');
 	is_deeply(\@after, \@before, 'only one commit written to git');
 	is($ibx->mm->num_for($smsg->mid), undef, 'no longer in Msgmap by mid');
 	like($smsg->num, qr/\A\d+\z/, 'numeric number in return message');
@@ -226,8 +226,10 @@ EOF
 	my $srch = $ibx->search->reopen;
 	my @found = ();
 	$srch->each_smsg_by_mid($smsg->mid, sub { push @found, @_; 1 });
-	is(scalar(@found), 0, 'no longer found in Xapian skeleton');
+	is(scalar(@found), 0, 'no longer found in Xapian');
 	my @log1 = qw(log -1 --pretty=raw --raw -r --no-abbrev --no-renames);
+	is($srch->{over_ro}->get_art($smsg->num), undef,
+		'removal propagated to Over DB');
 
 	my $after = $git0->qx(@log1);
 	if ($after =~ m!( [a-f0-9]+ )A\td$!m) {
-- 
EW


                 reply	other threads:[~2018-04-05 10:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20180405105827.GA27067@starla \
    --to=e@80x24.org \
    --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.
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).