[SERVER-31430] `background:true` is more sensible default for `createIndex()` Created: 05/Oct/17  Updated: 07/Jun/19  Resolved: 06/Oct/17

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 3.4.9
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Brad Vogel Assignee: Unassigned
Resolution: Duplicate Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-20960 Default index build option support in... Closed
Backwards Compatibility: Minor Change
Operating System: ALL
Participants:
Case:

 Description   

Per https://docs.mongodb.com/manual/reference/method/db.collection.createIndex/#options-for-all-index-types, the `background` option defaults to `false`. This has caused operational problems on our team using MongoDB. We've forgotten `background:true` and it's blocked all database calls, causing downtime (until we could run `db.killOp()`).

Wouldn't `background: true` be a more sensible default? I can't think of a reason we'd ever use the default that blocks all database operations. Is there a historical reason this isn't the default?



 Comments   
Comment by Kevin Adistambha [ 06/Oct/17 ]

Hi brad@mixmax.com,

Thanks for the feature request. However, I believe the requirements put forward in this ticket is also described in SERVER-20960, so I'm going to mark this ticket as a duplicate. Please feel free to watch/upvote/comment on SERVER-20960 if you feel this feature is important to you.

Best regards,
Kevin

Generated at Thu Feb 08 04:27:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.