[SERVER-25196] collMod should support writeConcern Created: 21/Jul/16  Updated: 28/Sep/18  Resolved: 28/Sep/18

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

Type: Bug Priority: Minor - P4
Reporter: Geert Bosch Assignee: Ben Judd
Resolution: Done Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2018-06-29 at 9.29.16 AM.png    
Issue Links:
Depends
is depended on by SERVER-28989 Avoid dropping dummy database in Repl... Closed
Related
is related to SERVER-25004 Collection validator rule is mismatch... Closed
Operating System: ALL
Steps To Reproduce:

(function() {
    'use strict';
    assert.commandWorked(db.collmod.createIndex({x: 1}, {expireAfterSeconds: 3}));
    assert.commandWorked(
        db.runCommand({collMod: "collmod", index: {keyPattern: {x:1}, expireAfterSeconds: 6}, writeConcern: {w: 4, wtimeout: 100}}));
})()

Sprint: Storage NYC 2018-07-02
Participants:

 Description   

Currently trying to specify a writeConcern with collMod results in:

2016-07-21T14:06:42.825-0400 E QUERY    [thread1] Error: command failed: {
	"ok" : 0,
	"errmsg" : "unknown option to collMod: writeConcern",
	"code" : 72
}



 Comments   
Comment by Eric Milkie [ 28/Sep/18 ]

collMod now supports writeConcern starting with version 3.6.0.

Comment by Eric Milkie [ 28/Sep/18 ]

Originally, we only tested the latest version of each branch. I'll update the version for 3.6.

Comment by Shane Harvey [ 28/Sep/18 ]

I think the fixVersion here is off. collMod seems to support writeConcern on 3.6.0.

Comment by Ben Judd [ 29/Jun/18 ]

Seems to have gone away.

Comment by Eric Milkie [ 08/Feb/18 ]

It seems unlikely at this point; is there something particular about MongoDB 3.4 that makes fixing this ticket in that branch important?

Comment by Shane Harvey [ 08/Feb/18 ]

Will this issue ever be fixed in MongoDB 3.4?

Comment by Max Hirschhorn [ 05/May/17 ]

redbeard0531, should this be closed as a duplicate of SERVER-28507 given your changes to parseCollModRequest()?

Comment by Judah Schvimer [ 21/Jul/16 ]

This occurs because collMod does its own argument validation and does not explicitly accept writeConcern as a valid parameter. collMod's supportsWriteConcern() function does return true.

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