Setting $self->{oidx} via `//=' may be unsafe due to
->lock_for_scope setting $self->{lock_fh}. While this is not
known to cause problems at the moment, it may be problematic in
future as we've had to deal with subtle bugs in similar code in
the past.
sub prepare_dedupe {
my ($self) = @_;
- $self->{oidx} //= do {
+ $self->{oidx} // do {
my $creat = !-f $self->{-ovf};
my $lk = $self->lock_for_scope; # git-config doesn't wait
my $oidx = PublicInbox::OverIdx->new($self->{-ovf});
$oidx->{journal_mode} = 'WAL';
$oidx->dbh;
$oidx->eidx_prep if $creat; # for xref3
- $oidx
+ $self->{oidx} = $oidx
};
}