Skip to content

Commit 58aa9f7

Browse files
pierlauroMongoDB Bot
authored andcommitted
SERVER-104220 Router must take into account drop collection write concern error (#35328)
GitOrigin-RevId: 9373888b96d38f782019d397d0eb415f443564c6
1 parent 9329d68 commit 58aa9f7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

jstests/concurrency/fsm_workloads/ddl/random_ddl/random_ddl_operations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const $config = (function() {
5656

5757
jsTestLog('Executing drop state: ' + coll.getFullName());
5858

59-
assert.eq(coll.drop(), true);
59+
assert.commandWorkedIgnoringWriteConcernErrors(db.runCommand({drop: coll.getName()}));
6060
},
6161
rename: function(db, collName, connCache) {
6262
db = this.getRandomDb(db);

src/mongo/s/commands/cluster_drop_collection_cmd.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ class DropCmd : public DropCmdVersion1Gen<DropCmd> {
139139
BSONObjBuilder result;
140140
CommandHelpers::filterCommandReplyForPassthrough(remoteResponse.data, &result);
141141
auto resultObj = result.obj();
142-
uassertStatusOK(getStatusFromCommandResult(resultObj));
142+
// TODO SERVER-103506 consider removing the following line since `writeConcernError`
143+
// will be included in the DropReply (check SERVER-104220 for additional details)
144+
uassertStatusOK(getStatusFromWriteCommandReply(resultObj));
143145
// Ensure our reply conforms to the IDL-defined reply structure.
144146
return DropReply::parse(IDLParserContext{"drop"}, resultObj);
145147
} catch (const ExceptionFor<ErrorCodes::NamespaceNotFound>&) {

0 commit comments

Comments
 (0)