SERVER-109531 Fix ineffecient call to reserve() (#40399)

GitOrigin-RevId: 83fbdcf6babed5bfe752efa8cfd8d59918c7ef60
This commit is contained in:
Christopher M. Wolff 2025-08-25 09:19:16 -07:00 committed by MongoDB Bot
parent 3e67bf6972
commit af3751371f
1 changed files with 1 additions and 1 deletions

View File

@ -317,8 +317,8 @@ DocumentSourceGraphLookUp::DocumentSourceGraphLookUp(
// We append an additional BSONObj to '_fromPipeline' as a placeholder for the $match
// stage we'll eventually construct from the input document.
_fromPipeline.reserve(resolvedNamespace.pipeline.size() + 1);
_fromPipeline = resolvedNamespace.pipeline;
_fromPipeline.reserve(_fromPipeline.size() + 1);
_fromPipeline.push_back(BSON("$match" << BSONObj()));
}