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

Do not expose internal attributes like dbName, dbVersion, and dbPrimaryShard in DatabaseShardingState

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • CAR Team 2025-05-12
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None

      SERVER-103709 refactored DatabaseShardingState (DSS) into an interface intended for use by the shard_role API.

      As such, DSS should provide a clear and well-defined API for validating the received dbVersion against the currently installed metadata (also referred to as the "wanted" dbVersion).

      It should not expose internal attributes like dbVersion directly, as doing so allows external users to bypass the intended interface and potentially re-implement database version checks at higher layers, which undermines encapsulation and consistency.

            Assignee:
            pol.pinol@mongodb.com Pol Pinol
            Reporter:
            pol.pinol@mongodb.com Pol Pinol
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: