[SERVER-11706] convertToCappedCollection command on secondaries does not work during a bg index build Created: 14/Nov/13  Updated: 11/Jul/16  Resolved: 15/Jan/14

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: 2.5.3
Fix Version/s: 2.5.5

Type: Bug Priority: Major - P3
Reporter: Michael O'Brien Assignee: Eric Milkie
Resolution: Done Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Operating System: ALL
Participants:

 Description   

Based on conversation with milkie - not 100% sure if this is correct behavior or not (or possibly just a normal consequence of yielding/timing) so i'm opening this to track efforts to probe further.

  • on a standalone mongod, create a collection and fill it with test data (1M docs)
  • run createIndex with {background:true}
  • immediately after the createIndex command, run a convertToCapped command on the same collection.

expected:

  • the background index build should abort and convertToCapped should run

actual:

  • the background index command runs to completion, and the convertToCapped runs only after the index build is complete.


 Comments   
Comment by Githook User [ 23/Jan/14 ]

Author:

{u'username': u'dannenberg', u'name': u'Matt Dannenberg', u'email': u'matt.dannenberg@10gen.com'}

Message: SERVER-11706 fix indexbg_interrupts.js back to waiting for the index to drop via assert.soon()
Branch: master
https://github.com/mongodb/mongo/commit/e1dfecd4b530f1d2172270471f4c2c77bdb2639a

Comment by Githook User [ 15/Jan/14 ]

Author:

{u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: SERVER-11706 fix replicated convertToCapped w/index builds
Branch: master
https://github.com/mongodb/mongo/commit/09487a6fe2759e653c0ff3c64b70d7c1990acc05

Comment by Eric Milkie [ 20/Dec/13 ]

Note: this ticket will fix the behavior such that an in-progress index build is cancelled if convertToCapped happens.

For replicated nodes, if a bg index build is in progress, the command silently fails on a secondary if it is still running a background index, and this leaves the collection unconverted. I'll switch this ticket to reflect this.

Generated at Thu Feb 08 03:26:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.