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

IDL generated serializer does not use command_name

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: IDL
    • None
    • Server Programmability
    • ALL
    • SP Prioritized List

      A command's name is by default taken to be the field name that contains the command's definition, but it can be overridden by specifying the command_name field. The generated serializer does not use this overridden name though and will instead use the YAML map field name.

      e.g.

      the following definition:

      clusterFsyncUnlock:         
          command_name: fsyncUnlock
          cpp_name: clusterFsyncUnlock
          strict: false
          namespace: ignored
          api_version: "" 
      

      produces the following incorrectly generated serializer:

      void ClusterFsyncUnlock::serialize(BSONObjBuilder* builder) const {
          _hasMembers.required();
      
          builder->append("clusterFsyncUnlock"_sd, 1);
          {
              _genericArguments.serialize(builder);
          }
      }
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: