We'll try to reuse as much V2Writable code as possible for
external indices, but the way "last_commit" info is stored
must be different as external indices will deal with last_commit
info for multiple inboxes.
}
# only update last_commit for $i on reindex iff newer than current
}
# only update last_commit for $i on reindex iff newer than current
-sub update_last_commit ($$$$) {
+sub update_last_commit {
my ($self, $git, $i, $cmt) = @_;
my $last = last_epoch_commit($self, $i);
if (defined $last && is_ancestor($git, $last, $cmt)) {
my ($self, $git, $i, $cmt) = @_;
my $last = last_epoch_commit($self, $i);
if (defined $last && is_ancestor($git, $last, $cmt)) {
# reindex stops at the current heads and we later rerun index_sync
# without {reindex}
# reindex stops at the current heads and we later rerun index_sync
# without {reindex}
- my $reindex_heads = last_commits($self, $epoch_max) if $sync->{reindex};
+ my $reindex_heads = $self->last_commits($epoch_max) if $sync->{reindex};
for (my $i = $epoch_max; $i >= 0; $i--) {
my $git_dir = git_dir_n($self, $i);
for (my $i = $epoch_max; $i >= 0; $i--) {
my $git_dir = git_dir_n($self, $i);
}
}
$all->async_wait_all;
}
}
$all->async_wait_all;
- update_last_commit($self, $git, $i, $stk->{latest_cmt});
+ $self->update_last_commit($git, $i, $stk->{latest_cmt});