mongo 2.5.0.beta → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/mongo/address.rb +1 -1
- data/lib/mongo/address/unix.rb +1 -1
- data/lib/mongo/auth/user.rb +0 -5
- data/lib/mongo/auth/user/view.rb +4 -4
- data/lib/mongo/bulk_write.rb +60 -32
- data/lib/mongo/client.rb +44 -8
- data/lib/mongo/cluster.rb +14 -12
- data/lib/mongo/cluster/periodic_executor.rb +106 -0
- data/lib/mongo/cluster/{cursor_reaper.rb → reapers/cursor_reaper.rb} +5 -37
- data/lib/mongo/cluster/reapers/socket_reaper.rb +59 -0
- data/lib/mongo/collection.rb +9 -6
- data/lib/mongo/collection/view.rb +2 -2
- data/lib/mongo/collection/view/builder/aggregation.rb +2 -1
- data/lib/mongo/collection/view/builder/find_command.rb +1 -1
- data/lib/mongo/collection/view/change_stream.rb +14 -1
- data/lib/mongo/collection/view/map_reduce.rb +30 -13
- data/lib/mongo/collection/view/readable.rb +5 -5
- data/lib/mongo/collection/view/writable.rb +98 -51
- data/lib/mongo/error.rb +3 -0
- data/lib/mongo/error/invalid_txt_record.rb +27 -0
- data/lib/mongo/error/invalid_uri.rb +7 -6
- data/lib/mongo/error/mismatched_domain.rb +27 -0
- data/lib/mongo/error/no_srv_records.rb +26 -0
- data/lib/mongo/error/unsupported_features.rb +0 -18
- data/lib/mongo/index/view.rb +2 -2
- data/lib/mongo/operation.rb +1 -0
- data/lib/mongo/operation/causally_consistent.rb +33 -0
- data/lib/mongo/operation/commands.rb +2 -1
- data/lib/mongo/operation/commands/aggregate.rb +2 -7
- data/lib/mongo/operation/commands/count.rb +27 -0
- data/lib/mongo/operation/commands/distinct.rb +27 -0
- data/lib/mongo/operation/commands/find.rb +3 -1
- data/lib/mongo/operation/commands/map_reduce.rb +1 -0
- data/lib/mongo/operation/commands/parallel_scan.rb +1 -0
- data/lib/mongo/operation/specifiable.rb +12 -0
- data/lib/mongo/operation/uses_command_op_msg.rb +36 -5
- data/lib/mongo/operation/write.rb +0 -5
- data/lib/mongo/operation/write/bulk/bulkable.rb +4 -8
- data/lib/mongo/operation/write/bulk/mergable.rb +2 -0
- data/lib/mongo/operation/write/command/create_index.rb +19 -0
- data/lib/mongo/operation/write/command/create_user.rb +19 -0
- data/lib/mongo/operation/write/command/delete.rb +1 -2
- data/lib/mongo/operation/write/command/drop_index.rb +19 -0
- data/lib/mongo/operation/write/command/insert.rb +1 -2
- data/lib/mongo/operation/write/command/remove_user.rb +19 -0
- data/lib/mongo/operation/write/command/update.rb +1 -2
- data/lib/mongo/operation/write/command/update_user.rb +19 -0
- data/lib/mongo/operation/write/write_command_enabled.rb +1 -3
- data/lib/mongo/protocol/compressed.rb +2 -1
- data/lib/mongo/protocol/serializers.rb +6 -6
- data/lib/mongo/retryable.rb +48 -5
- data/lib/mongo/server.rb +15 -0
- data/lib/mongo/server/connection.rb +21 -1
- data/lib/mongo/server/connection_pool.rb +3 -0
- data/lib/mongo/server/connection_pool/queue.rb +50 -5
- data/lib/mongo/server/description.rb +11 -3
- data/lib/mongo/server/description/features.rb +26 -7
- data/lib/mongo/session.rb +133 -6
- data/lib/mongo/session/server_session.rb +30 -0
- data/lib/mongo/session/session_pool.rb +20 -20
- data/lib/mongo/uri.rb +88 -44
- data/lib/mongo/uri/srv_protocol.rb +158 -0
- data/lib/mongo/version.rb +1 -1
- data/lib/mongo/write_concern/normalizable.rb +12 -0
- data/mongo.gemspec +1 -2
- data/spec/mongo/address_spec.rb +12 -0
- data/spec/mongo/auth/user/view_spec.rb +1 -5
- data/spec/mongo/bulk_write_spec.rb +232 -401
- data/spec/mongo/change_stream_examples_spec.rb +150 -0
- data/spec/mongo/client_spec.rb +142 -2
- data/spec/mongo/cluster/cursor_reaper_spec.rb +0 -70
- data/spec/mongo/cluster/socket_reaper_spec.rb +32 -0
- data/spec/mongo/cluster_spec.rb +11 -7
- data/spec/mongo/collection/view/aggregation_spec.rb +46 -1
- data/spec/mongo/collection/view/builder/find_command_spec.rb +15 -0
- data/spec/mongo/collection/view/change_stream_spec.rb +79 -12
- data/spec/mongo/collection/view/map_reduce_spec.rb +120 -4
- data/spec/mongo/collection/view/readable_spec.rb +23 -5
- data/spec/mongo/collection_spec.rb +292 -102
- data/spec/mongo/command_monitoring_spec.rb +26 -32
- data/spec/mongo/crud_spec.rb +1 -1
- data/spec/mongo/cursor_spec.rb +2 -3
- data/spec/mongo/database_spec.rb +30 -14
- data/spec/mongo/dns_seedlist_discovery_spec.rb +94 -0
- data/spec/mongo/grid/fs_bucket_spec.rb +1 -1
- data/spec/mongo/grid/stream/write_spec.rb +1 -1
- data/spec/mongo/index/view_spec.rb +8 -46
- data/spec/mongo/operation/write/bulk/delete_spec.rb +2 -2
- data/spec/mongo/operation/write/bulk/insert_spec.rb +2 -10
- data/spec/mongo/operation/write/{create_index_spec.rb → command/create_index_spec.rb} +2 -6
- data/spec/mongo/operation/write/command/delete_spec.rb +35 -7
- data/spec/mongo/operation/write/{drop_index_spec.rb → command/drop_index_spec.rb} +1 -1
- data/spec/mongo/operation/write/command/insert_spec.rb +37 -6
- data/spec/mongo/operation/write/{remove_user_spec.rb → command/remove_user_spec.rb} +2 -6
- data/spec/mongo/operation/write/command/update_spec.rb +34 -7
- data/spec/mongo/operation/write/{update_user_spec.rb → command/update_user_spec.rb} +1 -1
- data/spec/mongo/operation/write/create_user_spec.rb +1 -1
- data/spec/mongo/operation/write/delete_spec.rb +1 -1
- data/spec/mongo/operation/write/insert_spec.rb +2 -10
- data/spec/mongo/operation/write/update_spec.rb +3 -15
- data/spec/mongo/retryable_spec.rb +1 -1
- data/spec/mongo/retryable_writes_spec.rb +815 -0
- data/spec/mongo/server/connection_pool/queue_spec.rb +35 -2
- data/spec/mongo/server/connection_pool_spec.rb +234 -1
- data/spec/mongo/server/connection_spec.rb +10 -6
- data/spec/mongo/server/description/features_spec.rb +51 -37
- data/spec/mongo/server/description_spec.rb +6 -3
- data/spec/mongo/server_spec.rb +87 -0
- data/spec/mongo/session/server_session_spec.rb +43 -0
- data/spec/mongo/session/session_pool_spec.rb +63 -27
- data/spec/mongo/session_spec.rb +247 -0
- data/spec/mongo/shell_examples_spec.rb +2 -2
- data/spec/mongo/uri/srv_protocol_spec.rb +933 -0
- data/spec/mongo/uri_spec.rb +42 -3
- data/spec/mongo/write_concern/acknowledged_spec.rb +11 -0
- data/spec/mongo/write_concern/unacknowledged_spec.rb +11 -0
- data/spec/spec_helper.rb +11 -25
- data/spec/support/authorization.rb +2 -1
- data/spec/support/connection_string.rb +8 -4
- data/spec/support/crud.rb +38 -24
- data/spec/support/crud/write.rb +30 -3
- data/spec/support/crud_tests/read/aggregate-out.yml +21 -0
- data/spec/support/crud_tests/write/bulkWrite-arrayFilters.yml +44 -0
- data/spec/support/crud_tests/write/findOneAndUpdate-arrayFilters.yml +1 -1
- data/spec/support/crud_tests/write/insertMany.yml +1 -3
- data/spec/support/crud_tests/write/replaceOne.yml +1 -1
- data/spec/support/crud_tests/write/updateMany-arrayFilters.yml +1 -1
- data/spec/support/crud_tests/write/updateOne-arrayFilters.yml +1 -1
- data/spec/support/dns_seedlist_discovery_tests/longer-parent-in-return.yml +11 -0
- data/spec/support/dns_seedlist_discovery_tests/misformatted-option.yml +5 -0
- data/spec/support/dns_seedlist_discovery_tests/no-results.yml +5 -0
- data/spec/support/dns_seedlist_discovery_tests/not-enough-parts.yml +5 -0
- data/spec/support/dns_seedlist_discovery_tests/one-result-default-port.yml +10 -0
- data/spec/support/dns_seedlist_discovery_tests/one-txt-record-multiple-strings.yml +10 -0
- data/spec/support/dns_seedlist_discovery_tests/one-txt-record.yml +11 -0
- data/spec/support/dns_seedlist_discovery_tests/parent-part-mismatch1.yml +5 -0
- data/spec/support/dns_seedlist_discovery_tests/parent-part-mismatch2.yml +5 -0
- data/spec/support/dns_seedlist_discovery_tests/parent-part-mismatch3.yml +5 -0
- data/spec/support/dns_seedlist_discovery_tests/parent-part-mismatch4.yml +5 -0
- data/spec/support/dns_seedlist_discovery_tests/parent-part-mismatch5.yml +5 -0
- data/spec/support/dns_seedlist_discovery_tests/returned-parent-too-short.yml +5 -0
- data/spec/support/dns_seedlist_discovery_tests/returned-parent-wrong.yml +5 -0
- data/spec/support/dns_seedlist_discovery_tests/two-results-default-port.yml +11 -0
- data/spec/support/dns_seedlist_discovery_tests/two-results-nonstandard-port.yml +11 -0
- data/spec/support/dns_seedlist_discovery_tests/two-txt-records.yml +5 -0
- data/spec/support/dns_seedlist_discovery_tests/txt-record-not-allowed-option.yml +5 -0
- data/spec/support/dns_seedlist_discovery_tests/txt-record-with-overridden-ssl-option.yml +11 -0
- data/spec/support/dns_seedlist_discovery_tests/txt-record-with-overridden-uri-option.yml +11 -0
- data/spec/support/dns_seedlist_discovery_tests/txt-record-with-unallowed-option.yml +5 -0
- data/spec/support/dns_seedlist_discovery_tests/uri-with-port.yml +5 -0
- data/spec/support/dns_seedlist_discovery_tests/uri-with-two-hosts.yml +5 -0
- data/spec/support/retryable_writes_tests/bulkWrite.yml +305 -0
- data/spec/support/retryable_writes_tests/deleteOne.yml +51 -0
- data/spec/support/retryable_writes_tests/findOneAndDelete.yml +52 -0
- data/spec/support/retryable_writes_tests/findOneAndReplace.yml +57 -0
- data/spec/support/retryable_writes_tests/findOneAndUpdate.yml +56 -0
- data/spec/support/retryable_writes_tests/insertMany.yml +72 -0
- data/spec/support/retryable_writes_tests/insertOne.yml +55 -0
- data/spec/support/retryable_writes_tests/replaceOne.yml +60 -0
- data/spec/support/retryable_writes_tests/updateOne.yml +120 -0
- data/spec/support/shared/session.rb +525 -24
- metadata +437 -350
- metadata.gz.sig +0 -0
- data/lib/mongo/operation/commands/user_query.rb +0 -72
- data/lib/mongo/operation/write/create_index.rb +0 -67
- data/lib/mongo/operation/write/create_user.rb +0 -50
- data/lib/mongo/operation/write/drop_index.rb +0 -63
- data/lib/mongo/operation/write/remove_user.rb +0 -48
- data/lib/mongo/operation/write/update_user.rb +0 -50
@@ -0,0 +1,11 @@
|
|
1
|
+
uri: "mongodb+srv://test18.test.build.10gen.cc/?replicaSet=repl0"
|
2
|
+
seeds:
|
3
|
+
- localhost.sub.test.build.10gen.cc:27017
|
4
|
+
hosts:
|
5
|
+
- localhost:27017
|
6
|
+
- localhost:27018
|
7
|
+
- localhost:27019
|
8
|
+
options:
|
9
|
+
replicaSet: repl0
|
10
|
+
ssl: true
|
11
|
+
comment: Is correct, as returned host name shared the URI root "test.build.10gen.cc".
|
@@ -0,0 +1,11 @@
|
|
1
|
+
uri: "mongodb+srv://test1.test.build.10gen.cc/?replicaSet=repl0"
|
2
|
+
seeds:
|
3
|
+
- localhost.test.build.10gen.cc:27017
|
4
|
+
- localhost.test.build.10gen.cc:27018
|
5
|
+
hosts:
|
6
|
+
- localhost:27017
|
7
|
+
- localhost:27018
|
8
|
+
- localhost:27019
|
9
|
+
options:
|
10
|
+
replicaSet: repl0
|
11
|
+
ssl: true
|
@@ -0,0 +1,11 @@
|
|
1
|
+
uri: "mongodb+srv://test2.test.build.10gen.cc/?replicaSet=repl0"
|
2
|
+
seeds:
|
3
|
+
- localhost.test.build.10gen.cc:27018
|
4
|
+
- localhost.test.build.10gen.cc:27019
|
5
|
+
hosts:
|
6
|
+
- localhost:27017
|
7
|
+
- localhost:27018
|
8
|
+
- localhost:27019
|
9
|
+
options:
|
10
|
+
replicaSet: repl0
|
11
|
+
ssl: true
|
@@ -0,0 +1,305 @@
|
|
1
|
+
data:
|
2
|
+
- { _id: 1, x: 11 }
|
3
|
+
|
4
|
+
minServerVersion: '3.6'
|
5
|
+
|
6
|
+
tests:
|
7
|
+
-
|
8
|
+
description: "First command is retried"
|
9
|
+
failPoint:
|
10
|
+
mode: { times: 1 }
|
11
|
+
operation:
|
12
|
+
name: "bulkWrite"
|
13
|
+
arguments:
|
14
|
+
requests:
|
15
|
+
-
|
16
|
+
name: "insertOne"
|
17
|
+
arguments:
|
18
|
+
document: { _id: 2, x: 22 }
|
19
|
+
-
|
20
|
+
name: "updateOne"
|
21
|
+
arguments:
|
22
|
+
filter: { _id: 2 }
|
23
|
+
update: { $inc: { x : 1 }}
|
24
|
+
-
|
25
|
+
name: "deleteOne"
|
26
|
+
arguments:
|
27
|
+
filter: { _id: 1 }
|
28
|
+
options: { ordered: true }
|
29
|
+
outcome:
|
30
|
+
result:
|
31
|
+
deletedCount: 1
|
32
|
+
insertedIds: { 0: 2 }
|
33
|
+
matchedCount: 1
|
34
|
+
modifiedCount: 1
|
35
|
+
upsertedCount: 0
|
36
|
+
upsertedIds: { }
|
37
|
+
collection:
|
38
|
+
data:
|
39
|
+
- { _id: 2, x: 23 }
|
40
|
+
-
|
41
|
+
# Write operations in this ordered batch are intentionally sequenced so
|
42
|
+
# that each write command consists of a single statement, which will
|
43
|
+
# fail on the first attempt and succeed on the second, retry attempt.
|
44
|
+
description: "All commands are retried"
|
45
|
+
failPoint:
|
46
|
+
mode: { times: 7 }
|
47
|
+
operation:
|
48
|
+
name: "bulkWrite"
|
49
|
+
arguments:
|
50
|
+
requests:
|
51
|
+
-
|
52
|
+
name: "insertOne"
|
53
|
+
arguments:
|
54
|
+
document: { _id: 2, x: 22 }
|
55
|
+
-
|
56
|
+
name: "updateOne"
|
57
|
+
arguments:
|
58
|
+
filter: { _id: 2 }
|
59
|
+
update: { $inc: { x : 1 }}
|
60
|
+
-
|
61
|
+
name: "insertOne"
|
62
|
+
arguments:
|
63
|
+
document: { _id: 3, x: 33 }
|
64
|
+
-
|
65
|
+
name: "updateOne"
|
66
|
+
arguments:
|
67
|
+
filter: { _id: 4, x: 44 }
|
68
|
+
update: { $inc: { x : 1 }}
|
69
|
+
upsert: true
|
70
|
+
-
|
71
|
+
name: "insertOne"
|
72
|
+
arguments:
|
73
|
+
document: { _id: 5, x: 55 }
|
74
|
+
-
|
75
|
+
name: "replaceOne"
|
76
|
+
arguments:
|
77
|
+
filter: { _id: 3 }
|
78
|
+
replacement: { _id: 3, x: 333 }
|
79
|
+
-
|
80
|
+
name: "deleteOne"
|
81
|
+
arguments:
|
82
|
+
filter: { _id: 1 }
|
83
|
+
options: { ordered: true }
|
84
|
+
outcome:
|
85
|
+
result:
|
86
|
+
deletedCount: 1
|
87
|
+
insertedIds: { 0: 2, 2: 3, 4: 5 }
|
88
|
+
matchedCount: 2
|
89
|
+
modifiedCount: 2
|
90
|
+
upsertedCount: 1
|
91
|
+
upsertedIds: { 3: 4 }
|
92
|
+
collection:
|
93
|
+
data:
|
94
|
+
- { _id: 2, x: 23 }
|
95
|
+
- { _id: 3, x: 333 }
|
96
|
+
- { _id: 4, x: 45 }
|
97
|
+
- { _id: 5, x: 55 }
|
98
|
+
-
|
99
|
+
description: "Both commands are retried after their first statement fails"
|
100
|
+
failPoint:
|
101
|
+
mode: { times: 2 }
|
102
|
+
operation:
|
103
|
+
name: "bulkWrite"
|
104
|
+
arguments:
|
105
|
+
requests:
|
106
|
+
-
|
107
|
+
name: "insertOne"
|
108
|
+
arguments:
|
109
|
+
document: { _id: 2, x: 22 }
|
110
|
+
-
|
111
|
+
name: "updateOne"
|
112
|
+
arguments:
|
113
|
+
filter: { _id: 1 }
|
114
|
+
update: { $inc: { x : 1 }}
|
115
|
+
-
|
116
|
+
name: "updateOne"
|
117
|
+
arguments:
|
118
|
+
filter: { _id: 2 }
|
119
|
+
update: { $inc: { x : 1 }}
|
120
|
+
options: { ordered: true }
|
121
|
+
outcome:
|
122
|
+
result:
|
123
|
+
deletedCount: 0
|
124
|
+
insertedIds: { 0: 2 }
|
125
|
+
matchedCount: 2
|
126
|
+
modifiedCount: 2
|
127
|
+
upsertedCount: 0
|
128
|
+
upsertedIds: { }
|
129
|
+
collection:
|
130
|
+
data:
|
131
|
+
- { _id: 1, x: 12 }
|
132
|
+
- { _id: 2, x: 23 }
|
133
|
+
-
|
134
|
+
description: "Second command is retried after its second statement fails"
|
135
|
+
failPoint:
|
136
|
+
mode: { skip: 2 }
|
137
|
+
operation:
|
138
|
+
name: "bulkWrite"
|
139
|
+
arguments:
|
140
|
+
requests:
|
141
|
+
-
|
142
|
+
name: "insertOne"
|
143
|
+
arguments:
|
144
|
+
document: { _id: 2, x: 22 }
|
145
|
+
-
|
146
|
+
name: "updateOne"
|
147
|
+
arguments:
|
148
|
+
filter: { _id: 1 }
|
149
|
+
update: { $inc: { x : 1 }}
|
150
|
+
-
|
151
|
+
name: "updateOne"
|
152
|
+
arguments:
|
153
|
+
filter: { _id: 2 }
|
154
|
+
update: { $inc: { x : 1 }}
|
155
|
+
options: { ordered: true }
|
156
|
+
outcome:
|
157
|
+
result:
|
158
|
+
deletedCount: 0
|
159
|
+
insertedIds: { 0: 2 }
|
160
|
+
matchedCount: 2
|
161
|
+
modifiedCount: 2
|
162
|
+
upsertedCount: 0
|
163
|
+
upsertedIds: { }
|
164
|
+
collection:
|
165
|
+
data:
|
166
|
+
- { _id: 1, x: 12 }
|
167
|
+
- { _id: 2, x: 23 }
|
168
|
+
-
|
169
|
+
description: "BulkWrite with unordered execution"
|
170
|
+
failPoint:
|
171
|
+
mode: { times: 1 }
|
172
|
+
operation:
|
173
|
+
name: "bulkWrite"
|
174
|
+
arguments:
|
175
|
+
requests:
|
176
|
+
-
|
177
|
+
name: "insertOne"
|
178
|
+
arguments:
|
179
|
+
document: { _id: 2, x: 22 }
|
180
|
+
-
|
181
|
+
name: "insertOne"
|
182
|
+
arguments:
|
183
|
+
document: { _id: 3, x: 33 }
|
184
|
+
options: { ordered: false }
|
185
|
+
outcome:
|
186
|
+
result:
|
187
|
+
deletedCount: 0
|
188
|
+
insertedIds: { 0: 2, 1: 3 }
|
189
|
+
matchedCount: 0
|
190
|
+
modifiedCount: 0
|
191
|
+
upsertedCount: 0
|
192
|
+
upsertedIds: { }
|
193
|
+
collection:
|
194
|
+
data:
|
195
|
+
- { _id: 1, x: 11 }
|
196
|
+
- { _id: 2, x: 22 }
|
197
|
+
- { _id: 3, x: 33 }
|
198
|
+
-
|
199
|
+
description: "First insertOne is never committed"
|
200
|
+
failPoint:
|
201
|
+
mode: { times: 2 }
|
202
|
+
data: { failBeforeCommitExceptionCode: 1 }
|
203
|
+
operation:
|
204
|
+
name: "bulkWrite"
|
205
|
+
arguments:
|
206
|
+
requests:
|
207
|
+
-
|
208
|
+
name: "insertOne"
|
209
|
+
arguments:
|
210
|
+
document: { _id: 2, x: 22 }
|
211
|
+
-
|
212
|
+
name: "updateOne"
|
213
|
+
arguments:
|
214
|
+
filter: { _id: 2 }
|
215
|
+
update: { $inc: { x : 1 }}
|
216
|
+
-
|
217
|
+
name: "deleteOne"
|
218
|
+
arguments:
|
219
|
+
filter: { _id: 1 }
|
220
|
+
options: { ordered: true }
|
221
|
+
outcome:
|
222
|
+
error: true
|
223
|
+
result:
|
224
|
+
deletedCount: 0
|
225
|
+
insertedIds: { }
|
226
|
+
matchedCount: 0
|
227
|
+
modifiedCount: 0
|
228
|
+
upsertedCount: 0
|
229
|
+
upsertedIds: { }
|
230
|
+
collection:
|
231
|
+
data:
|
232
|
+
- { _id: 1, x: 11 }
|
233
|
+
-
|
234
|
+
description: "Second updateOne is never committed"
|
235
|
+
failPoint:
|
236
|
+
mode: { skip: 1 }
|
237
|
+
data: { failBeforeCommitExceptionCode: 1 }
|
238
|
+
operation:
|
239
|
+
name: "bulkWrite"
|
240
|
+
arguments:
|
241
|
+
requests:
|
242
|
+
-
|
243
|
+
name: "insertOne"
|
244
|
+
arguments:
|
245
|
+
document: { _id: 2, x: 22 }
|
246
|
+
-
|
247
|
+
name: "updateOne"
|
248
|
+
arguments:
|
249
|
+
filter: { _id: 2 }
|
250
|
+
update: { $inc: { x : 1 }}
|
251
|
+
-
|
252
|
+
name: "deleteOne"
|
253
|
+
arguments:
|
254
|
+
filter: { _id: 1 }
|
255
|
+
options: { ordered: true }
|
256
|
+
outcome:
|
257
|
+
error: true
|
258
|
+
result:
|
259
|
+
deletedCount: 0
|
260
|
+
insertedIds: { 0: 2 }
|
261
|
+
matchedCount: 0
|
262
|
+
modifiedCount: 0
|
263
|
+
upsertedCount: 0
|
264
|
+
upsertedIds: { }
|
265
|
+
collection:
|
266
|
+
data:
|
267
|
+
- { _id: 1, x: 11 }
|
268
|
+
- { _id: 2, x: 22 }
|
269
|
+
-
|
270
|
+
description: "Third updateOne is never committed"
|
271
|
+
failPoint:
|
272
|
+
mode: { skip: 2 }
|
273
|
+
data: { failBeforeCommitExceptionCode: 1 }
|
274
|
+
operation:
|
275
|
+
name: "bulkWrite"
|
276
|
+
arguments:
|
277
|
+
requests:
|
278
|
+
-
|
279
|
+
name: "updateOne"
|
280
|
+
arguments:
|
281
|
+
filter: { _id: 1 }
|
282
|
+
update: { $inc: { x : 1 }}
|
283
|
+
-
|
284
|
+
name: "insertOne"
|
285
|
+
arguments:
|
286
|
+
document: { _id: 2, x: 22 }
|
287
|
+
-
|
288
|
+
name: "updateOne"
|
289
|
+
arguments:
|
290
|
+
filter: { _id: 2 }
|
291
|
+
update: { $inc: { x : 1 }}
|
292
|
+
options: { ordered: true }
|
293
|
+
outcome:
|
294
|
+
error: true
|
295
|
+
result:
|
296
|
+
deletedCount: 0
|
297
|
+
insertedIds: { 0: 2 }
|
298
|
+
matchedCount: 1
|
299
|
+
modifiedCount: 1
|
300
|
+
upsertedCount: 0
|
301
|
+
upsertedIds: { }
|
302
|
+
collection:
|
303
|
+
data:
|
304
|
+
- { _id: 1, x: 12 }
|
305
|
+
- { _id: 2, x: 22 }
|