ExportXMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • DB Integration & Observability
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Overview

      Let a built-in command opt in, at registration, to a predicate that says "an extension replaces me". When the predicate is true at startup, the command is not constructed or registered, so an extension-provided command of the same name can be registered instead. No existing command opts in as part of this ticket, so there is no behavior change.

      Part of SPM-4830 (Support Commands in the Extensions API). The search index management commands will opt in later, when extension or built-in search index commands are selected at startup.

      Scope of Work

      • CommandConstructionPlan::EntryBuilder gains replaceableByExtension(std::function<bool()>), stored on the plan Entry.
      • CommandConstructionPlan::execute skips any entry whose replacement predicate returns true.

      Acceptance Criteria

      • A command whose replacement predicate is true is missing from the registry.
      • A command whose predicate is false, or that never opted in, is registered as before.

      Example Test Cases

      • Command construction-plan unit tests covering a predicate that is true, one that is false, and a command that never opted in, for both shard and router registries.

      Technical Notes

      • This adds API to commands.h that has no production caller until the search index commands opt in. If server-programmability reviewers prefer, merge this with that work instead.

      Depends on: none

            Assignee:
            Adithi Raghavan
            Reporter:
            Daniel Segel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: