-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Index Maintenance
-
None
-
Query
-
ALL
While running 2 concurrent background index builds on the same collection in MongoDB 3.0.7, I tried to kill one of them. It was correctly interrupted, however another index abruptly terminated with ""exception: Unable to complete index build as the collection is no longer readable", which is not expected. Further, restarting mongod causes the rebuild of that index.
> db.test.ensureIndex({y:"hashed"},{background:true}) { "createdCollectionAutomatically" : false, "numIndexesBefore" : 2, "errmsg" : "exception: Unable to complete index build as the collection is no longer readable", "code" : 28550, "ok" : 0 } >
logs:
2015-10-21T16:22:50.000-0400 I - [conn4] Index Build (background): 255700/1203065 21% 2015-10-21T16:22:52.000-0400 I - [conn7] Index Build (background): 481000/1203065 39% 2015-10-21T16:22:52.258-0400 I STORAGE [FileAllocator] allocating new datafile /private/tmp/test/data/db/test.2, filling with zeroes... 2015-10-21T16:22:52.516-0400 I STORAGE [FileAllocator] done allocating datafile /private/tmp/test/data/db/test.2, size: 256MB, took 0.258 secs 2015-10-21T16:22:53.000-0400 I - [conn4] Index Build (background): 349000/1203065 29% 2015-10-21T16:22:55.000-0400 I - [conn7] Index Build (background): 584700/1203065 48% 2015-10-21T16:22:56.003-0400 I - [conn4] Index Build (background): 463200/1203065 38% 2015-10-21T16:22:57.654-0400 I COMMAND [conn5] going to kill op: op: 3609240.0 2015-10-21T16:22:57.662-0400 I COMMAND [conn7] command test.$cmd command: createIndexes { createIndexes: "test", indexes: [ { key: { x: "hashed" }, name: "x_hashed", background: true } ] } keyUpdates:0 writeConflicts:0 numYields:5349 reslen:151 locks:{ Global: { acquireCount: { r: 5350, w: 5350 } }, MMAPV1Journal: { acquireCount: { w: 693851 }, acquireWaitCount: { w: 50 }, timeAcquiringMicros: { w: 635311 } }, Database: { acquireCount: { w: 5350, W: 2 }, acquireWaitCount: { w: 3, W: 1 }, timeAcquiringMicros: { w: 17330, W: 937 } }, Collection: { acquireCount: { W: 5350 }, acquireWaitCount: { W: 4149 }, timeAcquiringMicros: { W: 6401748 } }, Metadata: { acquireCount: { W: 7 } } } 13990ms 2015-10-21T16:22:57.662-0400 I COMMAND [conn4] command test.$cmd command: createIndexes { createIndexes: "test", indexes: [ { key: { y: "hashed" }, name: "y_hashed", background: true } ] } keyUpdates:0 writeConflicts:0 numYields:4150 reslen:196 locks:{ Global: { acquireCount: { r: 4151, w: 4151 } }, MMAPV1Journal: { acquireCount: { w: 537911 }, acquireWaitCount: { w: 61 }, timeAcquiringMicros: { w: 1158757 } }, Database: { acquireCount: { w: 4151, W: 2 }, acquireWaitCount: { w: 3, W: 1 }, timeAcquiringMicros: { w: 20083, W: 616 } }, Collection: { acquireCount: { W: 4151 }, acquireWaitCount: { W: 4148 }, timeAcquiringMicros: { W: 6419789 } }, Metadata: { acquireCount: { W: 6 } } } 12753ms
- duplicates
-
SERVER-3964 Dropping an index invalidates all cursors on that collection, not just ones using that index.
- Closed