Suspicious chunk version initialization in ChunkManager

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 3.2.0-rc1
    • Affects Version/s: 3.1.8
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding B (10/30/15)
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      From https://github.com/mongodb/mongo/blob/r3.1.8/src/mongo/s/chunk_manager.cpp#L173

      ChunkManager::ChunkManager(const CollectionType& coll)
          : _ns(coll.getNs().ns()),
            _keyPattern(coll.getKeyPattern()),
            _unique(coll.getUnique()),
            _sequenceNumber(NextSequenceNumber.addAndFetch(1)),
            _chunkRanges() {
          _version = ChunkVersion::fromBSON(coll.toBSON());
      }
      

      This looks suspicious as the config.collections does not contain any information about the highest (or any for that matter) chunk version of the collection.

            Assignee:
            Misha Tyulenev (Inactive)
            Reporter:
            Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: