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

initial sync exception: 10083 create collection invalid size spec

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.4.7, 2.5.3
    • Affects Version/s: 2.4.3
    • Component/s: Replication
    • Environment:
      python 2.7, mongodb and driver 2.4 over ubuntu server 12.04 64bits
    • Fully Compatible

      Issue Status as of October 22nd, 2013

      ISSUE SUMMARY
      Collections with size:0 will trigger an assertion in v2.4 when running initialSync for a new replica set member or running mongorestore.

      USER IMPACT
      With MongoDB v2.2 and before it was permitted to create a collection with an initial size specified as 0 using the createCollection command. These collections will trigger an assertion in v2.4 when trying to sync a new replica set member or run mongorestore. The user will see the message: initial sync exception: 10083 create collection invalid size spec if they encounter this situation.

      It is present in versions of MongoDB between v2.4.0 and v2.4.6, inclusive.

      SOLUTION
      The assertion was changed to allow collections of size:0 to be created.

      WORKAROUNDS
      Users can either create and remove a dummy document or drop and create the collection using the default size value to allow initialSync to proceed. In order to run mongorestore on a database with an affected collection, first restore with v2.2, take one of the actions listed above and then restart with v2.4.

      PATCHES
      Production release v2.4.7 contains the fix for this issue, and production release v2.6.0 will contain the fix as well.

      Original Description

      We are get continuosly this exception message: "initial sync exception: 10083 create collection invalid size spec" each time we try to start up one of our shards.

      We have been looking for corrupt collections and documents all over the system as it looks to be related to a bson object size, but can´t find why this is happening over and over, and there is not information about this error message. Also, we had tried db.repairDatabase() and get the same exception on both shards.

      We found where this is generated on cpp code on git https://github.com/mongodb/mongo/blob/master/src/mongo/db/pdfile.cpp at line 276

      thanks in advance, help will be welcomed
      Javi

            Assignee:
            kyle.erf Kyle Erf
            Reporter:
            javidiaz Javi Díaz
            Votes:
            4 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: