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

Make CanonicalQuery::canonicalize() throw exceptions rather than return non-OK statuses

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Query Optimization

      This was considered as part of SERVER-76042. It would simplify most of the call sites who just 'uassertStatusOK()' anyway, and will also simplify some of the implementation. It also allows the linked follow-up ticket.

      Warning: I attempted this and the patch got quite large. It is conceptually simple though and there wasn't anything that came up that seemed super risky. There were a couple try/catches to preserve behavior in an "if not OK" branch, but I recall it was exclusively error message context, and perhaps breaking a retry cycle in one place.

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: