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

Review possible consistency risks in getCurrentMetadataIfKnown usage

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

      The getCurrentMetadataIfKnown is a helper to return the current filtering metadata known by the shard. 
      The helper does not serialize on any active critical section. This makes the metadata returned known but potentially incorrect. 
      SERVER-94740 spotted a first wrong usage of the helper, causing the checkMetadataConsistency to return a wrong inconsistency. 
      Every usage should be carefully reviewed, ensuring the caller is correctly handling any active critical section. 

      After that, we should also evaluate on whether this helper should stay exposed as it is, or eventually handling the critical section internally. Possibly the helper could either serialize on the critical section or return boost::none when one it's active, as if the metadata are unknown.

            Assignee:
            Unassigned Unassigned
            Reporter:
            enrico.golfieri@mongodb.com Enrico Golfieri
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: