Remove redundant NamespaceString parameter from MongoProcessInterface write methods

XMLWordPrintableJSON

    • Query Integration
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The insert, insertTimeseries, and update virtual methods on MongoProcessInterface accept both a NamespaceString parameter and a command request object (e.g. InsertCommandRequest, UpdateCommandRequest) that already carries its own namespace. This redundancy is error-prone because callers could pass a namespace that differs from the one inside the command, leading to silently inconsistent behavior.

      In some implementations the separate NamespaceString parameter is already completely ignored — for example NonShardServerProcessInterface::insert only forwards the command object to performInserts and never references the ns argument. Other implementations like NonShardServerProcessInterface::insertTimeseries do use ns, creating an inconsistency in which source of truth is actually authoritative.

      Proposed fix: remove the NamespaceString parameter from insert, insertTimeseries, and update (and their overrides), and derive the namespace from the command request object instead.

            Assignee:
            Unassigned
            Reporter:
            Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: