mongo 2.8.0 → 2.9.0.rc0
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/Rakefile +12 -0
- data/lib/mongo.rb +15 -1
- data/lib/mongo/address/ipv6.rb +0 -2
- data/lib/mongo/auth/scram/conversation.rb +0 -3
- data/lib/mongo/bulk_write/result_combiner.rb +12 -2
- data/lib/mongo/client.rb +59 -6
- data/lib/mongo/cluster.rb +19 -8
- data/lib/mongo/cluster/reapers/cursor_reaper.rb +0 -2
- data/lib/mongo/cluster/reapers/socket_reaper.rb +12 -9
- data/lib/mongo/collection.rb +1 -1
- data/lib/mongo/collection/view/aggregation.rb +5 -1
- data/lib/mongo/collection/view/builder/map_reduce.rb +1 -1
- data/lib/mongo/collection/view/change_stream.rb +30 -10
- data/lib/mongo/collection/view/iterable.rb +13 -6
- data/lib/mongo/collection/view/map_reduce.rb +12 -10
- data/lib/mongo/collection/view/readable.rb +19 -14
- data/lib/mongo/cursor.rb +12 -8
- data/lib/mongo/database.rb +10 -7
- data/lib/mongo/database/view.rb +18 -11
- data/lib/mongo/error.rb +2 -2
- data/lib/mongo/error/connection_check_out_timeout.rb +49 -0
- data/lib/mongo/error/operation_failure.rb +9 -9
- data/lib/mongo/error/parser.rb +25 -3
- data/lib/mongo/error/pool_closed_error.rb +43 -0
- data/lib/mongo/error/sdam_error_detection.rb +18 -0
- data/lib/mongo/grid/file/chunk.rb +0 -2
- data/lib/mongo/grid/fs_bucket.rb +26 -12
- data/lib/mongo/grid/stream/read.rb +36 -21
- data/lib/mongo/index/view.rb +11 -7
- data/lib/mongo/logger.rb +0 -2
- data/lib/mongo/monitoring.rb +31 -0
- data/lib/mongo/monitoring/cmap_log_subscriber.rb +53 -0
- data/lib/mongo/monitoring/event.rb +1 -0
- data/lib/mongo/monitoring/event/cmap.rb +25 -0
- data/lib/mongo/monitoring/event/cmap/base.rb +28 -0
- data/lib/mongo/monitoring/event/cmap/connection_check_out_failed.rb +78 -0
- data/lib/mongo/monitoring/event/cmap/connection_check_out_started.rb +56 -0
- data/lib/mongo/monitoring/event/cmap/connection_checked_in.rb +63 -0
- data/lib/mongo/monitoring/event/cmap/connection_checked_out.rb +64 -0
- data/lib/mongo/monitoring/event/cmap/connection_closed.rb +103 -0
- data/lib/mongo/monitoring/event/cmap/connection_created.rb +64 -0
- data/lib/mongo/monitoring/event/cmap/connection_ready.rb +64 -0
- data/lib/mongo/monitoring/event/cmap/pool_cleared.rb +57 -0
- data/lib/mongo/monitoring/event/cmap/pool_closed.rb +57 -0
- data/lib/mongo/monitoring/event/cmap/pool_created.rb +63 -0
- data/lib/mongo/monitoring/event/command_started.rb +12 -3
- data/lib/mongo/monitoring/publishable.rb +10 -2
- data/lib/mongo/operation.rb +0 -1
- data/lib/mongo/operation/find/legacy/result.rb +1 -0
- data/lib/mongo/operation/list_collections/result.rb +7 -1
- data/lib/mongo/operation/result.rb +10 -1
- data/lib/mongo/operation/shared/executable.rb +15 -0
- data/lib/mongo/operation/shared/result/use_legacy_error_parser.rb +29 -0
- data/lib/mongo/operation/shared/specifiable.rb +0 -16
- data/lib/mongo/operation/update/legacy/result.rb +1 -0
- data/lib/mongo/protocol/compressed.rb +0 -2
- data/lib/mongo/protocol/msg.rb +25 -2
- data/lib/mongo/retryable.rb +171 -33
- data/lib/mongo/server.rb +26 -7
- data/lib/mongo/server/app_metadata.rb +0 -2
- data/lib/mongo/server/connectable.rb +8 -2
- data/lib/mongo/server/connection.rb +83 -13
- data/lib/mongo/server/connection_base.rb +1 -1
- data/lib/mongo/server/connection_pool.rb +439 -43
- data/lib/mongo/server/monitor/connection.rb +4 -1
- data/lib/mongo/session.rb +37 -5
- data/lib/mongo/session/session_pool.rb +2 -2
- data/lib/mongo/socket.rb +0 -2
- data/lib/mongo/socket/ssl.rb +0 -2
- data/lib/mongo/uri.rb +127 -66
- data/lib/mongo/uri/srv_protocol.rb +35 -13
- data/lib/mongo/version.rb +1 -1
- data/spec/README.md +190 -63
- data/spec/integration/change_stream_spec.rb +64 -0
- data/spec/integration/command_spec.rb +0 -7
- data/spec/integration/error_detection_spec.rb +39 -0
- data/spec/integration/read_concern.rb +83 -0
- data/spec/integration/retryable_writes_spec.rb +6 -50
- data/spec/integration/sdam_error_handling_spec.rb +60 -7
- data/spec/integration/ssl_uri_options_spec.rb +24 -0
- data/spec/integration/step_down_spec.rb +197 -0
- data/spec/lite_spec_helper.rb +4 -0
- data/spec/mongo/client_construction_spec.rb +42 -17
- data/spec/mongo/client_spec.rb +32 -1
- data/spec/mongo/cluster/socket_reaper_spec.rb +2 -2
- data/spec/mongo/cluster_spec.rb +36 -2
- data/spec/mongo/collection/view/aggregation_spec.rb +2 -0
- data/spec/mongo/collection/view/change_stream_spec.rb +28 -28
- data/spec/mongo/collection/view/readable_spec.rb +1 -1
- data/spec/mongo/collection/view_spec.rb +3 -1
- data/spec/mongo/cursor_spec.rb +5 -5
- data/spec/mongo/error/parser_spec.rb +61 -1
- data/spec/mongo/grid/stream/read_spec.rb +2 -2
- data/spec/mongo/monitoring/event/cmap/connection_check_out_failed_spec.rb +23 -0
- data/spec/mongo/monitoring/event/cmap/connection_check_out_started_spec.rb +19 -0
- data/spec/mongo/monitoring/event/cmap/connection_checked_in_spec.rb +23 -0
- data/spec/mongo/monitoring/event/cmap/connection_checked_out_spec.rb +23 -0
- data/spec/mongo/monitoring/event/cmap/connection_closed_spec.rb +27 -0
- data/spec/mongo/monitoring/event/cmap/connection_created_spec.rb +24 -0
- data/spec/mongo/monitoring/event/cmap/connection_ready_spec.rb +24 -0
- data/spec/mongo/monitoring/event/cmap/pool_cleared_spec.rb +19 -0
- data/spec/mongo/monitoring/event/cmap/pool_closed_spec.rb +19 -0
- data/spec/mongo/monitoring/event/cmap/pool_created_spec.rb +26 -0
- data/spec/mongo/operation/delete/bulk_spec.rb +1 -6
- data/spec/mongo/operation/delete/command_spec.rb +1 -1
- data/spec/mongo/operation/delete/op_msg_spec.rb +1 -1
- data/spec/mongo/operation/delete_spec.rb +4 -4
- data/spec/mongo/operation/insert/bulk_spec.rb +1 -1
- data/spec/mongo/operation/insert/command_spec.rb +1 -1
- data/spec/mongo/operation/insert/op_msg_spec.rb +1 -1
- data/spec/mongo/operation/update/bulk_spec.rb +1 -1
- data/spec/mongo/operation/update/command_spec.rb +2 -2
- data/spec/mongo/operation/update/op_msg_spec.rb +2 -2
- data/spec/mongo/protocol/msg_spec.rb +11 -0
- data/spec/mongo/retryable_spec.rb +78 -25
- data/spec/mongo/server/connection_pool_spec.rb +661 -126
- data/spec/mongo/server/connection_spec.rb +55 -7
- data/spec/mongo/server_spec.rb +5 -0
- data/spec/mongo/uri/srv_protocol_spec.rb +135 -2
- data/spec/mongo/uri_option_parsing_spec.rb +511 -0
- data/spec/mongo/uri_spec.rb +42 -6
- data/spec/spec_helper.rb +1 -84
- data/spec/spec_tests/cmap_spec.rb +50 -0
- data/spec/spec_tests/command_monitoring_spec.rb +7 -18
- data/spec/spec_tests/crud_spec.rb +3 -49
- data/spec/spec_tests/data/cmap/connection-must-have-id.yml +21 -0
- data/spec/spec_tests/data/cmap/connection-must-order-ids.yml +21 -0
- data/spec/spec_tests/data/cmap/pool-checkin-destroy-closed.yml +24 -0
- data/spec/spec_tests/data/cmap/pool-checkin-destroy-stale.yml +24 -0
- data/spec/spec_tests/data/cmap/pool-checkin-make-available.yml +21 -0
- data/spec/spec_tests/data/cmap/pool-checkin.yml +18 -0
- data/spec/spec_tests/data/cmap/pool-checkout-connection.yml +13 -0
- data/spec/spec_tests/data/cmap/pool-checkout-error-closed.yml +28 -0
- data/spec/spec_tests/data/cmap/pool-checkout-multiple.yml +34 -0
- data/spec/spec_tests/data/cmap/pool-checkout-no-idle.yml +31 -0
- data/spec/spec_tests/data/cmap/pool-checkout-no-stale.yml +29 -0
- data/spec/spec_tests/data/cmap/pool-close-destroy-conns.yml +26 -0
- data/spec/spec_tests/data/cmap/pool-close.yml +11 -0
- data/spec/spec_tests/data/cmap/pool-create-max-size.yml +56 -0
- data/spec/spec_tests/data/cmap/pool-create-min-size.yml +27 -0
- data/spec/spec_tests/data/cmap/pool-create-with-options.yml +20 -0
- data/spec/spec_tests/data/cmap/pool-create.yml +12 -0
- data/spec/spec_tests/data/cmap/wait-queue-fairness.yml +94 -0
- data/spec/spec_tests/data/cmap/wait-queue-timeout.yml +41 -0
- data/spec/spec_tests/data/retryable_reads/aggregate-serverErrors.yml +157 -0
- data/spec/spec_tests/data/retryable_reads/aggregate.yml +87 -0
- data/spec/spec_tests/data/retryable_reads/changeStreams-client.watch-serverErrors.yml +149 -0
- data/spec/spec_tests/data/retryable_reads/changeStreams-client.watch.yml +61 -0
- data/spec/spec_tests/data/retryable_reads/changeStreams-db.coll.watch-serverErrors.yml +149 -0
- data/spec/spec_tests/data/retryable_reads/changeStreams-db.coll.watch.yml +65 -0
- data/spec/spec_tests/data/retryable_reads/changeStreams-db.watch-serverErrors.yml +153 -0
- data/spec/spec_tests/data/retryable_reads/changeStreams-db.watch.yml +61 -0
- data/spec/spec_tests/data/retryable_reads/count-serverErrors.yml +150 -0
- data/spec/spec_tests/data/retryable_reads/count.yml +64 -0
- data/spec/spec_tests/data/retryable_reads/countDocuments-serverErrors.yml +150 -0
- data/spec/spec_tests/data/retryable_reads/countDocuments.yml +64 -0
- data/spec/spec_tests/data/retryable_reads/distinct-serverErrors.yml +156 -0
- data/spec/spec_tests/data/retryable_reads/distinct.yml +71 -0
- data/spec/spec_tests/data/retryable_reads/estimatedDocumentCount-serverErrors.yml +148 -0
- data/spec/spec_tests/data/retryable_reads/estimatedDocumentCount.yml +62 -0
- data/spec/spec_tests/data/retryable_reads/find-serverErrors.yml +160 -0
- data/spec/spec_tests/data/retryable_reads/find.yml +86 -0
- data/spec/spec_tests/data/retryable_reads/findOne-serverErrors.yml +154 -0
- data/spec/spec_tests/data/retryable_reads/findOne.yml +68 -0
- data/spec/spec_tests/data/retryable_reads/gridfs-download-serverErrors.yml +173 -0
- data/spec/spec_tests/data/retryable_reads/gridfs-download.yml +79 -0
- data/spec/spec_tests/data/retryable_reads/gridfs-downloadByName-serverErrors.yml +174 -0
- data/spec/spec_tests/data/retryable_reads/gridfs-downloadByName.yml +79 -0
- data/spec/spec_tests/data/retryable_reads/listCollectionNames-serverErrors.yml +143 -0
- data/spec/spec_tests/data/retryable_reads/listCollectionNames.yml +59 -0
- data/spec/spec_tests/data/retryable_reads/listCollectionObjects-serverErrors.yml +144 -0
- data/spec/spec_tests/data/retryable_reads/listCollectionObjects.yml +59 -0
- data/spec/spec_tests/data/retryable_reads/listCollections-serverErrors.yml +143 -0
- data/spec/spec_tests/data/retryable_reads/listCollections.yml +59 -0
- data/spec/spec_tests/data/retryable_reads/listDatabaseNames-serverErrors.yml +143 -0
- data/spec/spec_tests/data/retryable_reads/listDatabaseNames.yml +59 -0
- data/spec/spec_tests/data/retryable_reads/listDatabaseObjects-serverErrors.yml +144 -0
- data/spec/spec_tests/data/retryable_reads/listDatabaseObjects.yml +59 -0
- data/spec/spec_tests/data/retryable_reads/listDatabases-serverErrors.yml +144 -0
- data/spec/spec_tests/data/retryable_reads/listDatabases.yml +59 -0
- data/spec/spec_tests/data/retryable_reads/listIndexNames-serverErrors.yml +144 -0
- data/spec/spec_tests/data/retryable_reads/listIndexNames.yml +60 -0
- data/spec/spec_tests/data/retryable_reads/listIndexes-serverErrors.yml +145 -0
- data/spec/spec_tests/data/retryable_reads/listIndexes.yml +60 -0
- data/spec/spec_tests/data/retryable_reads/mapReduce.yml +60 -0
- data/spec/spec_tests/data/retryable_writes/bulkWrite-serverErrors.yml +10 -7
- data/spec/spec_tests/data/retryable_writes/bulkWrite.yml +15 -22
- data/spec/spec_tests/data/retryable_writes/deleteMany.yml +22 -0
- data/spec/spec_tests/data/retryable_writes/deleteOne-serverErrors.yml +8 -7
- data/spec/spec_tests/data/retryable_writes/deleteOne.yml +5 -8
- data/spec/spec_tests/data/retryable_writes/findOneAndDelete-serverErrors.yml +8 -7
- data/spec/spec_tests/data/retryable_writes/findOneAndDelete.yml +5 -8
- data/spec/spec_tests/data/retryable_writes/findOneAndReplace-serverErrors.yml +8 -7
- data/spec/spec_tests/data/retryable_writes/findOneAndReplace.yml +5 -8
- data/spec/spec_tests/data/retryable_writes/findOneAndUpdate-serverErrors.yml +8 -7
- data/spec/spec_tests/data/retryable_writes/findOneAndUpdate.yml +5 -8
- data/spec/spec_tests/data/retryable_writes/insertMany-serverErrors.yml +8 -7
- data/spec/spec_tests/data/retryable_writes/insertMany.yml +5 -8
- data/spec/spec_tests/data/retryable_writes/insertOne-serverErrors.yml +10 -45
- data/spec/spec_tests/data/retryable_writes/insertOne.yml +5 -8
- data/spec/spec_tests/data/retryable_writes/replaceOne-serverErrors.yml +8 -7
- data/spec/spec_tests/data/retryable_writes/replaceOne.yml +5 -8
- data/spec/spec_tests/data/retryable_writes/updateMany.yml +27 -0
- data/spec/spec_tests/data/retryable_writes/updateOne-serverErrors.yml +8 -7
- data/spec/spec_tests/data/retryable_writes/updateOne.yml +5 -14
- data/spec/spec_tests/data/transactions/abort.yml +7 -2
- data/spec/spec_tests/data/transactions/bulk.yml +7 -2
- data/spec/spec_tests/data/transactions/causal-consistency.yml +11 -4
- data/spec/spec_tests/data/transactions/commit.yml +11 -4
- data/spec/spec_tests/data/transactions/count.yml +64 -0
- data/spec/spec_tests/data/transactions/delete.yml +7 -2
- data/spec/spec_tests/data/transactions/error-labels.yml +8 -2
- data/spec/spec_tests/data/transactions/errors.yml +7 -2
- data/spec/spec_tests/data/transactions/findOneAndDelete.yml +7 -2
- data/spec/spec_tests/data/transactions/findOneAndReplace.yml +7 -2
- data/spec/spec_tests/data/transactions/findOneAndUpdate.yml +7 -2
- data/spec/spec_tests/data/transactions/insert.yml +9 -2
- data/spec/spec_tests/data/transactions/isolation.yml +7 -2
- data/spec/spec_tests/data/transactions/read-concern.yml +15 -6
- data/spec/spec_tests/data/transactions/read-pref.yml +7 -2
- data/spec/spec_tests/data/transactions/reads.yml +8 -48
- data/spec/spec_tests/data/transactions/retryable-abort.yml +7 -2
- data/spec/spec_tests/data/transactions/retryable-commit.yml +7 -2
- data/spec/spec_tests/data/transactions/retryable-writes.yml +7 -2
- data/spec/spec_tests/data/transactions/run-command.yml +7 -2
- data/spec/spec_tests/data/transactions/transaction-options.yml +7 -2
- data/spec/spec_tests/data/transactions/update.yml +7 -2
- data/spec/spec_tests/data/transactions/write-concern.yml +7 -2
- data/spec/spec_tests/data/transactions_api/callback-aborts.yml +6 -1
- data/spec/spec_tests/data/transactions_api/callback-commits.yml +6 -1
- data/spec/spec_tests/data/transactions_api/callback-retry.yml +6 -1
- data/spec/spec_tests/data/transactions_api/commit-retry.yml +6 -1
- data/spec/spec_tests/data/transactions_api/commit-transienttransactionerror-4.2.yml +6 -3
- data/spec/spec_tests/data/transactions_api/commit-transienttransactionerror.yml +6 -1
- data/spec/spec_tests/data/transactions_api/commit-writeconcernerror.yml +6 -1
- data/spec/spec_tests/data/transactions_api/commit.yml +6 -1
- data/spec/spec_tests/data/transactions_api/transaction-options.yml +6 -1
- data/spec/spec_tests/retryable_reads_spec.rb +11 -0
- data/spec/spec_tests/retryable_writes_spec.rb +4 -69
- data/spec/spec_tests/transactions_api_spec.rb +42 -37
- data/spec/spec_tests/transactions_spec.rb +42 -33
- data/spec/support/authorization.rb +12 -0
- data/spec/support/change_streams/operation.rb +1 -1
- data/spec/support/client_registry.rb +20 -0
- data/spec/support/cluster_config.rb +16 -15
- data/spec/support/cluster_tools.rb +346 -0
- data/spec/support/cmap.rb +367 -0
- data/spec/support/cmap/verifier.rb +46 -0
- data/spec/support/command_monitoring.rb +4 -6
- data/spec/support/common_shortcuts.rb +6 -0
- data/spec/support/connection_string.rb +2 -2
- data/spec/support/crud.rb +171 -184
- data/spec/support/crud/operation.rb +43 -0
- data/spec/support/crud/outcome.rb +53 -0
- data/spec/support/crud/read.rb +102 -12
- data/spec/support/crud/requirement.rb +69 -0
- data/spec/support/crud/spec.rb +68 -0
- data/spec/support/crud/test.rb +141 -0
- data/spec/support/crud/verifier.rb +96 -18
- data/spec/support/crud/write.rb +18 -3
- data/spec/support/event_subscriber.rb +15 -0
- data/spec/support/primary_socket.rb +2 -2
- data/spec/support/spec_config.rb +89 -20
- data/spec/support/transactions.rb +2 -306
- data/spec/support/transactions/operation.rb +7 -7
- data/spec/support/transactions/spec.rb +28 -0
- data/spec/support/transactions/test.rb +191 -0
- data/spec/support/utils.rb +123 -0
- metadata +202 -9
- metadata.gz.sig +0 -0
- data/lib/mongo/server/connection_pool/queue.rb +0 -359
- data/spec/mongo/server/connection_pool/queue_spec.rb +0 -353
- data/spec/support/transactions/verifier.rb +0 -97
@@ -1,15 +1,18 @@
|
|
1
|
+
runOn:
|
2
|
+
-
|
3
|
+
minServerVersion: "4.0"
|
4
|
+
topology: ["replicaset"]
|
5
|
+
-
|
6
|
+
minServerVersion: "4.1.7"
|
7
|
+
topology: ["sharded"]
|
8
|
+
|
1
9
|
data:
|
2
10
|
- { _id: 1, x: 11 }
|
3
11
|
- { _id: 2, x: 22 }
|
4
12
|
|
5
|
-
# TODO: this should change to 4.0 once 4.0.0 is released.
|
6
|
-
minServerVersion: '3.99'
|
7
|
-
|
8
13
|
tests:
|
9
14
|
-
|
10
15
|
description: "FindOneAndUpdate succeeds after PrimarySteppedDown"
|
11
|
-
clientOptions:
|
12
|
-
retryWrites: true
|
13
16
|
failPoint:
|
14
17
|
configureFailPoint: failCommand
|
15
18
|
mode: { times: 1 }
|
@@ -30,8 +33,6 @@ tests:
|
|
30
33
|
- { _id: 2, x: 22 }
|
31
34
|
-
|
32
35
|
description: "FindOneAndUpdate succeeds after WriteConcernError ShutdownInProgress"
|
33
|
-
clientOptions:
|
34
|
-
retryWrites: true
|
35
36
|
failPoint:
|
36
37
|
configureFailPoint: failCommand
|
37
38
|
mode: { times: 1 }
|
@@ -1,14 +1,15 @@
|
|
1
|
+
runOn:
|
2
|
+
-
|
3
|
+
minServerVersion: "3.6"
|
4
|
+
topology: ["replicaset"]
|
5
|
+
|
1
6
|
data:
|
2
7
|
- { _id: 1, x: 11 }
|
3
8
|
- { _id: 2, x: 22 }
|
4
9
|
|
5
|
-
minServerVersion: '3.6'
|
6
|
-
|
7
10
|
tests:
|
8
11
|
-
|
9
12
|
description: "FindOneAndUpdate is committed on first attempt"
|
10
|
-
clientOptions:
|
11
|
-
retryWrites: true
|
12
13
|
failPoint:
|
13
14
|
configureFailPoint: onPrimaryTransactionalWrite
|
14
15
|
mode: { times: 1 }
|
@@ -26,8 +27,6 @@ tests:
|
|
26
27
|
- { _id: 2, x: 22 }
|
27
28
|
-
|
28
29
|
description: "FindOneAndUpdate is not committed on first attempt"
|
29
|
-
clientOptions:
|
30
|
-
retryWrites: true
|
31
30
|
failPoint:
|
32
31
|
configureFailPoint: onPrimaryTransactionalWrite
|
33
32
|
mode: { times: 1 }
|
@@ -46,8 +45,6 @@ tests:
|
|
46
45
|
- { _id: 2, x: 22 }
|
47
46
|
-
|
48
47
|
description: "FindOneAndUpdate is never committed"
|
49
|
-
clientOptions:
|
50
|
-
retryWrites: true
|
51
48
|
failPoint:
|
52
49
|
configureFailPoint: onPrimaryTransactionalWrite
|
53
50
|
mode: { times: 2 }
|
@@ -1,14 +1,17 @@
|
|
1
|
+
runOn:
|
2
|
+
-
|
3
|
+
minServerVersion: "4.0"
|
4
|
+
topology: ["replicaset"]
|
5
|
+
-
|
6
|
+
minServerVersion: "4.1.7"
|
7
|
+
topology: ["sharded"]
|
8
|
+
|
1
9
|
data:
|
2
10
|
- { _id: 1, x: 11 }
|
3
11
|
|
4
|
-
# TODO: this should change to 4.0 once 4.0.0 is released.
|
5
|
-
minServerVersion: '3.99'
|
6
|
-
|
7
12
|
tests:
|
8
13
|
-
|
9
14
|
description: "InsertMany succeeds after PrimarySteppedDown"
|
10
|
-
clientOptions:
|
11
|
-
retryWrites: true
|
12
15
|
failPoint:
|
13
16
|
configureFailPoint: failCommand
|
14
17
|
mode: { times: 1 }
|
@@ -32,8 +35,6 @@ tests:
|
|
32
35
|
- { _id: 3, x: 33 }
|
33
36
|
-
|
34
37
|
description: "InsertMany succeeds after WriteConcernError ShutdownInProgress"
|
35
|
-
clientOptions:
|
36
|
-
retryWrites: true
|
37
38
|
failPoint:
|
38
39
|
configureFailPoint: failCommand
|
39
40
|
mode: { times: 1 }
|
@@ -1,13 +1,14 @@
|
|
1
|
+
runOn:
|
2
|
+
-
|
3
|
+
minServerVersion: "3.6"
|
4
|
+
topology: ["replicaset"]
|
5
|
+
|
1
6
|
data:
|
2
7
|
- { _id: 1, x: 11 }
|
3
8
|
|
4
|
-
minServerVersion: '3.6'
|
5
|
-
|
6
9
|
tests:
|
7
10
|
-
|
8
11
|
description: "InsertMany succeeds after one network error"
|
9
|
-
clientOptions:
|
10
|
-
retryWrites: true
|
11
12
|
failPoint:
|
12
13
|
configureFailPoint: onPrimaryTransactionalWrite
|
13
14
|
mode: { times: 1 }
|
@@ -28,8 +29,6 @@ tests:
|
|
28
29
|
- { _id: 3, x: 33 }
|
29
30
|
-
|
30
31
|
description: "InsertMany with unordered execution"
|
31
|
-
clientOptions:
|
32
|
-
retryWrites: true
|
33
32
|
failPoint:
|
34
33
|
configureFailPoint: onPrimaryTransactionalWrite
|
35
34
|
mode: { times: 1 }
|
@@ -50,8 +49,6 @@ tests:
|
|
50
49
|
- { _id: 3, x: 33 }
|
51
50
|
-
|
52
51
|
description: "InsertMany fails after multiple network errors"
|
53
|
-
clientOptions:
|
54
|
-
retryWrites: true
|
55
52
|
failPoint:
|
56
53
|
# Normally, a mongod will insert the documents as a batch with a
|
57
54
|
# single commit. If this fails, mongod may try to insert each
|
@@ -1,15 +1,18 @@
|
|
1
|
+
runOn:
|
2
|
+
-
|
3
|
+
minServerVersion: "4.0"
|
4
|
+
topology: ["replicaset"]
|
5
|
+
-
|
6
|
+
minServerVersion: "4.1.7"
|
7
|
+
topology: ["sharded"]
|
8
|
+
|
1
9
|
data:
|
2
10
|
- { _id: 1, x: 11 }
|
3
11
|
- { _id: 2, x: 22 }
|
4
12
|
|
5
|
-
# TODO: this should change to 4.0 once 4.0.0 is released.
|
6
|
-
minServerVersion: '3.99'
|
7
|
-
|
8
13
|
tests:
|
9
14
|
-
|
10
15
|
description: "InsertOne succeeds after connection failure"
|
11
|
-
clientOptions:
|
12
|
-
retryWrites: true
|
13
16
|
failPoint:
|
14
17
|
configureFailPoint: failCommand
|
15
18
|
mode: { times: 1 }
|
@@ -30,8 +33,6 @@ tests:
|
|
30
33
|
- { _id: 3, x: 33 }
|
31
34
|
-
|
32
35
|
description: "InsertOne succeeds after NotMaster"
|
33
|
-
clientOptions:
|
34
|
-
retryWrites: true
|
35
36
|
failPoint:
|
36
37
|
configureFailPoint: failCommand
|
37
38
|
mode: { times: 1 }
|
@@ -53,8 +54,6 @@ tests:
|
|
53
54
|
- { _id: 3, x: 33 }
|
54
55
|
-
|
55
56
|
description: "InsertOne succeeds after NotMasterOrSecondary"
|
56
|
-
clientOptions:
|
57
|
-
retryWrites: true
|
58
57
|
failPoint:
|
59
58
|
configureFailPoint: failCommand
|
60
59
|
mode: { times: 1 }
|
@@ -76,8 +75,6 @@ tests:
|
|
76
75
|
- { _id: 3, x: 33 }
|
77
76
|
-
|
78
77
|
description: "InsertOne succeeds after NotMasterNoSlaveOk"
|
79
|
-
clientOptions:
|
80
|
-
retryWrites: true
|
81
78
|
failPoint:
|
82
79
|
configureFailPoint: failCommand
|
83
80
|
mode: { times: 1 }
|
@@ -98,9 +95,7 @@ tests:
|
|
98
95
|
- { _id: 2, x: 22 }
|
99
96
|
- { _id: 3, x: 33 }
|
100
97
|
-
|
101
|
-
description: "InsertOne succeeds after
|
102
|
-
clientOptions:
|
103
|
-
retryWrites: true
|
98
|
+
description: "InsertOne succeeds after InterruptedDueToStepDown"
|
104
99
|
failPoint:
|
105
100
|
configureFailPoint: failCommand
|
106
101
|
mode: { times: 1 }
|
@@ -122,8 +117,6 @@ tests:
|
|
122
117
|
- { _id: 3, x: 33 }
|
123
118
|
-
|
124
119
|
description: "InsertOne succeeds after InterruptedAtShutdown"
|
125
|
-
clientOptions:
|
126
|
-
retryWrites: true
|
127
120
|
failPoint:
|
128
121
|
configureFailPoint: failCommand
|
129
122
|
mode: { times: 1 }
|
@@ -145,8 +138,6 @@ tests:
|
|
145
138
|
- { _id: 3, x: 33 }
|
146
139
|
-
|
147
140
|
description: "InsertOne succeeds after PrimarySteppedDown"
|
148
|
-
clientOptions:
|
149
|
-
retryWrites: true
|
150
141
|
failPoint:
|
151
142
|
configureFailPoint: failCommand
|
152
143
|
mode: { times: 1 }
|
@@ -168,8 +159,6 @@ tests:
|
|
168
159
|
- { _id: 3, x: 33 }
|
169
160
|
-
|
170
161
|
description: "InsertOne succeeds after ShutdownInProgress"
|
171
|
-
clientOptions:
|
172
|
-
retryWrites: true
|
173
162
|
failPoint:
|
174
163
|
configureFailPoint: failCommand
|
175
164
|
mode: { times: 1 }
|
@@ -191,8 +180,6 @@ tests:
|
|
191
180
|
- { _id: 3, x: 33 }
|
192
181
|
-
|
193
182
|
description: "InsertOne succeeds after HostNotFound"
|
194
|
-
clientOptions:
|
195
|
-
retryWrites: true
|
196
183
|
failPoint:
|
197
184
|
configureFailPoint: failCommand
|
198
185
|
mode: { times: 1 }
|
@@ -214,8 +201,6 @@ tests:
|
|
214
201
|
- { _id: 3, x: 33 }
|
215
202
|
-
|
216
203
|
description: "InsertOne succeeds after HostUnreachable"
|
217
|
-
clientOptions:
|
218
|
-
retryWrites: true
|
219
204
|
failPoint:
|
220
205
|
configureFailPoint: failCommand
|
221
206
|
mode: { times: 1 }
|
@@ -237,8 +222,6 @@ tests:
|
|
237
222
|
- { _id: 3, x: 33 }
|
238
223
|
-
|
239
224
|
description: "InsertOne succeeds after SocketException"
|
240
|
-
clientOptions:
|
241
|
-
retryWrites: true
|
242
225
|
failPoint:
|
243
226
|
configureFailPoint: failCommand
|
244
227
|
mode: { times: 1 }
|
@@ -260,8 +243,6 @@ tests:
|
|
260
243
|
- { _id: 3, x: 33 }
|
261
244
|
-
|
262
245
|
description: "InsertOne succeeds after NetworkTimeout"
|
263
|
-
clientOptions:
|
264
|
-
retryWrites: true
|
265
246
|
failPoint:
|
266
247
|
configureFailPoint: failCommand
|
267
248
|
mode: { times: 1 }
|
@@ -283,8 +264,6 @@ tests:
|
|
283
264
|
- { _id: 3, x: 33 }
|
284
265
|
-
|
285
266
|
description: "InsertOne fails after Interrupted"
|
286
|
-
clientOptions:
|
287
|
-
retryWrites: true
|
288
267
|
failPoint:
|
289
268
|
configureFailPoint: failCommand
|
290
269
|
mode: { times: 1 }
|
@@ -304,8 +283,6 @@ tests:
|
|
304
283
|
- { _id: 2, x: 22 }
|
305
284
|
-
|
306
285
|
description: "InsertOne succeeds after WriteConcernError InterruptedAtShutdown"
|
307
|
-
clientOptions:
|
308
|
-
retryWrites: true
|
309
286
|
failPoint:
|
310
287
|
configureFailPoint: failCommand
|
311
288
|
mode: { times: 1 }
|
@@ -327,9 +304,7 @@ tests:
|
|
327
304
|
- { _id: 2, x: 22 }
|
328
305
|
- { _id: 3, x: 33 }
|
329
306
|
-
|
330
|
-
description: "InsertOne succeeds after WriteConcernError
|
331
|
-
clientOptions:
|
332
|
-
retryWrites: true
|
307
|
+
description: "InsertOne succeeds after WriteConcernError InterruptedDueToStepDown"
|
333
308
|
failPoint:
|
334
309
|
configureFailPoint: failCommand
|
335
310
|
mode: { times: 1 }
|
@@ -352,8 +327,6 @@ tests:
|
|
352
327
|
- { _id: 3, x: 33 }
|
353
328
|
-
|
354
329
|
description: "InsertOne succeeds after WriteConcernError PrimarySteppedDown"
|
355
|
-
clientOptions:
|
356
|
-
retryWrites: true
|
357
330
|
failPoint:
|
358
331
|
configureFailPoint: failCommand
|
359
332
|
mode: { times: 1 }
|
@@ -376,8 +349,6 @@ tests:
|
|
376
349
|
- { _id: 3, x: 33 }
|
377
350
|
-
|
378
351
|
description: "InsertOne succeeds after WriteConcernError ShutdownInProgress"
|
379
|
-
clientOptions:
|
380
|
-
retryWrites: true
|
381
352
|
failPoint:
|
382
353
|
configureFailPoint: failCommand
|
383
354
|
mode: { times: 1 }
|
@@ -400,8 +371,6 @@ tests:
|
|
400
371
|
- { _id: 3, x: 33 }
|
401
372
|
-
|
402
373
|
description: "InsertOne fails after multiple retryable writeConcernErrors"
|
403
|
-
clientOptions:
|
404
|
-
retryWrites: true
|
405
374
|
failPoint:
|
406
375
|
configureFailPoint: failCommand
|
407
376
|
mode: { times: 2 }
|
@@ -423,8 +392,6 @@ tests:
|
|
423
392
|
- { _id: 3, x: 33 } # The write was still applied.
|
424
393
|
-
|
425
394
|
description: "InsertOne fails after WriteConcernError Interrupted"
|
426
|
-
clientOptions:
|
427
|
-
retryWrites: true
|
428
395
|
failPoint:
|
429
396
|
configureFailPoint: failCommand
|
430
397
|
mode: { times: 1 }
|
@@ -446,8 +413,6 @@ tests:
|
|
446
413
|
- { _id: 3, x: 33 } # The write was still applied.
|
447
414
|
-
|
448
415
|
description: "InsertOne fails after WriteConcernError WriteConcernFailed"
|
449
|
-
clientOptions:
|
450
|
-
retryWrites: true
|
451
416
|
failPoint:
|
452
417
|
configureFailPoint: failCommand
|
453
418
|
mode: { times: 1 }
|
@@ -1,14 +1,15 @@
|
|
1
|
+
runOn:
|
2
|
+
-
|
3
|
+
minServerVersion: "3.6"
|
4
|
+
topology: ["replicaset"]
|
5
|
+
|
1
6
|
data:
|
2
7
|
- { _id: 1, x: 11 }
|
3
8
|
- { _id: 2, x: 22 }
|
4
9
|
|
5
|
-
minServerVersion: '3.6'
|
6
|
-
|
7
10
|
tests:
|
8
11
|
-
|
9
12
|
description: "InsertOne is committed on first attempt"
|
10
|
-
clientOptions:
|
11
|
-
retryWrites: true
|
12
13
|
failPoint:
|
13
14
|
configureFailPoint: onPrimaryTransactionalWrite
|
14
15
|
mode: { times: 1 }
|
@@ -26,8 +27,6 @@ tests:
|
|
26
27
|
- { _id: 3, x: 33 }
|
27
28
|
-
|
28
29
|
description: "InsertOne is not committed on first attempt"
|
29
|
-
clientOptions:
|
30
|
-
retryWrites: true
|
31
30
|
failPoint:
|
32
31
|
configureFailPoint: onPrimaryTransactionalWrite
|
33
32
|
mode: { times: 1 }
|
@@ -46,8 +45,6 @@ tests:
|
|
46
45
|
- { _id: 3, x: 33 }
|
47
46
|
-
|
48
47
|
description: "InsertOne is never committed"
|
49
|
-
clientOptions:
|
50
|
-
retryWrites: true
|
51
48
|
failPoint:
|
52
49
|
configureFailPoint: onPrimaryTransactionalWrite
|
53
50
|
mode: { times: 2 }
|
@@ -1,15 +1,18 @@
|
|
1
|
+
runOn:
|
2
|
+
-
|
3
|
+
minServerVersion: "4.0"
|
4
|
+
topology: ["replicaset"]
|
5
|
+
-
|
6
|
+
minServerVersion: "4.1.7"
|
7
|
+
topology: ["sharded"]
|
8
|
+
|
1
9
|
data:
|
2
10
|
- { _id: 1, x: 11 }
|
3
11
|
- { _id: 2, x: 22 }
|
4
12
|
|
5
|
-
# TODO: this should change to 4.0 once 4.0.0 is released.
|
6
|
-
minServerVersion: '3.99'
|
7
|
-
|
8
13
|
tests:
|
9
14
|
-
|
10
15
|
description: "ReplaceOne succeeds after PrimarySteppedDown"
|
11
|
-
clientOptions:
|
12
|
-
retryWrites: true
|
13
16
|
failPoint:
|
14
17
|
configureFailPoint: failCommand
|
15
18
|
mode: { times: 1 }
|
@@ -32,8 +35,6 @@ tests:
|
|
32
35
|
- { _id: 2, x: 22 }
|
33
36
|
-
|
34
37
|
description: "ReplaceOne succeeds after WriteConcernError ShutdownInProgress"
|
35
|
-
clientOptions:
|
36
|
-
retryWrites: true
|
37
38
|
failPoint:
|
38
39
|
configureFailPoint: failCommand
|
39
40
|
mode: { times: 1 }
|
@@ -1,14 +1,15 @@
|
|
1
|
+
runOn:
|
2
|
+
-
|
3
|
+
minServerVersion: "3.6"
|
4
|
+
topology: ["replicaset"]
|
5
|
+
|
1
6
|
data:
|
2
7
|
- { _id: 1, x: 11 }
|
3
8
|
- { _id: 2, x: 22 }
|
4
9
|
|
5
|
-
minServerVersion: '3.6'
|
6
|
-
|
7
10
|
tests:
|
8
11
|
-
|
9
12
|
description: "ReplaceOne is committed on first attempt"
|
10
|
-
clientOptions:
|
11
|
-
retryWrites: true
|
12
13
|
failPoint:
|
13
14
|
configureFailPoint: onPrimaryTransactionalWrite
|
14
15
|
mode: { times: 1 }
|
@@ -28,8 +29,6 @@ tests:
|
|
28
29
|
- { _id: 2, x: 22 }
|
29
30
|
-
|
30
31
|
description: "ReplaceOne is not committed on first attempt"
|
31
|
-
clientOptions:
|
32
|
-
retryWrites: true
|
33
32
|
failPoint:
|
34
33
|
configureFailPoint: onPrimaryTransactionalWrite
|
35
34
|
mode: { times: 1 }
|
@@ -50,8 +49,6 @@ tests:
|
|
50
49
|
- { _id: 2, x: 22 }
|
51
50
|
-
|
52
51
|
description: "ReplaceOne is never committed"
|
53
|
-
clientOptions:
|
54
|
-
retryWrites: true
|
55
52
|
failPoint:
|
56
53
|
configureFailPoint: onPrimaryTransactionalWrite
|
57
54
|
mode: { times: 2 }
|
@@ -0,0 +1,27 @@
|
|
1
|
+
runOn:
|
2
|
+
-
|
3
|
+
minServerVersion: "3.6"
|
4
|
+
topology: ["replicaset", "sharded"]
|
5
|
+
|
6
|
+
data:
|
7
|
+
- { _id: 1, x: 11 }
|
8
|
+
- { _id: 2, x: 22 }
|
9
|
+
|
10
|
+
tests:
|
11
|
+
-
|
12
|
+
description: "UpdateMany ignores retryWrites"
|
13
|
+
useMultipleMongoses: true
|
14
|
+
operation:
|
15
|
+
name: "updateMany"
|
16
|
+
arguments:
|
17
|
+
filter: { }
|
18
|
+
update: { $inc: { x : 1 }}
|
19
|
+
outcome:
|
20
|
+
result:
|
21
|
+
matchedCount: 2
|
22
|
+
modifiedCount: 2
|
23
|
+
upsertedCount: 0
|
24
|
+
collection:
|
25
|
+
data:
|
26
|
+
- { _id: 1, x: 12 }
|
27
|
+
- { _id: 2, x: 23 }
|