-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Core
-
None
-
(copied to CRM)
-
Empty show more show less
Including retryWrites=true into the connection string is resulting in the following error when attempting to create an index:
(node:24283) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): MongoError: The field 'retryWrites' is not valid for an index specification. Specification: { name: "x_1", key: { x: 1 }, retryWrites: true }
The mongod log file yields:
2018-08-22T10:41:21.477-0500 I COMMAND [conn49] command test.$cmd command: createIndexes { createIndexes: "documents", indexes: [ { name: "x_1", key: { x: 1 }, retryWrites: true } ], retryWrites: true, lsid: { id: UUID("6c12ec7f-990b-4f1b-bc43-8ddd39b1a2d2") }, $db: "test" } numYields:0 reslen:235 locks:{} protocol:op_query 0ms
It appears as if the retryWrites parameter is getting incorrectly applied to the createIndexes command (which then fails due to the stricter validation of index specifications).
This was perhaps introduced via NODE-1105. However, I do not see index operations mentioned as a supported retryable write operation in the spec.