Attempting to start a sharded transaction on server version 4.1.5 with readConcern level "local" results in the following error:
"The first command in a transaction cannot specify a readConcern level other than snapshot or majority"
MongoDB Enterprise mongos> session = db.getMongo().startSession() session { "id" : UUID("598f8543-7697-4822-bf6d-7f78b82cd00e") } MongoDB Enterprise mongos> session.startTransaction({readConcern:{level:"local"}}) MongoDB Enterprise mongos> session.getDatabase("test").test.insert({}) WriteCommandError({ "ok" : 0, "errmsg" : "The first command in a transaction cannot specify a readConcern level other than snapshot or majority", "code" : 72, "codeName" : "InvalidOptions", "operationTime" : Timestamp(1542158775, 2), "$clusterTime" : { "clusterTime" : Timestamp(1542158775, 2), "signature" : { "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="), "keyId" : NumberLong(0) } } })
I thought the server was free to upgrade a user's readConcern from a lower level to a higher level. Are we going to support this in 4.2 or will mongos always reject "local"?