-# Copyright (C) 2015-2018 all contributors <meta@public-inbox.org>
+# Copyright (C) 2015-2019 all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
# based on notmuch, but with no concept of folders, files or flags
#
my ($class, $ibx, $creat, $shard) = @_;
ref $ibx or die "BUG: expected PublicInbox::Inbox object: $ibx";
my $levels = qr/\A(?:full|medium|basic)\z/;
- my $mainrepo = $ibx->{mainrepo};
+ my $inboxdir = $ibx->{inboxdir};
my $version = $ibx->{version} || 1;
my $indexlevel = 'full';
my $altid = $ibx->{altid};
}
$ibx = PublicInbox::InboxWritable->new($ibx);
my $self = bless {
- mainrepo => $mainrepo,
+ inboxdir => $inboxdir,
-inbox => $ibx,
git => $ibx->git,
-altid => $altid,
}, $class;
$ibx->umask_prepare;
if ($version == 1) {
- $self->{lock_path} = "$mainrepo/ssoma.lock";
+ $self->{lock_path} = "$inboxdir/ssoma.lock";
my $dir = $self->xdir;
$self->{over} = PublicInbox::OverIdx->new("$dir/over.sqlite3");
} elsif ($version == 2) {
die "BUG: _msgmap_init is only for v1\n" if $self->{version} != 1;
$self->{mm} ||= eval {
require PublicInbox::Msgmap;
- PublicInbox::Msgmap->new($self->{mainrepo}, 1);
+ PublicInbox::Msgmap->new($self->{inboxdir}, 1);
};
}
sub remote_remove {
my ($self, $oid, $mid) = @_;
if (my $w = $self->{w}) {
- # triggers remove_by_oid in a partition
+ # triggers remove_by_oid in a shard
print $w "D $oid $mid\n" or die "failed to write remove $!";
} else {
$self->begin_txn_lazy;