You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix(mongodb): use "majority" as the default write concern
The current default, an empty string, causes an error when the output is
used:
```
Failed to send message to mongodb: (BadValue) cannot use non-majority 'w' mode "" when a host is not a member of a replica set
```
This commit changes the default to "majority" which the MongoDB docs
describe as ["the default write concern for most MongoDB
deployments"](https://www.mongodb.com/docs/manual/reference/write-concern/#w-option).
* feat(mongodb): certify plugin
Copy file name to clipboardexpand all lines: docs/modules/components/pages/outputs/mongodb.adoc
+4-4
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ output:
46
46
collection: "" # No default (required)
47
47
operation: update-one
48
48
write_concern:
49
-
w: ""
49
+
w: majority
50
50
j: false
51
51
w_timeout: ""
52
52
document_map: ""
@@ -79,7 +79,7 @@ output:
79
79
collection: "" # No default (required)
80
80
operation: update-one
81
81
write_concern:
82
-
w: ""
82
+
w: majority
83
83
j: false
84
84
w_timeout: ""
85
85
document_map: ""
@@ -197,12 +197,12 @@ The write concern settings for the mongo connection.
197
197
198
198
=== `write_concern.w`
199
199
200
-
W requests acknowledgement that write operations propagate to the specified number of mongodb instances.
200
+
W requests acknowledgement that write operations propagate to the specified number of mongodb instances. Can be the string "majority" to wait for a calculated majority of nodes to acknowledge the write operation, or an integer value specifying an minimum number of nodes to acknowledge the operation, or a string specifying the name of a custom write concern configured in the cluster.
Copy file name to clipboardexpand all lines: docs/modules/components/pages/processors/mongodb.adoc
+4-4
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ mongodb:
45
45
collection: "" # No default (required)
46
46
operation: insert-one
47
47
write_concern:
48
-
w: ""
48
+
w: majority
49
49
j: false
50
50
w_timeout: ""
51
51
document_map: ""
@@ -71,7 +71,7 @@ mongodb:
71
71
collection: "" # No default (required)
72
72
operation: insert-one
73
73
write_concern:
74
-
w: ""
74
+
w: majority
75
75
j: false
76
76
w_timeout: ""
77
77
document_map: ""
@@ -176,12 +176,12 @@ The write concern settings for the mongo connection.
176
176
177
177
=== `write_concern.w`
178
178
179
-
W requests acknowledgement that write operations propagate to the specified number of mongodb instances.
179
+
W requests acknowledgement that write operations propagate to the specified number of mongodb instances. Can be the string "majority" to wait for a calculated majority of nodes to acknowledge the write operation, or an integer value specifying an minimum number of nodes to acknowledge the operation, or a string specifying the name of a custom write concern configured in the cluster.
Description("W requests acknowledgement that write operations propagate to the specified number of mongodb instances.").
264
-
Default(""),
263
+
Description(`W requests acknowledgement that write operations propagate to the specified number of mongodb instances. Can be the string "majority" to wait for a calculated majority of nodes to acknowledge the write operation, or an integer value specifying an minimum number of nodes to acknowledge the operation, or a string specifying the name of a custom write concern configured in the cluster.`).
264
+
Default("majority"),
265
265
service.NewBoolField(commonFieldWriteConcernJ).
266
266
Description("J requests acknowledgement from MongoDB that write operations are written to the journal.").
0 commit comments