Courseiva
Aggregation Framework →mediumMultiple Select

C100DEV Aggregation Framework Practice Question

Which TWO stages are considered 'blocking' stages that can potentially consume excessive memory if not managed correctly?

⚠ Common exam trap

Candidates often overlook that $sort and $group are blocking stages, failing to realize that these operations must buffer all incoming documents before they can emit any results downstream.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

$group

Both $group and $sort are blocking stages because they require all preceding documents to be processed before they can produce their first output document. This behavior means they must maintain state in memory or spill to temporary files on disk if the working set is large. Understanding which stages are blocking is essential for developers to avoid pipeline crashes or performance degradation when handling large-scale data aggregations.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    $match

    Why it's wrong here

    The $match stage is a streaming operation that filters documents one by one as they flow through the pipeline. It does not need to wait for the entire collection to be scanned, making it non-blocking and highly efficient for reducing data volume early in the aggregation process.

  • ✓

    $group

    Why this is correct

    The $group stage must consume all input documents to calculate aggregate results like sums or averages. Because it must see the entire stream to finalize values for grouping keys, it is a blocking operation that requires significant RAM. Developers must be cautious with memory limits when grouping.

  • ✓

    $sort

    Why this is correct

    The $sort stage is blocking because it needs the full set of documents to determine their relative order. While it can use indexes to avoid memory issues, a sort without an index must pull all documents into memory, potentially exceeding the 100MB limit during the sorting process.

  • ✗

    $project

    Why it's wrong here

    The $project stage is a streaming transformation that modifies or selects fields for each document as it passes through. It operates on a per-document basis and does not require knowledge of other documents in the stream, making it non-blocking and generally low-impact on system memory.

  • ✗

    $limit

    Why it's wrong here

    The $limit stage simply restricts the number of documents passed to the next stage in the pipeline. It is a non-blocking operation that stops the stream once the threshold is reached, which actually helps reduce memory pressure for subsequent stages rather than contributing to it.

About these practice questions

Courseiva writes every C100DEV question from scratch — 259 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official MongoDB exam blueprint

This C100DEV practice question is part of Courseiva's free MongoDB certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the C100DEV exam.