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

Replication config version should be long long type

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: 4.4.0, 5.0.0, 6.0.0, 7.0.0
    • Component/s: None
    • Replication
    • Fully Compatible
    • ALL
    • Repl 2024-10-14

      ConfigVersionAndTerm class is added by SERVER-45082(repl_set_config.h). It has two member variables called _version and _term. Both of them are long long type.

      long long _version;
      long long _term; 

      However, the version field is defined as int type in constructor. This is contradictory to definition.

      ConfigVersionAndTerm(int version, long long term) : _version(version), _term(term) {} 

      Also, in repl_set_config.idl, the version is defined as

      color: Color value is invalid
      color: Color value is invalid

      std::int64_t in 


      ReplSetConfigBase structure. But the max value is defined as 2147483647 which is the 32 bits number's max value.
       
      I think the version definition of these places needs to be at least consistent. Or it will lead to ambiguity. 

            Assignee:
            solomon.lifshits@mongodb.com Solomon Lifshits
            Reporter:
            miaoyixuan.myx@alibaba-inc.com YiXuan Miao
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: