bookmarks_movement: don't call batch_derive for skeleton manifests

Summary:
Use of `RootSkeletonManifest::batch_derive` is wrong, as it doesn't take into
account manifests that are already derived.  Just use the normal derivation
method.

Reviewed By: StanislavGlebik

Differential Revision: D25218197

fbshipit-source-id: 60f2faad610d507a9659dc37ba72516431a9c036
This commit is contained in:
Mark Juggurnauth-Thomas 2020-11-30 06:21:58 -08:00 committed by Facebook GitHub Bot
parent 9531f1d3ed
commit 783d6604da

View File

@ -308,15 +308,11 @@ impl AffectedChangesets {
.await
.context("Failed to load additional affected changesets")?;
let sk_mf_ids = RootSkeletonManifestId::batch_derive(
ctx,
repo,
self.iter().map(BonsaiChangeset::get_changeset_id),
)
.await?;
stream::iter(sk_mf_ids.into_iter().map(Ok))
.try_for_each_concurrent(100, |(bcs_id, sk_mf_id)| async move {
let sk_mf = sk_mf_id
stream::iter(self.iter().map(BonsaiChangeset::get_changeset_id).map(Ok))
.try_for_each_concurrent(100, |bcs_id| async move {
let sk_mf = RootSkeletonManifestId::derive(ctx, repo, bcs_id)
.await
.map_err(Error::from)?
.into_skeleton_manifest_id()
.load(ctx, repo.blobstore())
.await