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

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

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Query Optimization

    Description

      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.

      Attachments

        Activity

          People

            backlog-query-optimization Backlog - Query Optimization
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: