ensureIndex failure reports ok: 1 on some failures

XMLWordPrintableJSON

    • ALL
    • Hide

      1) Run mongod against attached datafiles
      2) Try to ensure an index on test.test

      Show
      1) Run mongod against attached datafiles 2) Try to ensure an index on test.test
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Against a corrupted data set (next extent header pointing to invalid location):

      > db.test.ensureIndex({a:1})
      {
              "createdCollectionAutomatically" : false,
              "numIndexesBefore" : 1,
              "numIndexesAfter" : 1,
              "ok" : 1
      }
      > db.test.ensureIndex({b:1})
      {
              "createdCollectionAutomatically" : false,
              "numIndexesBefore" : 1,
              "numIndexesAfter" : 1,
              "ok" : 1
      }
      > 
      

      Seems like ok should not be set to 1 here

        1. corrupttest.tgz
          125.19 MB
          Andrew Emil

              Assignee:
              Eliot Horowitz (Inactive)
              Reporter:
              Andrew Emil (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: