@@ -298,19 +298,6 @@ writeConcern = { w: 0, wtimeoutMS: 100 }; // Unacknowledged
298
298
299
299
#### On the Wire
300
300
301
- ##### OP_INSERT, OP_DELETE, OP_UPDATE
302
-
303
- ` WriteConcern ` is implemented by sending the ` getLastError ` (GLE) command directly after the operation. Drivers SHOULD
304
- piggy-back the GLE onto the same buffer as the operation. Regardless, GLE MUST be sent on the same connection as the
305
- initial write operation.
306
-
307
- When a user has not specified a ` WriteConcern ` or has specified the server's default ` WriteConcern ` , drivers MUST send
308
- the GLE command without arguments. For example: ` { getLastError: 1 } `
309
-
310
- Drivers MUST NOT send a GLE for an ` Unacknowledged WriteConcern ` . In this instance, the server will not send a reply.
311
-
312
- See the ` getLastError ` command documentation for other formatting.
313
-
314
301
##### Write Commands
315
302
316
303
The ` insert ` , ` delete ` , and ` update ` commands take a named parameter, ` writeConcern ` . See the command documentation for
@@ -523,11 +510,7 @@ Below are English descriptions of other items that should be tested:
523
510
### WriteConcern
524
511
525
512
1 . Commands supporting a write concern MUST NOT send the default write concern to the server.
526
- 2 . Commands supporting a write concern MUST send any non-default acknowledged write concern to the server, either in the
527
- command or as a getLastError.
528
- 3 . On ServerVersion less than 2.6, drivers MUST NOT send a getLastError command for an Unacknowledged write concern.
529
- 4 . FindAndModify helper methods MUST NOT send a write concern when the MaxWireVersion is less than 4.
530
- 5 . Helper methods for other commands that write MUST NOT send a write concern when the MaxWireVersion is less than 5.
513
+ 2 . Commands supporting a write concern MUST send any non-default write concern to the server in the command.
531
514
532
515
## Reference Implementation
533
516
@@ -550,8 +533,6 @@ instance, we send it.
550
533
551
534
## Changelog
552
535
553
- - 2024-08-23: Migrated from reStructuredText to Markdown.
554
-
555
536
- 2015-10-16: ReadConcern of local is no longer allowed to be used when talking with MaxWireVersion \< 4.
556
537
557
538
- 2016-05-20: Added note about helpers for commands that write accepting a writeConcern parameter.
@@ -593,6 +574,10 @@ instance, we send it.
593
574
594
575
- 2022-10-05: Remove spec front matter and reformat changelog.
595
576
577
+ - 2024-08-23: Migrated from reStructuredText to Markdown.
578
+
579
+ - 2024-10-30: Remove reference to getLastError
580
+
596
581
[ ^ 1 ] : This is only possible in a sharded cluster. When a write is routed to multiple shards and more than one shard
597
582
returns a writeConcernError, then mongos will construct a new writeConcernError with the "WriteConcernFailed" error
598
583
code and an errmsg field contains the stringified writeConcernError from each shard. Note that each shard may return
0 commit comments