mongo 2.7.0 → 2.7.1
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/README.md +39 -14
- data/Rakefile +1 -0
- data/lib/mongo/auth.rb +4 -1
- data/lib/mongo/client.rb +4 -3
- data/lib/mongo/cluster.rb +1 -1
- data/lib/mongo/collection/view/readable.rb +5 -2
- data/lib/mongo/database.rb +1 -0
- data/lib/mongo/error/invalid_server_preference.rb +1 -0
- data/lib/mongo/error/operation_failure.rb +10 -0
- data/lib/mongo/error/parser.rb +10 -0
- data/lib/mongo/event.rb +1 -2
- data/lib/mongo/operation/result.rb +4 -1
- data/lib/mongo/operation/shared/executable_transaction_label.rb +3 -1
- data/lib/mongo/operation/shared/sessions_supported.rb +1 -1
- data/lib/mongo/protocol/msg.rb +1 -1
- data/lib/mongo/protocol/query.rb +2 -2
- data/lib/mongo/retryable.rb +20 -6
- data/lib/mongo/server.rb +6 -0
- data/lib/mongo/server/connection.rb +4 -4
- data/lib/mongo/server/monitor/connection.rb +9 -5
- data/lib/mongo/server_selector/selectable.rb +86 -32
- data/lib/mongo/session.rb +98 -15
- data/lib/mongo/version.rb +1 -1
- data/spec/README.md +85 -0
- data/spec/integration/bulk_insert_spec.rb +1 -1
- data/spec/integration/change_stream_examples_spec.rb +3 -1
- data/spec/integration/change_stream_spec.rb +10 -14
- data/spec/integration/client_construction_spec.rb +1 -0
- data/spec/integration/command_monitoring_spec.rb +37 -1
- data/spec/integration/command_spec.rb +141 -0
- data/spec/integration/connection_spec.rb +4 -2
- data/spec/integration/cursor_reaping_spec.rb +1 -1
- data/spec/integration/docs_examples_spec.rb +1 -1
- data/spec/integration/retryable_writes_spec.rb +33 -42
- data/spec/integration/server_description_spec.rb +3 -3
- data/spec/integration/server_selector_spec.rb +79 -0
- data/spec/lite_spec_helper.rb +4 -2
- data/spec/mongo/address_spec.rb +8 -0
- data/spec/mongo/auth/cr_spec.rb +5 -2
- data/spec/mongo/auth/invalid_mechanism_spec.rb +11 -0
- data/spec/mongo/auth/scram/conversation_spec.rb +3 -2
- data/spec/mongo/auth/scram/negotiation_spec.rb +1 -2
- data/spec/mongo/auth/scram_spec.rb +11 -6
- data/spec/mongo/auth/user/view_spec.rb +13 -6
- data/spec/mongo/bulk_write_spec.rb +81 -104
- data/spec/mongo/client_construction_spec.rb +18 -7
- data/spec/mongo/client_spec.rb +11 -7
- data/spec/mongo/cluster_spec.rb +30 -1
- data/spec/mongo/collection/view/aggregation_spec.rb +18 -10
- data/spec/mongo/collection/view/change_stream_spec.rb +28 -8
- data/spec/mongo/collection/view/map_reduce_spec.rb +24 -10
- data/spec/mongo/collection/view/readable_spec.rb +37 -19
- data/spec/mongo/collection/view/writable_spec.rb +64 -32
- data/spec/mongo/collection/view_spec.rb +4 -2
- data/spec/mongo/collection_spec.rb +163 -73
- data/spec/mongo/cursor_spec.rb +5 -2
- data/spec/mongo/database_spec.rb +41 -19
- data/spec/mongo/error/no_server_available_spec.rb +1 -1
- data/spec/mongo/error/parser_spec.rb +29 -0
- data/spec/mongo/grid/stream/write_spec.rb +2 -1
- data/spec/mongo/index/view_spec.rb +42 -24
- data/spec/mongo/operation/delete/op_msg_spec.rb +11 -7
- data/spec/mongo/operation/insert/op_msg_spec.rb +10 -6
- data/spec/mongo/operation/update/op_msg_spec.rb +10 -6
- data/spec/mongo/protocol/compressed_spec.rb +1 -1
- data/spec/mongo/protocol/msg_spec.rb +1 -1
- data/spec/mongo/server/app_metadata_spec.rb +2 -1
- data/spec/mongo/server/connection_auth_spec.rb +1 -1
- data/spec/mongo/server/monitor/connection_spec.rb +42 -0
- data/spec/mongo/server_selector_spec.rb +17 -0
- data/spec/mongo/server_spec.rb +110 -0
- data/spec/mongo/session/session_pool_spec.rb +1 -1
- data/spec/mongo/session_spec.rb +1 -1
- data/spec/mongo/session_transaction_spec.rb +162 -1
- data/spec/mongo/socket/ssl_spec.rb +14 -7
- data/spec/mongo/uri/srv_protocol_spec.rb +41 -34
- data/spec/spec_helper.rb +3 -191
- data/spec/spec_tests/change_streams_spec.rb +3 -6
- data/spec/spec_tests/data/transactions/abort.yml +3 -1
- data/spec/spec_tests/data/transactions/commit.yml +4 -3
- data/spec/spec_tests/data/transactions/error-labels.yml +17 -13
- data/spec/spec_tests/data/transactions/read-concern.yml +611 -0
- data/spec/spec_tests/data/transactions/retryable-commit.yml +126 -21
- data/spec/spec_tests/data/transactions_api/callback-aborts.yml +42 -39
- data/spec/spec_tests/data/transactions_api/callback-commits.yml +52 -50
- data/spec/spec_tests/data/transactions_api/callback-retry.yml +33 -31
- data/spec/spec_tests/data/transactions_api/commit-retry.yml +42 -39
- data/spec/spec_tests/data/transactions_api/commit-transienttransactionerror-4.2.yml +13 -12
- data/spec/spec_tests/data/transactions_api/commit-transienttransactionerror.yml +15 -26
- data/spec/spec_tests/data/transactions_api/commit-writeconcernerror.yml +25 -33
- data/spec/spec_tests/data/transactions_api/commit.yml +44 -42
- data/spec/spec_tests/data/transactions_api/transaction-options.yml +25 -23
- data/spec/spec_tests/max_staleness_spec.rb +2 -0
- data/spec/spec_tests/retryable_writes_spec.rb +2 -6
- data/spec/spec_tests/sdam_spec.rb +2 -0
- data/spec/spec_tests/server_selection_spec.rb +3 -0
- data/spec/spec_tests/transactions_api_spec.rb +7 -1
- data/spec/spec_tests/transactions_spec.rb +6 -0
- data/spec/spec_tests/uri_options_spec.rb +4 -26
- data/spec/support/certificates/ca.pem +21 -16
- data/spec/support/certificates/client.pem +90 -90
- data/spec/support/certificates/client_cert.pem +21 -20
- data/spec/support/certificates/client_key.pem +27 -28
- data/spec/support/certificates/client_key_encrypted.pem +26 -26
- data/spec/support/certificates/crl.pem +10 -8
- data/spec/support/certificates/crl_client_revoked.pem +11 -10
- data/spec/support/certificates/server.pem +48 -33
- data/spec/support/change_streams.rb +12 -32
- data/spec/support/client_registry.rb +12 -1
- data/spec/support/cluster_config.rb +48 -2
- data/spec/support/common_shortcuts.rb +73 -7
- data/spec/support/connection_string.rb +0 -3
- data/spec/support/constraints.rb +87 -22
- data/spec/support/crud.rb +2 -1
- data/spec/support/shared/server_selector.rb +0 -28
- data/spec/support/shared/session.rb +25 -14
- data/spec/support/transactions.rb +4 -8
- data/spec/support/transactions/operation.rb +26 -4
- data/spec/support/transactions/verifier.rb +5 -2
- metadata +496 -488
- metadata.gz.sig +5 -2
- data/spec/support/certificates/password_protected.pem +0 -51
@@ -1,21 +1,22 @@
|
|
1
1
|
-----BEGIN CERTIFICATE-----
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
2
|
+
MIIDkjCCAnqgAwIBAgIDATMhMA0GCSqGSIb3DQEBCwUAMHUxFzAVBgNVBAMTDlJ1
|
3
|
+
YnkgRHJpdmVyIENBMRAwDgYDVQQLEwdEcml2ZXJzMRAwDgYDVQQKEwdNb25nb0RC
|
4
|
+
MRYwFAYDVQQHEw1OZXcgWW9yayBDaXR5MREwDwYDVQQIEwhOZXcgWW9yazELMAkG
|
5
|
+
A1UEBhMCVVMwHhcNMTkwMjE0MjA1NzU4WhcNMzkwMjE0MjA1NzU4WjBwMRIwEAYD
|
6
|
+
VQQDEwlsb2NhbGhvc3QxEDAOBgNVBAsTB0RyaXZlcnMxEDAOBgNVBAoTB01vbmdv
|
7
|
+
REIxFjAUBgNVBAcTDU5ldyBZb3JrIENpdHkxETAPBgNVBAgTCE5ldyBZb3JrMQsw
|
8
|
+
CQYDVQQGEwJVUzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJYtU6kN
|
9
|
+
9v48NFxgh1bIadqF5xCWxjluXAnzQuCnuzg376ZjbCiLHRpSAFIZlGP5WE6c0sqr
|
10
|
+
LiBmw337pFLmfFu/tAYf5J5rd/E4FLJWr3fdI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PFfLzlGDa567sCgYEApwiz
|
16
|
+
h9SppQwsbjXDjcOfJoZbmnJjzdMJ1rDUnLY7iCaVdf7cIaHCY72xSlgtruVkGQ6m
|
17
|
+
vYwjh/YnwU3qoBi1tbu+ByHWxImLwsLZMA4ct4IF5Qvi2d2v4GtOq/sQcqB+35d/
|
18
|
+
dJ4CcR1sHe6R5H0uvDDmNoJiJFESbtTD0Wt4VvUCgYAehOSoc3JsCEERJ8/bmP4p
|
19
|
+
ewHd+QBFmwUTlSSGrrSQyrNNQB/gyAw08tcE2CNfl8+EasgW9A4oBreGwBqb3Yn4
|
20
|
+
W5J729pYcUOPEGujoEevQcSGfhVTWHws2PCfdecVs/N09xOv7ZSykVLVvsh4SI/K
|
21
|
+
+PmcYye6bk53dcyi407P1QKBgAUbiwHYSue1G5azJiurk65F5X8viEW+8koSVi4E
|
22
|
+
lIVxSJi3Flwg6iTKpCU11Q/IC+uIOykIo/2AVW7fxxDmMIhCGWl2a27PFer6slF5
|
23
|
+
3P7vhuaeGm23Da27GkjAAJzAs6B6rXcPbduvnqK7rNJj0Y4HoMKB8iZSJFInR2Wb
|
24
|
+
964RAoGBAIvzvWDusSLOmkAN7KKwbmVdrKLgKPGtyNjJyKdp0zUxslOQsSraOq/K
|
25
|
+
hsBgotDdq8igR6iUHfmcSs7FVU1QBBMfqe5XVJhj4GWMe2VzRIvBcuvaMLyUuZ61
|
26
|
+
TwPjfJRUCACo4MSQHEBlbWq9ZYzO8nZ+FyCldN/n5Uevp84BOyBO
|
27
|
+
-----END RSA PRIVATE KEY-----
|
@@ -1,30 +1,30 @@
|
|
1
1
|
-----BEGIN RSA PRIVATE KEY-----
|
2
2
|
Proc-Type: 4,ENCRYPTED
|
3
|
-
DEK-Info:
|
3
|
+
DEK-Info: AES-256-CBC,1F48315ACA40642785914C510FCE7477
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
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CCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANMpcIHh
|
36
|
+
QZLAzJuSDKkXApUuVQ2A8y5dJyTbT6Zqqc5mvU586wEEKGgRQDkO/2e6TP4Ff8vh
|
37
|
+
NzM2HqTuYgJrptGzJN6lHzQcsvHIBAkJ/ijgI+99RxtVtc5BDUpVPGUZ8cVWadMX
|
38
|
+
GsxDJiMi0/gMhSGbbv2eu7EZ29gQdHsP8sazCtCDxkjDmXH4Sc/zmVvrocDpbOim
|
39
|
+
hKwuH1bCHwKQvl7ut7V9m1/CdiPA2I0bUvcNIR6qIghIL860otSS+lgUNXeyIJ5S
|
40
|
+
tjJ7sIpJM4NSV7qO2RKKTVTzDibCi8kogxo0oaHuuEce1J20LpAVwe+jxp97LTcI
|
41
|
+
izpK9SVYh2B/16sCAwEAAaMwMC4wLAYDVR0RBCUwI4IJbG9jYWxob3N0hwR/AAAB
|
42
|
+
hxAAAAAAAAAAAAAAAAAAAAABMA0GCSqGSIb3DQEBCwUAA4IBAQCDTFW7+QnJ227K
|
43
|
+
K5E2ePkuJlqwTxssYUXcyDt8PTG1eAGhByzG1AXZYdIjdIkMUIyhhpSplUwOAT1g
|
44
|
+
Plp5JAlBgGNZ1LGFvy7D8OhAtFYBH0t5afFU+Ze5RrVv0Vag8d5ffgNhU/9q/LPW
|
45
|
+
6quAHCSJoWRBYlNQ8XQCNgQiN4rYEIWvazoANNYTei7eJO3v53+s+RJwjteyW8Gr
|
46
|
+
Wp19inbpnFRObe1B1QC/FLnRGtBCgasEH4QNuvhA67iIQIJ1LZ6UUeP7IbCaVZ6E
|
47
|
+
tF6n48uzbAwVVq99bq0TkCkwx+1oP7Oerjww4Ys5OkFCJDR2kEnWUT3uhoU9+93h
|
48
|
+
8jejE8Hl
|
49
|
+
-----END CERTIFICATE-----
|
@@ -77,16 +77,14 @@ module Mongo
|
|
77
77
|
# @since 2.0.0
|
78
78
|
attr_reader :description
|
79
79
|
|
80
|
-
def configuration_satisfied?(client)
|
81
|
-
server_version_satisfied?(client) && topology_satisfied?
|
82
|
-
end
|
83
|
-
|
84
80
|
def initialize(test, coll1, coll2, db1, db2)
|
85
81
|
@description = test['description']
|
86
82
|
@min_server_version = test['minServerVersion']
|
87
83
|
@max_server_version = test['maxServerVersion']
|
88
84
|
@target_type = test['target']
|
89
|
-
@topologies = test['topology']
|
85
|
+
@topologies = test['topology'].map do |topology|
|
86
|
+
{'single' => :single, 'replicaset' => :replica_set, 'sharded' => :sharded}[topology]
|
87
|
+
end
|
90
88
|
@pipeline = test['changeStreamPipeline'] || []
|
91
89
|
@options = test['changeStreamOptions'] || {}
|
92
90
|
@operations = test['operations'].map { |op| Operation.new(op) }
|
@@ -98,6 +96,8 @@ module Mongo
|
|
98
96
|
@db2_name = db2
|
99
97
|
end
|
100
98
|
|
99
|
+
attr_reader :topologies
|
100
|
+
|
101
101
|
def setup_test
|
102
102
|
@global_client = ClientRegistry.instance.global_client('root_authorized').use('admin')
|
103
103
|
|
@@ -155,12 +155,6 @@ module Mongo
|
|
155
155
|
}
|
156
156
|
end
|
157
157
|
|
158
|
-
def teardown_test
|
159
|
-
@global_client && @global_client.close
|
160
|
-
@db1 && @db1.drop
|
161
|
-
@db2 && @db2.drop
|
162
|
-
end
|
163
|
-
|
164
158
|
def match_result?(result)
|
165
159
|
case @result.first.first
|
166
160
|
when 'success'
|
@@ -176,6 +170,10 @@ module Mongo
|
|
176
170
|
end
|
177
171
|
end
|
178
172
|
|
173
|
+
def server_version_satisfied?(client)
|
174
|
+
lower_bound_satisfied?(client) && upper_bound_satisfied?(client)
|
175
|
+
end
|
176
|
+
|
179
177
|
private
|
180
178
|
|
181
179
|
def events
|
@@ -227,37 +225,19 @@ module Mongo
|
|
227
225
|
end
|
228
226
|
end
|
229
227
|
|
230
|
-
def topology_satisfied?
|
231
|
-
@topologies.any? do |topology|
|
232
|
-
case topology
|
233
|
-
when 'single'
|
234
|
-
standalone?
|
235
|
-
when 'replicaset'
|
236
|
-
replica_set?
|
237
|
-
when 'sharded'
|
238
|
-
sharded?
|
239
|
-
else
|
240
|
-
false
|
241
|
-
end
|
242
|
-
end
|
243
|
-
end
|
244
|
-
|
245
|
-
def server_version_satisfied?(client)
|
246
|
-
lower_bound_satisfied?(client) && upper_bound_satisfied?(client)
|
247
|
-
end
|
248
|
-
|
249
228
|
def server_version(client)
|
250
229
|
@server_version ||= client.database.command(buildInfo: 1).first['version']
|
251
230
|
end
|
252
231
|
|
253
232
|
def upper_bound_satisfied?(client)
|
254
233
|
return true unless @max_server_version
|
255
|
-
server_version
|
234
|
+
ClusterConfig.instance.server_version <= @max_server_version
|
256
235
|
end
|
257
236
|
|
258
237
|
def lower_bound_satisfied?(client)
|
259
238
|
return true unless @min_server_version
|
260
|
-
|
239
|
+
#@min_server_version <= server_version(client)
|
240
|
+
@min_server_version <= ClusterConfig.instance.fcv_ish
|
261
241
|
end
|
262
242
|
end
|
263
243
|
end
|
@@ -49,7 +49,18 @@ class ClientRegistry
|
|
49
49
|
|
50
50
|
def global_client(name)
|
51
51
|
if client = @global_clients[name]
|
52
|
-
|
52
|
+
if !client.cluster.connected?
|
53
|
+
reconnect = true
|
54
|
+
else
|
55
|
+
reconnect = false
|
56
|
+
client.cluster.servers_list.each do |server|
|
57
|
+
thread = server.monitor.instance_variable_get('@thread')
|
58
|
+
if thread.nil? || !thread.alive?
|
59
|
+
reconnect = true
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
if reconnect
|
53
64
|
client.reconnect
|
54
65
|
end
|
55
66
|
return client
|
@@ -28,14 +28,36 @@ class ClusterConfig
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def server_version
|
31
|
-
|
32
|
-
|
31
|
+
@server_version ||= begin
|
32
|
+
client = ClientRegistry.instance.global_client('authorized')
|
33
|
+
client.database.command(buildInfo: 1).first['version']
|
34
|
+
end
|
33
35
|
end
|
34
36
|
|
35
37
|
def short_server_version
|
36
38
|
server_version.split('.')[0..1].join('.')
|
37
39
|
end
|
38
40
|
|
41
|
+
def fcv
|
42
|
+
@fcv ||= begin
|
43
|
+
client = ClientRegistry.instance.global_client('root_authorized')
|
44
|
+
rv = client.use(:admin).command(getParameter: 1, featureCompatibilityVersion: 1).first['featureCompatibilityVersion']
|
45
|
+
rv['version'] || rv
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
# Per https://jira.mongodb.org/browse/SERVER-39052, working with FCV
|
50
|
+
# in sharded topologies is annoying. Also, FCV doesn't exist in servers
|
51
|
+
# less than 3.4. This method returns FCV on 3.4+ servers when in single
|
52
|
+
# or RS topologies, and otherwise returns the major.minor server version.
|
53
|
+
def fcv_ish
|
54
|
+
if server_version >= '3.4' && !mongos?
|
55
|
+
fcv
|
56
|
+
else
|
57
|
+
short_server_version
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
39
61
|
def primary_address
|
40
62
|
@primary_address ||= begin
|
41
63
|
client = ClientRegistry.instance.global_client('authorized')
|
@@ -46,4 +68,28 @@ class ClusterConfig
|
|
46
68
|
end.seed
|
47
69
|
end
|
48
70
|
end
|
71
|
+
|
72
|
+
# Try running a command on the admin database to see if the mongod was
|
73
|
+
# started with auth.
|
74
|
+
def auth_enabled?
|
75
|
+
if @auth_enabled.nil?
|
76
|
+
@auth_enabled = begin
|
77
|
+
scanned_client.use(:admin).command(getCmdLineOpts: 1).first["argv"].include?("--auth")
|
78
|
+
rescue => e
|
79
|
+
e.message =~ /(not authorized)|(unauthorized)|(no users authenticated)|(requires authentication)/
|
80
|
+
end
|
81
|
+
end
|
82
|
+
@auth_enabled
|
83
|
+
end
|
84
|
+
|
85
|
+
def topology
|
86
|
+
@topology ||= begin
|
87
|
+
topology = scanned_client.cluster.topology.class.name.sub(/.*::/, '')
|
88
|
+
topology = topology.gsub(/([A-Z])/) { |match| '_' + match.downcase }.sub(/^_/, '')
|
89
|
+
if topology =~ /^replica_set/
|
90
|
+
topology = 'replica_set'
|
91
|
+
end
|
92
|
+
topology.to_sym
|
93
|
+
end
|
94
|
+
end
|
49
95
|
end
|