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

Chained structs inside a command produce non-compilable code

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.5.10
    • IDL
    • None
    • Fully Compatible
    • ALL
    • Hide

      Add the following command to mongo/idl/unittest.idl:

          DocSequenceCommandWithChaining:
              description: UnitTest for a basic command with fields marked with supports_doc_sequence which
                           also uses struct chaining
              namespace: concatenate_with_db
              chained_structs:
                  chained_string_basic_type:
                      cpp_name: ChainedStringBasicType
              fields:
                  field1: int
                  field2: string
                  structs:
                      type: array<one_string>
                      supports_doc_sequence: true
                  objects:
                      type: array<object>
                      supports_doc_sequence: true
      

      Show
      Add the following command to mongo/idl/unittest.idl : DocSequenceCommandWithChaining: description: UnitTest for a basic command with fields marked with supports_doc_sequence which also uses struct chaining namespace: concatenate_with_db chained_structs: chained_string_basic_type: cpp_name: ChainedStringBasicType fields: field1: int field2: string structs: type: array<one_string> supports_doc_sequence: true objects: type: array<object> supports_doc_sequence: true
    • Platforms 2017-07-10

    Description

      Using a chained struct inside a command generates a reference to variable called bsonObject, which does not exist because the input to the command's parse method is OpMsgRequest.

      Attachments

        Activity

          People

            mark.benvenuto@mongodb.com Mark Benvenuto
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: