C100DBA CRUD Operations Practice Question
A sharded cluster stores customer documents in the customers collection, sharded on the customerId field. An application runs an updateOne with the filter { email: "user@example.com" } and the update { $set: { tier: "gold" } }. The email field is not the shard key and has no index. What is the most likely outcome of this operation?
⚠ Common exam trap
The trap here is assuming that a sharded cluster automatically indexes or routes on any filter field, when routing is determined by the shard key.
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
✓
The mongos broadcasts the update to all shards, and each shard performs a collection scan to evaluate the filter.
In a sharded collection, routing decisions depend on the shard key. Because the filter uses email, which is neither the shard key nor indexed, mongos cannot target a shard and must broadcast to all shards. Each shard then scans its local documents to evaluate the filter, making the update a scatter-gather operation. The update is not rejected, and no global email index exists.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The update is routed only to the shard that owns the email range because mongos maintains a global index on email.
Why it's wrong here
MongoDB does not maintain automatic global secondary indexes on arbitrary fields in a sharded collection. Routing is based on the shard key, and email is not the shard key. There is no global email index for mongos to consult, so it cannot direct the update to a single shard based on email.
- ✗
The update fails immediately because the filter does not include the shard key.
Why it's wrong here
MongoDB does not reject updates solely because the filter omits the shard key. The mongos will broadcast the update to all shards. The operation may still succeed, but it is inefficient. This option overstates the behavior: the server does not fail the write at the routing stage for a missing shard key in the filter.
- ✓
The mongos broadcasts the update to all shards, and each shard performs a collection scan to evaluate the filter.
Why this is correct
Without the shard key in the filter, mongos cannot target a specific shard, so it sends the update to every shard. On each shard, the email field has no index, so the shard must scan documents to find matches. This is the expected, if inefficient, behavior for a non-shard-key, unindexed filter in a sharded collection.
- ✗
The update succeeds only on the primary shard and is silently ignored on other shards.
Why it's wrong here
Sharded updates are not limited to the primary shard. When the filter lacks the shard key, mongos broadcasts to all shards and each shard applies the update to any matching documents it owns. There is no silent ignore behavior; the operation either matches documents on a shard or it does not.
About these practice questions
This C100DBA question is part of Courseiva's 222-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
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 C100DBA 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 C100DBA exam.