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

MongoDB upgrade 2.4 to 2.6 check returns error in internal collections

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.6.2, 2.7.2
    • Affects Version/s: 2.6.1
    • Component/s: Internal Code
    • None
    • Fully Compatible
    • ALL
    • Hide

      N/A

      Show
      N/A

      I have a replica set and wanted to upgrade MongoDB from version 2.4.5 to 2.6.1 and before replacing binaries have used this command: db.upgradeCheckAllDBs()

      However this error returned:

      ...
      Checking collection local.replset.minvalid
      Document Error: document is no longer valid in 2.6 because DollarPrefixedFieldName: $set is not valid for storage.: {  "_id" : ObjectId("50101a875b51c70037b81c30"),  "ts" : Timestamp(1398232884, 51),  "h"
       : NumberLong("4590312020654652586"),  "op" : "u",  "ns" : "jumbo.jumboFile2Upload",  "o2" : {  "_id" : ObjectId("510b039031c82133929bd77f") },  "o" : {  "$set" : {  "operation" : {  "operation" : "upload
      ",  "total" : NumberLong(1048768),  "done" : NumberLong(671576) } } } }
      ...
      

      To fix the problems above please consult http://dochub.mongodb.org/core/upgrade_checker_help
      false

      This error is in internal MongoDB collection (local.replset.minvalid). Mentioned link states:

      To resolve, remove the document and re-insert with the appropriate corrections.

      What does this local.replset.minvalid do? I do not feel comfortable updating internal MongoDB collections.

      This collection local.replset.minvalid contains only one document:

      set0:PRIMARY> db.replset.minvalid.findOne()
      {
              "_id" : ObjectId("50101a875b51c70037b81c30"),
              "ts" : Timestamp(1398232884, 51),
              "h" : NumberLong("4590312020654652586"),
              "op" : "u",
              "ns" : "jumbo.jumboFile2Upload",
              "o2" : {
                      "_id" : ObjectId("510b039031c82133929bd77f")
              },
              "o" : { 
                      "$set" : {
                              "operation" : {
                                      "operation" : "upload",
                                      "total" : NumberLong(1048768),
                                      "done" : NumberLong(671576)
                              }
                      }
              }
      }
      

      Is this a bug? What should I do?

            Assignee:
            matt.dannenberg Matt Dannenberg
            Reporter:
            sasa.skevin@gmail.com Sasa Skevin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: