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

Chained structs inside a command produce non-compilable code

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.10
    • Affects Version/s: None
    • Component/s: 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

      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.

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

              Created:
              Updated:
              Resolved: