Replace mongocrypt_ctx_t::nothing_to_do

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: None
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Background & Motivation
      mongocrypt_ctx_t::nothing_to_do is an optimization to avoid an extra copy when no encryption or decryption is required. It is vaguely named.

      nothing_to_do is set to true under these conditions:
      1. No keys are requested
      2. The command is bypassed for automatic encryption (e.g. ping).
      3. bypass_query_analysis is true.

      The assumptions about what is safe to access when nothing_to_do is false are not immediately obvious.

      Scope

      • Rename nothing_to_do to has_markings.
      • Only set has_markings to true if traversing a document encounters markings to process.

            Assignee:
            Unassigned
            Reporter:
            Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: