Summarize IDL changes re Compatibility Notes API V1 (DOCS-14385)

[DOCS-14013] Investigate changes in SERVER-51371: Create IDL definition for writeConcern Created: 20/Nov/20  Updated: 13/Nov/23  Resolved: 28/Apr/21

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 4.9.0, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Sub-task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Joseph Dougherty
Resolution: Fixed Votes: 0
Labels: docs-manual-idl
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-51371 Create IDL definition for writeConcern Closed
Related
is related to DOCS-14385 Summarize IDL changes re Compatibilit... Closed
Participants:
Days since reply: 3 years, 11 weeks, 5 days ago

 Description   

Description

Downstream Change Summary

We had to make two downstream-facing changes to how writeconcern arguments are parsed:
1) The writeconcern argument to a command is a document; previously, this document could contain a field whose fieldname was any capitalization variant of "getLastError" (the value of this field was ignored). Now, we'll still parse writeconcern documents that contain a "getLastError" field (and ignore the value), but only with the capitalization "getLastError." So previously we'd parse both:
a) {..., writeConcern: {w: 1, ..., getLastError: foo}}
and
b) {...,writeConcern: {w: 1, ...,GetlastError: foo}}
without error. But now, we'll only parse (a), and (b) will fail to parse.

Note that the "getLastError" field in a writeconcern argument is deprecated, and has been ignored for as long as we can look back/remember (so ideally, nothing downstream should be using it anyway). Additionally, the writeconcern argument will still parse correctly with "wOpTime" or "wElectionId" fields present, though these options are also deprecated and their values are ignored, both before and after these changes. (To avoid confusion: these fields are accepted only when capitalized as spelled in the previous sentence, both before and after these changes; the getLastError behavior was unique).

2) Previously, when we couldn't parse a writeconcern, we'd return a response to the client with a generic error code corresponding to some general error, like ErrorCodes::FailedToParse. Now, we'll return a unique error code, that doesn't have some general meaning.

Thanks!

Description of Linked Ticket

Add a strict IDL definition for writeConcern in basic_types.idl and update all IDL commands that aren't in API V1 to use writeConcern IDL definition.

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)


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