A lichen-survey import writes two related items in one Cosmos transactional batch. Readers must never see the second item without the first. Which consistency level should the developer pick?
Select an answer to reveal the explanation.
Short Explanation
Picture a two-page stamp: nobody should see page two without page one. Consistent prefix keeps those transactional batch writes in order for readers. Lone single-item writes still behave more like eventual.
Full Explanation
When a lichen-survey import writes two related items in one Cosmos transactional batch and readers must never see the second item without the first, Consistent prefix is the level that matches. Consistent prefix guarantees that updates appear in order: once a reader observes a write, it never observes a later write from the same transactional batch without the earlier ones. That prevents partial batch visibility for the survey pair.
Eventual allows replicas to surface items out of order, so the second lichen reading could appear before the first. Session consistency alone addresses read-your-writes inside one session; splitting batch items across different partition keys also breaks transactional batch atomicity expectations and does not create a global prefix guarantee for all readers. Strong combined with multi-region writes is not a supported pairing, and framing the problem as conflict merge on every batch misses the ordered-visibility requirement.
Exam caveat: Consistent prefix’s distinctive value shows up for transactional batches and ordered sequences; lone single-item writes behave closer to eventual-style visibility, so do not oversell prefix as Strong for every point read.
Operational check: write the two related survey items in one transactional batch under Consistent prefix, then read from a secondary region or separate client and assert that whenever the second item is visible the first is already visible as well.