Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-103226

Fix bulk_write.cpp set up of OperationShardingState when translating timeseries view to buckets nss

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • CAR Team 2025-04-14
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      SERVER-98386 fixed a bug caused by a timeseriesView->buckets translation done when setting the ShardRole OperationShardingState in the service entry point.
      That same pattern also exists on bulk_write.cpp and it was not addressed by SERVER-98386 – the ShardVersion requested by the router for a given nss, say {nss1 -> SV1} is translated to {db.system.buckets.nss\ -> SV1}. This makes the ShardRole collection acquisitions for nss disregard the ShardVersion requested by the router, which may mean we fail to detect stale targeting. The bulk_write case appears to be benign – as in, there's no specific correctness bug caused by it, because bulk_write.cpp is only used for writes, and the bug reported on SERVER-98386 exclusively affected reads. Regardless, we should fix the bulk_write.cpp code to make it safer and easier to reason about.

            Assignee:
            jordi.serra-torrens@mongodb.com Jordi Serra Torrens
            Reporter:
            jordi.serra-torrens@mongodb.com Jordi Serra Torrens
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              None
              None
              None
              None