mongo 2.15.1 → 2.16.0.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (326) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/README.md +1 -1
  4. data/lib/mongo/bulk_write.rb +2 -2
  5. data/lib/mongo/client.rb +45 -5
  6. data/lib/mongo/cluster/periodic_executor.rb +4 -3
  7. data/lib/mongo/cluster/reapers/cursor_reaper.rb +76 -43
  8. data/lib/mongo/cluster/sdam_flow.rb +9 -3
  9. data/lib/mongo/cluster/topology/base.rb +13 -9
  10. data/lib/mongo/cluster/topology/load_balanced.rb +102 -0
  11. data/lib/mongo/cluster/topology.rb +28 -8
  12. data/lib/mongo/cluster.rb +136 -51
  13. data/lib/mongo/collection/view/aggregation.rb +5 -10
  14. data/lib/mongo/collection/view/builder/aggregation.rb +6 -5
  15. data/lib/mongo/collection/view/builder/map_reduce.rb +12 -49
  16. data/lib/mongo/collection/view/builder.rb +0 -4
  17. data/lib/mongo/collection/view/iterable.rb +42 -18
  18. data/lib/mongo/collection/view/map_reduce.rb +39 -15
  19. data/lib/mongo/collection/view/readable.rb +60 -51
  20. data/lib/mongo/collection/view/writable.rb +178 -175
  21. data/lib/mongo/collection/view.rb +15 -21
  22. data/lib/mongo/collection.rb +13 -13
  23. data/lib/mongo/cursor/kill_spec.rb +38 -0
  24. data/lib/mongo/cursor.rb +62 -31
  25. data/lib/mongo/database/view.rb +1 -1
  26. data/lib/mongo/error/bad_load_balancer_target.rb +26 -0
  27. data/lib/mongo/error/missing_service_id.rb +26 -0
  28. data/lib/mongo/error/no_service_connection_available.rb +49 -0
  29. data/lib/mongo/error/notable.rb +7 -0
  30. data/lib/mongo/error.rb +3 -0
  31. data/lib/mongo/grid/fs_bucket.rb +21 -2
  32. data/lib/mongo/id.rb +7 -5
  33. data/lib/mongo/index/view.rb +22 -41
  34. data/lib/mongo/monitoring/event/cmap/pool_cleared.rb +7 -4
  35. data/lib/mongo/monitoring/event/command_failed.rb +1 -1
  36. data/lib/mongo/monitoring/event/command_started.rb +2 -0
  37. data/lib/mongo/monitoring/publishable.rb +2 -2
  38. data/lib/mongo/operation/aggregate/command.rb +8 -0
  39. data/lib/mongo/operation/context.rb +19 -1
  40. data/lib/mongo/operation/count/command.rb +6 -0
  41. data/lib/mongo/operation/count/op_msg.rb +6 -0
  42. data/lib/mongo/operation/create/command.rb +7 -1
  43. data/lib/mongo/operation/create/op_msg.rb +7 -0
  44. data/lib/mongo/operation/create_index/command.rb +17 -1
  45. data/lib/mongo/operation/create_index/op_msg.rb +17 -4
  46. data/lib/mongo/operation/delete/command.rb +6 -3
  47. data/lib/mongo/operation/delete/legacy.rb +9 -2
  48. data/lib/mongo/operation/delete/op_msg.rb +8 -1
  49. data/lib/mongo/operation/distinct/command.rb +6 -0
  50. data/lib/mongo/operation/distinct/op_msg.rb +7 -0
  51. data/lib/mongo/operation/explain/command.rb +13 -1
  52. data/lib/mongo/operation/explain/legacy.rb +12 -5
  53. data/lib/mongo/operation/explain/op_msg.rb +9 -1
  54. data/lib/mongo/operation/find/builder/command.rb +110 -0
  55. data/lib/mongo/{collection/view → operation/find}/builder/flags.rb +10 -14
  56. data/lib/mongo/operation/find/builder/legacy.rb +123 -0
  57. data/lib/mongo/{collection/view → operation/find}/builder/modifiers.rb +31 -25
  58. data/lib/mongo/{cursor → operation/find}/builder.rb +4 -4
  59. data/lib/mongo/operation/find/command.rb +9 -0
  60. data/lib/mongo/operation/find/legacy.rb +10 -1
  61. data/lib/mongo/operation/find/op_msg.rb +12 -0
  62. data/lib/mongo/operation/find.rb +1 -0
  63. data/lib/mongo/operation/get_more/command.rb +1 -0
  64. data/lib/mongo/operation/get_more/command_builder.rb +38 -0
  65. data/lib/mongo/operation/get_more/op_msg.rb +1 -0
  66. data/lib/mongo/operation/get_more.rb +1 -0
  67. data/lib/mongo/operation/kill_cursors/command.rb +8 -0
  68. data/lib/mongo/operation/kill_cursors/command_builder.rb +35 -0
  69. data/lib/mongo/operation/kill_cursors/legacy.rb +2 -1
  70. data/lib/mongo/operation/kill_cursors/op_msg.rb +10 -0
  71. data/lib/mongo/operation/kill_cursors.rb +1 -0
  72. data/lib/mongo/operation/map_reduce/command.rb +8 -0
  73. data/lib/mongo/operation/map_reduce/op_msg.rb +1 -1
  74. data/lib/mongo/operation/shared/executable.rb +15 -1
  75. data/lib/mongo/operation/shared/polymorphic_operation.rb +1 -1
  76. data/lib/mongo/operation/shared/read_preference_supported.rb +3 -1
  77. data/lib/mongo/operation/shared/response_handling.rb +1 -0
  78. data/lib/mongo/operation/shared/sessions_supported.rb +12 -12
  79. data/lib/mongo/operation/shared/specifiable.rb +11 -29
  80. data/lib/mongo/operation/shared/validatable.rb +87 -0
  81. data/lib/mongo/operation/shared/write.rb +1 -1
  82. data/lib/mongo/operation/update/command.rb +6 -3
  83. data/lib/mongo/operation/update/legacy.rb +19 -11
  84. data/lib/mongo/operation/update/op_msg.rb +7 -4
  85. data/lib/mongo/operation/write_command/command.rb +51 -0
  86. data/lib/mongo/operation/write_command/op_msg.rb +43 -0
  87. data/lib/mongo/operation/write_command.rb +32 -0
  88. data/lib/mongo/operation.rb +10 -0
  89. data/lib/mongo/protocol/query.rb +35 -18
  90. data/lib/mongo/server/connection.rb +25 -3
  91. data/lib/mongo/server/connection_base.rb +12 -1
  92. data/lib/mongo/server/connection_common.rb +38 -1
  93. data/lib/mongo/server/connection_pool/generation_manager.rb +71 -0
  94. data/lib/mongo/server/connection_pool.rb +100 -27
  95. data/lib/mongo/server/description/features.rb +17 -16
  96. data/lib/mongo/server/description/load_balancer.rb +33 -0
  97. data/lib/mongo/server/description.rb +85 -6
  98. data/lib/mongo/server/monitor/connection.rb +5 -6
  99. data/lib/mongo/server/monitor.rb +2 -1
  100. data/lib/mongo/server/pending_connection.rb +47 -31
  101. data/lib/mongo/server.rb +73 -26
  102. data/lib/mongo/server_selector/base.rb +5 -1
  103. data/lib/mongo/session/session_pool.rb +11 -0
  104. data/lib/mongo/session.rb +21 -1
  105. data/lib/mongo/socket/ocsp_verifier.rb +6 -37
  106. data/lib/mongo/uri/options_mapper.rb +1 -0
  107. data/lib/mongo/uri/srv_protocol.rb +6 -8
  108. data/lib/mongo/uri.rb +18 -0
  109. data/lib/mongo/utils.rb +0 -7
  110. data/lib/mongo/version.rb +1 -1
  111. data/mongo.gemspec +1 -1
  112. data/spec/integration/auth_spec.rb +31 -1
  113. data/spec/integration/awaited_ismaster_spec.rb +1 -1
  114. data/spec/integration/bulk_write_spec.rb +1 -1
  115. data/spec/integration/change_stream_spec.rb +3 -3
  116. data/spec/integration/client_construction_spec.rb +54 -0
  117. data/spec/integration/client_side_encryption/auto_encryption_bulk_writes_spec.rb +1 -1
  118. data/spec/integration/client_side_encryption/auto_encryption_command_monitoring_spec.rb +1 -1
  119. data/spec/integration/client_side_encryption/bson_size_limit_spec.rb +1 -1
  120. data/spec/integration/client_side_encryption/data_key_spec.rb +1 -1
  121. data/spec/integration/client_spec.rb +2 -0
  122. data/spec/integration/command_monitoring_spec.rb +1 -1
  123. data/spec/integration/command_spec.rb +1 -1
  124. data/spec/integration/connection_spec.rb +52 -35
  125. data/spec/integration/crud_spec.rb +174 -1
  126. data/spec/integration/cursor_pinning_spec.rb +121 -0
  127. data/spec/integration/cursor_reaping_spec.rb +8 -4
  128. data/spec/integration/fork_reconnect_spec.rb +1 -5
  129. data/spec/integration/get_more_spec.rb +1 -1
  130. data/spec/integration/heartbeat_events_spec.rb +1 -1
  131. data/spec/integration/map_reduce_spec.rb +77 -0
  132. data/spec/integration/query_cache_spec.rb +2 -2
  133. data/spec/integration/query_cache_transactions_spec.rb +1 -1
  134. data/spec/integration/read_concern_spec.rb +1 -1
  135. data/spec/integration/read_preference_spec.rb +1 -1
  136. data/spec/integration/reconnect_spec.rb +30 -12
  137. data/spec/integration/retryable_errors_spec.rb +1 -1
  138. data/spec/integration/retryable_writes/retryable_writes_36_and_older_spec.rb +1 -1
  139. data/spec/integration/retryable_writes/retryable_writes_40_and_newer_spec.rb +1 -1
  140. data/spec/integration/sdam_error_handling_spec.rb +5 -3
  141. data/spec/integration/sdam_events_spec.rb +35 -19
  142. data/spec/integration/sdam_prose_spec.rb +1 -1
  143. data/spec/integration/server_monitor_spec.rb +1 -0
  144. data/spec/integration/server_selector_spec.rb +22 -5
  145. data/spec/integration/server_spec.rb +2 -0
  146. data/spec/integration/srv_monitoring_spec.rb +1 -1
  147. data/spec/integration/step_down_spec.rb +1 -1
  148. data/spec/integration/transaction_pinning_spec.rb +120 -0
  149. data/spec/integration/versioned_api_examples_spec.rb +45 -0
  150. data/spec/integration/x509_auth_spec.rb +1 -1
  151. data/spec/lite_spec_helper.rb +1 -2
  152. data/spec/mongo/address/unix_spec.rb +1 -0
  153. data/spec/mongo/auth/cr_spec.rb +2 -3
  154. data/spec/mongo/auth/ldap_spec.rb +2 -3
  155. data/spec/mongo/auth/scram_spec.rb +2 -3
  156. data/spec/mongo/auth/user/view_spec.rb +1 -1
  157. data/spec/mongo/auth/x509_spec.rb +2 -3
  158. data/spec/mongo/bulk_write_spec.rb +3 -3
  159. data/spec/mongo/client_construction_spec.rb +259 -28
  160. data/spec/mongo/client_spec.rb +6 -4
  161. data/spec/mongo/cluster/cursor_reaper_spec.rb +36 -21
  162. data/spec/mongo/cluster/periodic_executor_spec.rb +3 -1
  163. data/spec/mongo/cluster_spec.rb +44 -3
  164. data/spec/mongo/collection/view/aggregation_spec.rb +1 -1
  165. data/spec/mongo/collection/view/builder/find_command_spec.rb +4 -0
  166. data/spec/mongo/collection/view/builder/op_query_spec.rb +4 -0
  167. data/spec/mongo/collection/view/map_reduce_spec.rb +1 -1
  168. data/spec/mongo/collection_crud_spec.rb +7 -2
  169. data/spec/mongo/collection_ddl_spec.rb +1 -1
  170. data/spec/mongo/collection_spec.rb +1 -1
  171. data/spec/mongo/cursor/builder/get_more_command_spec.rb +4 -0
  172. data/spec/mongo/cursor/builder/op_get_more_spec.rb +4 -0
  173. data/spec/mongo/cursor_spec.rb +15 -5
  174. data/spec/mongo/database_spec.rb +15 -15
  175. data/spec/mongo/error/operation_failure_heavy_spec.rb +1 -1
  176. data/spec/mongo/grid/fs_bucket_spec.rb +18 -12
  177. data/spec/mongo/grid/stream/write_spec.rb +3 -9
  178. data/spec/mongo/grid/stream_spec.rb +1 -1
  179. data/spec/mongo/index/view_spec.rb +2 -2
  180. data/spec/mongo/operation/delete/op_msg_spec.rb +1 -1
  181. data/spec/mongo/{collection/view → operation/find}/builder/flags_spec.rb +2 -2
  182. data/spec/mongo/{collection/view → operation/find}/builder/modifiers_spec.rb +2 -2
  183. data/spec/mongo/operation/find/legacy_spec.rb +1 -0
  184. data/spec/mongo/operation/insert/bulk_spec.rb +1 -1
  185. data/spec/mongo/operation/insert/op_msg_spec.rb +1 -1
  186. data/spec/mongo/operation/kill_cursors_spec.rb +4 -1
  187. data/spec/mongo/operation/read_preference_legacy_spec.rb +4 -0
  188. data/spec/mongo/operation/read_preference_op_msg_spec.rb +2 -0
  189. data/spec/mongo/operation/update/bulk_spec.rb +1 -1
  190. data/spec/mongo/operation/update/op_msg_spec.rb +1 -1
  191. data/spec/mongo/query_cache_spec.rb +6 -2
  192. data/spec/mongo/server/connection_common_spec.rb +62 -11
  193. data/spec/mongo/server/connection_pool_spec.rb +73 -7
  194. data/spec/mongo/server/connection_spec.rb +138 -43
  195. data/spec/mongo/server/description_spec.rb +1 -1
  196. data/spec/mongo/server/monitor_spec.rb +4 -3
  197. data/spec/mongo/session/session_pool_spec.rb +42 -10
  198. data/spec/mongo/session_transaction_spec.rb +15 -30
  199. data/spec/mongo/socket/unix_spec.rb +1 -0
  200. data/spec/mongo/uri_option_parsing_spec.rb +38 -5
  201. data/spec/runners/change_streams/test.rb +1 -1
  202. data/spec/runners/cmap.rb +1 -1
  203. data/spec/runners/connection_string.rb +7 -3
  204. data/spec/runners/crud/operation.rb +5 -3
  205. data/spec/runners/crud/requirement.rb +1 -0
  206. data/spec/runners/crud.rb +1 -1
  207. data/spec/runners/sdam.rb +2 -1
  208. data/spec/runners/transactions/test.rb +2 -2
  209. data/spec/runners/unified/assertions.rb +2 -3
  210. data/spec/runners/unified/event_subscriber.rb +2 -2
  211. data/spec/runners/unified/test.rb +3 -0
  212. data/spec/runners/unified.rb +1 -1
  213. data/spec/shared/lib/mrss/constraints.rb +11 -5
  214. data/spec/shared/lib/mrss/event_subscriber.rb +200 -0
  215. data/spec/shared/lib/mrss/server_version_registry.rb +17 -12
  216. data/spec/shared/share/Dockerfile.erb +2 -1
  217. data/spec/shared/shlib/server.sh +70 -20
  218. data/spec/spec_tests/change_streams_spec.rb +1 -1
  219. data/spec/spec_tests/cmap_spec.rb +4 -1
  220. data/spec/spec_tests/command_monitoring_spec.rb +2 -2
  221. data/spec/spec_tests/data/command_monitoring/find.yml +9 -9
  222. data/spec/spec_tests/data/crud/read/aggregate-collation.yml +2 -1
  223. data/spec/spec_tests/data/crud/read/aggregate-out.yml +1 -0
  224. data/spec/spec_tests/data/crud/read/count-collation.yml +2 -1
  225. data/spec/spec_tests/data/crud/read/distinct-collation.yml +2 -1
  226. data/spec/spec_tests/data/crud/read/find-collation.yml +2 -1
  227. data/spec/spec_tests/data/crud/write/bulkWrite-collation.yml +2 -1
  228. data/spec/spec_tests/data/crud/write/deleteMany-collation.yml +2 -1
  229. data/spec/spec_tests/data/crud/write/deleteOne-collation.yml +2 -1
  230. data/spec/spec_tests/data/crud/write/findOneAndDelete-collation.yml +3 -2
  231. data/spec/spec_tests/data/crud/write/findOneAndReplace-collation.yml +2 -1
  232. data/spec/spec_tests/data/crud/write/findOneAndUpdate-collation.yml +3 -2
  233. data/spec/spec_tests/data/crud/write/replaceOne-collation.yml +3 -2
  234. data/spec/spec_tests/data/crud/write/updateMany-collation.yml +2 -1
  235. data/spec/spec_tests/data/crud/write/updateOne-collation.yml +2 -1
  236. data/spec/spec_tests/data/load_balancers/event-monitoring.yml +99 -0
  237. data/spec/spec_tests/data/load_balancers/lb-connection-establishment.yml +36 -0
  238. data/spec/spec_tests/data/load_balancers/non-lb-connection-establishment.yml +56 -0
  239. data/spec/spec_tests/data/load_balancers/server-selection.yml +50 -0
  240. data/spec/spec_tests/data/retryable_reads/changeStreams-client.watch-serverErrors.yml +1 -1
  241. data/spec/spec_tests/data/retryable_reads/changeStreams-client.watch.yml +1 -1
  242. data/spec/spec_tests/data/retryable_reads/changeStreams-db.coll.watch-serverErrors.yml +1 -1
  243. data/spec/spec_tests/data/retryable_reads/changeStreams-db.coll.watch.yml +1 -1
  244. data/spec/spec_tests/data/retryable_reads/changeStreams-db.watch-serverErrors.yml +1 -1
  245. data/spec/spec_tests/data/retryable_reads/changeStreams-db.watch.yml +1 -1
  246. data/spec/spec_tests/data/retryable_reads/mapReduce.yml +3 -1
  247. data/spec/spec_tests/data/sdam/load-balanced/discover_load_balancer.yml +25 -0
  248. data/spec/spec_tests/data/sdam_integration/find-network-error.yml +2 -0
  249. data/spec/spec_tests/data/sdam_integration/find-shutdown-error.yml +2 -0
  250. data/spec/spec_tests/data/sdam_integration/hello-command-error.yml +3 -1
  251. data/spec/spec_tests/data/sdam_integration/hello-network-error.yml +3 -1
  252. data/spec/spec_tests/data/sdam_integration/hello-timeout.yml +2 -0
  253. data/spec/spec_tests/data/sdam_integration/insert-network-error.yml +2 -0
  254. data/spec/spec_tests/data/sdam_integration/insert-shutdown-error.yml +2 -0
  255. data/spec/spec_tests/data/sdam_monitoring/load_balancer.yml +65 -0
  256. data/spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-directConnection.yml +13 -0
  257. data/spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-replicaSet-errors.yml +6 -0
  258. data/spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-true-multiple-hosts.yml +5 -0
  259. data/spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-true-txt.yml +10 -0
  260. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/direct-connection-false.yml +0 -0
  261. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/direct-connection-true.yml +0 -0
  262. data/spec/spec_tests/data/seed_list_discovery/replica-set/encoded-userinfo-and-db.yml +15 -0
  263. data/spec/spec_tests/data/seed_list_discovery/replica-set/loadBalanced-false-txt.yml +10 -0
  264. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/longer-parent-in-return.yml +0 -0
  265. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/misformatted-option.yml +0 -0
  266. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/no-results.yml +0 -0
  267. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/not-enough-parts.yml +0 -0
  268. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/one-result-default-port.yml +0 -0
  269. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/one-txt-record-multiple-strings.yml +0 -0
  270. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/one-txt-record.yml +0 -0
  271. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/parent-part-mismatch1.yml +0 -0
  272. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/parent-part-mismatch2.yml +0 -0
  273. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/parent-part-mismatch3.yml +0 -0
  274. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/parent-part-mismatch4.yml +0 -0
  275. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/parent-part-mismatch5.yml +0 -0
  276. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/returned-parent-too-short.yml +0 -0
  277. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/returned-parent-wrong.yml +0 -0
  278. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/two-results-default-port.yml +0 -0
  279. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/two-results-nonstandard-port.yml +0 -0
  280. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/two-txt-records.yml +0 -0
  281. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/txt-record-not-allowed-option.yml +0 -0
  282. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/txt-record-with-overridden-ssl-option.yml +0 -0
  283. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/txt-record-with-overridden-uri-option.yml +0 -0
  284. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/txt-record-with-unallowed-option.yml +0 -0
  285. data/spec/spec_tests/data/seed_list_discovery/replica-set/uri-with-admin-database.yml +13 -0
  286. data/spec/spec_tests/data/seed_list_discovery/replica-set/uri-with-auth.yml +12 -0
  287. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/uri-with-port.yml +0 -0
  288. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/uri-with-two-hosts.yml +0 -0
  289. data/spec/spec_tests/data/transactions/retryable-abort-errorLabels.yml +2 -0
  290. data/spec/spec_tests/data/transactions/retryable-abort.yml +2 -0
  291. data/spec/spec_tests/data/transactions/retryable-commit-errorLabels.yml +2 -0
  292. data/spec/spec_tests/data/transactions/retryable-commit.yml +2 -0
  293. data/spec/spec_tests/data/transactions/retryable-writes.yml +2 -0
  294. data/spec/spec_tests/data/uri_options/connection-options.yml +60 -0
  295. data/spec/spec_tests/load_balancers_spec.rb +15 -0
  296. data/spec/spec_tests/retryable_reads_spec.rb +2 -2
  297. data/spec/spec_tests/retryable_writes_spec.rb +1 -1
  298. data/spec/spec_tests/sdam_integration_spec.rb +1 -1
  299. data/spec/spec_tests/sdam_monitoring_spec.rb +10 -5
  300. data/spec/spec_tests/sdam_spec.rb +1 -1
  301. data/spec/spec_tests/seed_list_discovery_spec.rb +118 -0
  302. data/spec/spec_tests/uri_options_spec.rb +4 -4
  303. data/spec/stress/fork_reconnect_stress_spec.rb +1 -5
  304. data/spec/support/certificates/atlas-ocsp-ca.crt +82 -90
  305. data/spec/support/certificates/atlas-ocsp.crt +127 -122
  306. data/spec/support/common_shortcuts.rb +2 -3
  307. data/spec/support/matchers.rb +13 -0
  308. data/spec/support/shared/auth_context.rb +16 -0
  309. data/spec/support/shared/session.rb +2 -2
  310. data/spec/support/spec_config.rb +9 -10
  311. data/spec/support/using_hash.rb +31 -0
  312. data/spec/support/utils.rb +1 -1
  313. data.tar.gz.sig +0 -0
  314. metadata +120 -76
  315. metadata.gz.sig +0 -0
  316. data/lib/mongo/collection/view/builder/find_command.rb +0 -173
  317. data/lib/mongo/collection/view/builder/op_query.rb +0 -94
  318. data/lib/mongo/cursor/builder/get_more_command.rb +0 -80
  319. data/lib/mongo/cursor/builder/kill_cursors_command.rb +0 -111
  320. data/lib/mongo/cursor/builder/op_get_more.rb +0 -64
  321. data/lib/mongo/cursor/builder/op_kill_cursors.rb +0 -106
  322. data/lib/mongo/server/context.rb +0 -72
  323. data/spec/mongo/cursor/builder/op_kill_cursors_spec.rb +0 -66
  324. data/spec/runners/unified/using_hash.rb +0 -34
  325. data/spec/spec_tests/dns_seedlist_discovery_spec.rb +0 -79
  326. data/spec/support/event_subscriber.rb +0 -221
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.15.1
4
+ version: 2.16.0.alpha1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Brock
@@ -122,6 +122,7 @@ files:
122
122
  - lib/mongo/cluster/sdam_flow.rb
123
123
  - lib/mongo/cluster/topology.rb
124
124
  - lib/mongo/cluster/topology/base.rb
125
+ - lib/mongo/cluster/topology/load_balanced.rb
125
126
  - lib/mongo/cluster/topology/no_replica_set_options.rb
126
127
  - lib/mongo/cluster/topology/replica_set_no_primary.rb
127
128
  - lib/mongo/cluster/topology/replica_set_with_primary.rb
@@ -134,11 +135,7 @@ files:
134
135
  - lib/mongo/collection/view/aggregation.rb
135
136
  - lib/mongo/collection/view/builder.rb
136
137
  - lib/mongo/collection/view/builder/aggregation.rb
137
- - lib/mongo/collection/view/builder/find_command.rb
138
- - lib/mongo/collection/view/builder/flags.rb
139
138
  - lib/mongo/collection/view/builder/map_reduce.rb
140
- - lib/mongo/collection/view/builder/modifiers.rb
141
- - lib/mongo/collection/view/builder/op_query.rb
142
139
  - lib/mongo/collection/view/change_stream.rb
143
140
  - lib/mongo/collection/view/change_stream/retryable.rb
144
141
  - lib/mongo/collection/view/explainable.rb
@@ -164,17 +161,14 @@ files:
164
161
  - lib/mongo/crypt/kms_context.rb
165
162
  - lib/mongo/crypt/status.rb
166
163
  - lib/mongo/cursor.rb
167
- - lib/mongo/cursor/builder.rb
168
- - lib/mongo/cursor/builder/get_more_command.rb
169
- - lib/mongo/cursor/builder/kill_cursors_command.rb
170
- - lib/mongo/cursor/builder/op_get_more.rb
171
- - lib/mongo/cursor/builder/op_kill_cursors.rb
164
+ - lib/mongo/cursor/kill_spec.rb
172
165
  - lib/mongo/database.rb
173
166
  - lib/mongo/database/view.rb
174
167
  - lib/mongo/dbref.rb
175
168
  - lib/mongo/distinguishing_semaphore.rb
176
169
  - lib/mongo/error.rb
177
170
  - lib/mongo/error/auth_error.rb
171
+ - lib/mongo/error/bad_load_balancer_target.rb
178
172
  - lib/mongo/error/bulk_write_error.rb
179
173
  - lib/mongo/error/change_stream_resumable.rb
180
174
  - lib/mongo/error/closed_stream.rb
@@ -222,10 +216,12 @@ files:
222
216
  - lib/mongo/error/missing_password.rb
223
217
  - lib/mongo/error/missing_resume_token.rb
224
218
  - lib/mongo/error/missing_scram_server_signature.rb
219
+ - lib/mongo/error/missing_service_id.rb
225
220
  - lib/mongo/error/mongocryptd_spawn_error.rb
226
221
  - lib/mongo/error/multi_index_drop.rb
227
222
  - lib/mongo/error/need_primary_server.rb
228
223
  - lib/mongo/error/no_server_available.rb
224
+ - lib/mongo/error/no_service_connection_available.rb
229
225
  - lib/mongo/error/no_srv_records.rb
230
226
  - lib/mongo/error/notable.rb
231
227
  - lib/mongo/error/operation_failure.rb
@@ -356,6 +352,11 @@ files:
356
352
  - lib/mongo/operation/explain/op_msg.rb
357
353
  - lib/mongo/operation/explain/result.rb
358
354
  - lib/mongo/operation/find.rb
355
+ - lib/mongo/operation/find/builder.rb
356
+ - lib/mongo/operation/find/builder/command.rb
357
+ - lib/mongo/operation/find/builder/flags.rb
358
+ - lib/mongo/operation/find/builder/legacy.rb
359
+ - lib/mongo/operation/find/builder/modifiers.rb
359
360
  - lib/mongo/operation/find/command.rb
360
361
  - lib/mongo/operation/find/legacy.rb
361
362
  - lib/mongo/operation/find/legacy/result.rb
@@ -363,6 +364,7 @@ files:
363
364
  - lib/mongo/operation/find/result.rb
364
365
  - lib/mongo/operation/get_more.rb
365
366
  - lib/mongo/operation/get_more/command.rb
367
+ - lib/mongo/operation/get_more/command_builder.rb
366
368
  - lib/mongo/operation/get_more/legacy.rb
367
369
  - lib/mongo/operation/get_more/op_msg.rb
368
370
  - lib/mongo/operation/get_more/result.rb
@@ -379,6 +381,7 @@ files:
379
381
  - lib/mongo/operation/insert/result.rb
380
382
  - lib/mongo/operation/kill_cursors.rb
381
383
  - lib/mongo/operation/kill_cursors/command.rb
384
+ - lib/mongo/operation/kill_cursors/command_builder.rb
382
385
  - lib/mongo/operation/kill_cursors/legacy.rb
383
386
  - lib/mongo/operation/kill_cursors/op_msg.rb
384
387
  - lib/mongo/operation/list_collections.rb
@@ -417,6 +420,7 @@ files:
417
420
  - lib/mongo/operation/shared/result/use_legacy_error_parser.rb
418
421
  - lib/mongo/operation/shared/sessions_supported.rb
419
422
  - lib/mongo/operation/shared/specifiable.rb
423
+ - lib/mongo/operation/shared/validatable.rb
420
424
  - lib/mongo/operation/shared/write.rb
421
425
  - lib/mongo/operation/shared/write_concern_supported.rb
422
426
  - lib/mongo/operation/update.rb
@@ -433,6 +437,9 @@ files:
433
437
  - lib/mongo/operation/users_info/command.rb
434
438
  - lib/mongo/operation/users_info/op_msg.rb
435
439
  - lib/mongo/operation/users_info/result.rb
440
+ - lib/mongo/operation/write_command.rb
441
+ - lib/mongo/operation/write_command/command.rb
442
+ - lib/mongo/operation/write_command/op_msg.rb
436
443
  - lib/mongo/options.rb
437
444
  - lib/mongo/options/mapper.rb
438
445
  - lib/mongo/options/redacted.rb
@@ -459,10 +466,11 @@ files:
459
466
  - lib/mongo/server/connection_base.rb
460
467
  - lib/mongo/server/connection_common.rb
461
468
  - lib/mongo/server/connection_pool.rb
469
+ - lib/mongo/server/connection_pool/generation_manager.rb
462
470
  - lib/mongo/server/connection_pool/populator.rb
463
- - lib/mongo/server/context.rb
464
471
  - lib/mongo/server/description.rb
465
472
  - lib/mongo/server/description/features.rb
473
+ - lib/mongo/server/description/load_balancer.rb
466
474
  - lib/mongo/server/monitor.rb
467
475
  - lib/mongo/server/monitor/app_metadata.rb
468
476
  - lib/mongo/server/monitor/connection.rb
@@ -547,6 +555,7 @@ files:
547
555
  - spec/integration/connection_pool_populator_spec.rb
548
556
  - spec/integration/connection_spec.rb
549
557
  - spec/integration/crud_spec.rb
558
+ - spec/integration/cursor_pinning_spec.rb
550
559
  - spec/integration/cursor_reaping_spec.rb
551
560
  - spec/integration/docs_examples_spec.rb
552
561
  - spec/integration/error_detection_spec.rb
@@ -554,6 +563,7 @@ files:
554
563
  - spec/integration/get_more_spec.rb
555
564
  - spec/integration/grid_fs_bucket_spec.rb
556
565
  - spec/integration/heartbeat_events_spec.rb
566
+ - spec/integration/map_reduce_spec.rb
557
567
  - spec/integration/mmapv1_spec.rb
558
568
  - spec/integration/mongos_pinning_spec.rb
559
569
  - spec/integration/ocsp_connectivity_spec.rb
@@ -596,6 +606,7 @@ files:
596
606
  - spec/integration/ssl_uri_options_spec.rb
597
607
  - spec/integration/step_down_spec.rb
598
608
  - spec/integration/time_zone_querying_spec.rb
609
+ - spec/integration/transaction_pinning_spec.rb
599
610
  - spec/integration/transactions_api_examples_spec.rb
600
611
  - spec/integration/transactions_examples_spec.rb
601
612
  - spec/integration/truncated_utf8_spec.rb
@@ -649,8 +660,6 @@ files:
649
660
  - spec/mongo/cluster_time_spec.rb
650
661
  - spec/mongo/collection/view/aggregation_spec.rb
651
662
  - spec/mongo/collection/view/builder/find_command_spec.rb
652
- - spec/mongo/collection/view/builder/flags_spec.rb
653
- - spec/mongo/collection/view/builder/modifiers_spec.rb
654
663
  - spec/mongo/collection/view/builder/op_query_spec.rb
655
664
  - spec/mongo/collection/view/change_stream_resume_spec.rb
656
665
  - spec/mongo/collection/view/change_stream_spec.rb
@@ -684,7 +693,6 @@ files:
684
693
  - spec/mongo/crypt/status_spec.rb
685
694
  - spec/mongo/cursor/builder/get_more_command_spec.rb
686
695
  - spec/mongo/cursor/builder/op_get_more_spec.rb
687
- - spec/mongo/cursor/builder/op_kill_cursors_spec.rb
688
696
  - spec/mongo/cursor_spec.rb
689
697
  - spec/mongo/database_spec.rb
690
698
  - spec/mongo/dbref_spec.rb
@@ -747,6 +755,8 @@ files:
747
755
  - spec/mongo/operation/delete/op_msg_spec.rb
748
756
  - spec/mongo/operation/delete_spec.rb
749
757
  - spec/mongo/operation/drop_index_spec.rb
758
+ - spec/mongo/operation/find/builder/flags_spec.rb
759
+ - spec/mongo/operation/find/builder/modifiers_spec.rb
750
760
  - spec/mongo/operation/find/legacy_spec.rb
751
761
  - spec/mongo/operation/get_more_spec.rb
752
762
  - spec/mongo/operation/indexes_spec.rb
@@ -861,7 +871,6 @@ files:
861
871
  - spec/runners/unified/support_operations.rb
862
872
  - spec/runners/unified/test.rb
863
873
  - spec/runners/unified/test_group.rb
864
- - spec/runners/unified/using_hash.rb
865
874
  - spec/shared/LICENSE
866
875
  - spec/shared/bin/get-mongodb-download-url
867
876
  - spec/shared/bin/s3-copy
@@ -870,6 +879,7 @@ files:
870
879
  - spec/shared/lib/mrss/cluster_config.rb
871
880
  - spec/shared/lib/mrss/constraints.rb
872
881
  - spec/shared/lib/mrss/docker_runner.rb
882
+ - spec/shared/lib/mrss/event_subscriber.rb
873
883
  - spec/shared/lib/mrss/lite_constraints.rb
874
884
  - spec/shared/lib/mrss/server_version_registry.rb
875
885
  - spec/shared/lib/mrss/spec_organizer.rb
@@ -1055,35 +1065,14 @@ files:
1055
1065
  - spec/spec_tests/data/crud_v2/updateOne-hint-serverError.yml
1056
1066
  - spec/spec_tests/data/crud_v2/updateOne-hint.yml
1057
1067
  - spec/spec_tests/data/crud_v2/updateWithPipelines.yml
1058
- - spec/spec_tests/data/dns_seedlist_discovery/direct-connection-false.yml
1059
- - spec/spec_tests/data/dns_seedlist_discovery/direct-connection-true.yml
1060
- - spec/spec_tests/data/dns_seedlist_discovery/longer-parent-in-return.yml
1061
- - spec/spec_tests/data/dns_seedlist_discovery/misformatted-option.yml
1062
- - spec/spec_tests/data/dns_seedlist_discovery/no-results.yml
1063
- - spec/spec_tests/data/dns_seedlist_discovery/not-enough-parts.yml
1064
- - spec/spec_tests/data/dns_seedlist_discovery/one-result-default-port.yml
1065
- - spec/spec_tests/data/dns_seedlist_discovery/one-txt-record-multiple-strings.yml
1066
- - spec/spec_tests/data/dns_seedlist_discovery/one-txt-record.yml
1067
- - spec/spec_tests/data/dns_seedlist_discovery/parent-part-mismatch1.yml
1068
- - spec/spec_tests/data/dns_seedlist_discovery/parent-part-mismatch2.yml
1069
- - spec/spec_tests/data/dns_seedlist_discovery/parent-part-mismatch3.yml
1070
- - spec/spec_tests/data/dns_seedlist_discovery/parent-part-mismatch4.yml
1071
- - spec/spec_tests/data/dns_seedlist_discovery/parent-part-mismatch5.yml
1072
- - spec/spec_tests/data/dns_seedlist_discovery/returned-parent-too-short.yml
1073
- - spec/spec_tests/data/dns_seedlist_discovery/returned-parent-wrong.yml
1074
- - spec/spec_tests/data/dns_seedlist_discovery/two-results-default-port.yml
1075
- - spec/spec_tests/data/dns_seedlist_discovery/two-results-nonstandard-port.yml
1076
- - spec/spec_tests/data/dns_seedlist_discovery/two-txt-records.yml
1077
- - spec/spec_tests/data/dns_seedlist_discovery/txt-record-not-allowed-option.yml
1078
- - spec/spec_tests/data/dns_seedlist_discovery/txt-record-with-overridden-ssl-option.yml
1079
- - spec/spec_tests/data/dns_seedlist_discovery/txt-record-with-overridden-uri-option.yml
1080
- - spec/spec_tests/data/dns_seedlist_discovery/txt-record-with-unallowed-option.yml
1081
- - spec/spec_tests/data/dns_seedlist_discovery/uri-with-port.yml
1082
- - spec/spec_tests/data/dns_seedlist_discovery/uri-with-two-hosts.yml
1083
1068
  - spec/spec_tests/data/gridfs/delete.yml
1084
1069
  - spec/spec_tests/data/gridfs/download.yml
1085
1070
  - spec/spec_tests/data/gridfs/download_by_name.yml
1086
1071
  - spec/spec_tests/data/gridfs/upload.yml
1072
+ - spec/spec_tests/data/load_balancers/event-monitoring.yml
1073
+ - spec/spec_tests/data/load_balancers/lb-connection-establishment.yml
1074
+ - spec/spec_tests/data/load_balancers/non-lb-connection-establishment.yml
1075
+ - spec/spec_tests/data/load_balancers/server-selection.yml
1087
1076
  - spec/spec_tests/data/max_staleness/ReplicaSetNoPrimary/DefaultNoMaxStaleness.yml
1088
1077
  - spec/spec_tests/data/max_staleness/ReplicaSetNoPrimary/Incompatible.yml
1089
1078
  - spec/spec_tests/data/max_staleness/ReplicaSetNoPrimary/LastUpdateTime.yml
@@ -1281,6 +1270,7 @@ files:
1281
1270
  - spec/spec_tests/data/sdam/errors/stale-topologyVersion-PrimarySteppedDown.yml
1282
1271
  - spec/spec_tests/data/sdam/errors/stale-topologyVersion-ShutdownInProgress.yml
1283
1272
  - spec/spec_tests/data/sdam/errors/write_errors_ignored.yml
1273
+ - spec/spec_tests/data/sdam/load-balanced/discover_load_balancer.yml
1284
1274
  - spec/spec_tests/data/sdam/rs/compatible.yml
1285
1275
  - spec/spec_tests/data/sdam/rs/compatible_unknown.yml
1286
1276
  - spec/spec_tests/data/sdam/rs/discover_arbiters.yml
@@ -1390,6 +1380,7 @@ files:
1390
1380
  - spec/spec_tests/data/sdam_integration/insert-shutdown-error.yml
1391
1381
  - spec/spec_tests/data/sdam_integration/rediscover-quickly-after-step-down.yml
1392
1382
  - spec/spec_tests/data/sdam_monitoring/discovered_standalone.yml
1383
+ - spec/spec_tests/data/sdam_monitoring/load_balancer.yml
1393
1384
  - spec/spec_tests/data/sdam_monitoring/replica_set_other_chain.yml
1394
1385
  - spec/spec_tests/data/sdam_monitoring/replica_set_other_change.yml
1395
1386
  - spec/spec_tests/data/sdam_monitoring/replica_set_primary_address_change.yml
@@ -1405,6 +1396,39 @@ files:
1405
1396
  - spec/spec_tests/data/sdam_monitoring/standalone_repeated.yml
1406
1397
  - spec/spec_tests/data/sdam_monitoring/standalone_suppress_equal_description_changes.yml
1407
1398
  - spec/spec_tests/data/sdam_monitoring/standalone_to_rs_with_me_mismatch.yml
1399
+ - spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-directConnection.yml
1400
+ - spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-replicaSet-errors.yml
1401
+ - spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-true-multiple-hosts.yml
1402
+ - spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-true-txt.yml
1403
+ - spec/spec_tests/data/seed_list_discovery/replica-set/direct-connection-false.yml
1404
+ - spec/spec_tests/data/seed_list_discovery/replica-set/direct-connection-true.yml
1405
+ - spec/spec_tests/data/seed_list_discovery/replica-set/encoded-userinfo-and-db.yml
1406
+ - spec/spec_tests/data/seed_list_discovery/replica-set/loadBalanced-false-txt.yml
1407
+ - spec/spec_tests/data/seed_list_discovery/replica-set/longer-parent-in-return.yml
1408
+ - spec/spec_tests/data/seed_list_discovery/replica-set/misformatted-option.yml
1409
+ - spec/spec_tests/data/seed_list_discovery/replica-set/no-results.yml
1410
+ - spec/spec_tests/data/seed_list_discovery/replica-set/not-enough-parts.yml
1411
+ - spec/spec_tests/data/seed_list_discovery/replica-set/one-result-default-port.yml
1412
+ - spec/spec_tests/data/seed_list_discovery/replica-set/one-txt-record-multiple-strings.yml
1413
+ - spec/spec_tests/data/seed_list_discovery/replica-set/one-txt-record.yml
1414
+ - spec/spec_tests/data/seed_list_discovery/replica-set/parent-part-mismatch1.yml
1415
+ - spec/spec_tests/data/seed_list_discovery/replica-set/parent-part-mismatch2.yml
1416
+ - spec/spec_tests/data/seed_list_discovery/replica-set/parent-part-mismatch3.yml
1417
+ - spec/spec_tests/data/seed_list_discovery/replica-set/parent-part-mismatch4.yml
1418
+ - spec/spec_tests/data/seed_list_discovery/replica-set/parent-part-mismatch5.yml
1419
+ - spec/spec_tests/data/seed_list_discovery/replica-set/returned-parent-too-short.yml
1420
+ - spec/spec_tests/data/seed_list_discovery/replica-set/returned-parent-wrong.yml
1421
+ - spec/spec_tests/data/seed_list_discovery/replica-set/two-results-default-port.yml
1422
+ - spec/spec_tests/data/seed_list_discovery/replica-set/two-results-nonstandard-port.yml
1423
+ - spec/spec_tests/data/seed_list_discovery/replica-set/two-txt-records.yml
1424
+ - spec/spec_tests/data/seed_list_discovery/replica-set/txt-record-not-allowed-option.yml
1425
+ - spec/spec_tests/data/seed_list_discovery/replica-set/txt-record-with-overridden-ssl-option.yml
1426
+ - spec/spec_tests/data/seed_list_discovery/replica-set/txt-record-with-overridden-uri-option.yml
1427
+ - spec/spec_tests/data/seed_list_discovery/replica-set/txt-record-with-unallowed-option.yml
1428
+ - spec/spec_tests/data/seed_list_discovery/replica-set/uri-with-admin-database.yml
1429
+ - spec/spec_tests/data/seed_list_discovery/replica-set/uri-with-auth.yml
1430
+ - spec/spec_tests/data/seed_list_discovery/replica-set/uri-with-port.yml
1431
+ - spec/spec_tests/data/seed_list_discovery/replica-set/uri-with-two-hosts.yml
1408
1432
  - spec/spec_tests/data/server_selection/ReplicaSetNoPrimary/read/Nearest.yml
1409
1433
  - spec/spec_tests/data/server_selection/ReplicaSetNoPrimary/read/Nearest_multiple.yml
1410
1434
  - spec/spec_tests/data/server_selection/ReplicaSetNoPrimary/read/Nearest_non_matching.yml
@@ -1512,8 +1536,8 @@ files:
1512
1536
  - spec/spec_tests/data/versioned_api/test-commands-deprecation-errors.yml
1513
1537
  - spec/spec_tests/data/versioned_api/test-commands-strict-mode.yml
1514
1538
  - spec/spec_tests/data/versioned_api/transaction-handling.yml
1515
- - spec/spec_tests/dns_seedlist_discovery_spec.rb
1516
1539
  - spec/spec_tests/gridfs_spec.rb
1540
+ - spec/spec_tests/load_balancers_spec.rb
1517
1541
  - spec/spec_tests/max_staleness_spec.rb
1518
1542
  - spec/spec_tests/read_write_concern_connection_string_spec.rb
1519
1543
  - spec/spec_tests/read_write_concern_document_spec.rb
@@ -1523,6 +1547,7 @@ files:
1523
1547
  - spec/spec_tests/sdam_integration_spec.rb
1524
1548
  - spec/spec_tests/sdam_monitoring_spec.rb
1525
1549
  - spec/spec_tests/sdam_spec.rb
1550
+ - spec/spec_tests/seed_list_discovery_spec.rb
1526
1551
  - spec/spec_tests/server_selection_rtt_spec.rb
1527
1552
  - spec/spec_tests/server_selection_spec.rb
1528
1553
  - spec/spec_tests/transactions_api_spec.rb
@@ -1592,7 +1617,6 @@ files:
1592
1617
  - spec/support/crypt/schema_maps/schema_map_local.json
1593
1618
  - spec/support/crypt/schema_maps/schema_map_local_key_alt_names.json
1594
1619
  - spec/support/dns.rb
1595
- - spec/support/event_subscriber.rb
1596
1620
  - spec/support/json_ext_formatter.rb
1597
1621
  - spec/support/keyword_struct.rb
1598
1622
  - spec/support/local_resource_registry.rb
@@ -1603,12 +1627,14 @@ files:
1603
1627
  - spec/support/sdam_formatter_integration.rb
1604
1628
  - spec/support/session_registry.rb
1605
1629
  - spec/support/shared/app_metadata.rb
1630
+ - spec/support/shared/auth_context.rb
1606
1631
  - spec/support/shared/protocol.rb
1607
1632
  - spec/support/shared/scram_conversation.rb
1608
1633
  - spec/support/shared/server_selector.rb
1609
1634
  - spec/support/shared/session.rb
1610
1635
  - spec/support/spec_config.rb
1611
1636
  - spec/support/spec_setup.rb
1637
+ - spec/support/using_hash.rb
1612
1638
  - spec/support/utils.rb
1613
1639
  homepage: https://docs.mongodb.com/ruby-driver/
1614
1640
  licenses:
@@ -1627,12 +1653,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
1627
1653
  requirements:
1628
1654
  - - ">="
1629
1655
  - !ruby/object:Gem::Version
1630
- version: '2.3'
1656
+ version: '2.4'
1631
1657
  required_rubygems_version: !ruby/object:Gem::Requirement
1632
1658
  requirements:
1633
- - - ">="
1659
+ - - ">"
1634
1660
  - !ruby/object:Gem::Version
1635
- version: '0'
1661
+ version: 1.3.1
1636
1662
  requirements: []
1637
1663
  rubyforge_project:
1638
1664
  rubygems_version: 2.7.6.2
@@ -1685,6 +1711,7 @@ test_files:
1685
1711
  - spec/integration/connection_pool_populator_spec.rb
1686
1712
  - spec/integration/connection_spec.rb
1687
1713
  - spec/integration/crud_spec.rb
1714
+ - spec/integration/cursor_pinning_spec.rb
1688
1715
  - spec/integration/cursor_reaping_spec.rb
1689
1716
  - spec/integration/docs_examples_spec.rb
1690
1717
  - spec/integration/error_detection_spec.rb
@@ -1692,6 +1719,7 @@ test_files:
1692
1719
  - spec/integration/get_more_spec.rb
1693
1720
  - spec/integration/grid_fs_bucket_spec.rb
1694
1721
  - spec/integration/heartbeat_events_spec.rb
1722
+ - spec/integration/map_reduce_spec.rb
1695
1723
  - spec/integration/mmapv1_spec.rb
1696
1724
  - spec/integration/mongos_pinning_spec.rb
1697
1725
  - spec/integration/ocsp_connectivity_spec.rb
@@ -1734,6 +1762,7 @@ test_files:
1734
1762
  - spec/integration/ssl_uri_options_spec.rb
1735
1763
  - spec/integration/step_down_spec.rb
1736
1764
  - spec/integration/time_zone_querying_spec.rb
1765
+ - spec/integration/transaction_pinning_spec.rb
1737
1766
  - spec/integration/transactions_api_examples_spec.rb
1738
1767
  - spec/integration/transactions_examples_spec.rb
1739
1768
  - spec/integration/truncated_utf8_spec.rb
@@ -1787,8 +1816,6 @@ test_files:
1787
1816
  - spec/mongo/cluster_time_spec.rb
1788
1817
  - spec/mongo/collection/view/aggregation_spec.rb
1789
1818
  - spec/mongo/collection/view/builder/find_command_spec.rb
1790
- - spec/mongo/collection/view/builder/flags_spec.rb
1791
- - spec/mongo/collection/view/builder/modifiers_spec.rb
1792
1819
  - spec/mongo/collection/view/builder/op_query_spec.rb
1793
1820
  - spec/mongo/collection/view/change_stream_resume_spec.rb
1794
1821
  - spec/mongo/collection/view/change_stream_spec.rb
@@ -1822,7 +1849,6 @@ test_files:
1822
1849
  - spec/mongo/crypt/status_spec.rb
1823
1850
  - spec/mongo/cursor/builder/get_more_command_spec.rb
1824
1851
  - spec/mongo/cursor/builder/op_get_more_spec.rb
1825
- - spec/mongo/cursor/builder/op_kill_cursors_spec.rb
1826
1852
  - spec/mongo/cursor_spec.rb
1827
1853
  - spec/mongo/database_spec.rb
1828
1854
  - spec/mongo/dbref_spec.rb
@@ -1885,6 +1911,8 @@ test_files:
1885
1911
  - spec/mongo/operation/delete/op_msg_spec.rb
1886
1912
  - spec/mongo/operation/delete_spec.rb
1887
1913
  - spec/mongo/operation/drop_index_spec.rb
1914
+ - spec/mongo/operation/find/builder/flags_spec.rb
1915
+ - spec/mongo/operation/find/builder/modifiers_spec.rb
1888
1916
  - spec/mongo/operation/find/legacy_spec.rb
1889
1917
  - spec/mongo/operation/get_more_spec.rb
1890
1918
  - spec/mongo/operation/indexes_spec.rb
@@ -1998,7 +2026,6 @@ test_files:
1998
2026
  - spec/runners/unified/support_operations.rb
1999
2027
  - spec/runners/unified/test.rb
2000
2028
  - spec/runners/unified/test_group.rb
2001
- - spec/runners/unified/using_hash.rb
2002
2029
  - spec/runners/unified.rb
2003
2030
  - spec/shared/LICENSE
2004
2031
  - spec/shared/bin/get-mongodb-download-url
@@ -2008,6 +2035,7 @@ test_files:
2008
2035
  - spec/shared/lib/mrss/cluster_config.rb
2009
2036
  - spec/shared/lib/mrss/constraints.rb
2010
2037
  - spec/shared/lib/mrss/docker_runner.rb
2038
+ - spec/shared/lib/mrss/event_subscriber.rb
2011
2039
  - spec/shared/lib/mrss/lite_constraints.rb
2012
2040
  - spec/shared/lib/mrss/server_version_registry.rb
2013
2041
  - spec/shared/lib/mrss/spec_organizer.rb
@@ -2193,35 +2221,14 @@ test_files:
2193
2221
  - spec/spec_tests/data/crud_v2/updateOne-hint-serverError.yml
2194
2222
  - spec/spec_tests/data/crud_v2/updateOne-hint.yml
2195
2223
  - spec/spec_tests/data/crud_v2/updateWithPipelines.yml
2196
- - spec/spec_tests/data/dns_seedlist_discovery/direct-connection-false.yml
2197
- - spec/spec_tests/data/dns_seedlist_discovery/direct-connection-true.yml
2198
- - spec/spec_tests/data/dns_seedlist_discovery/longer-parent-in-return.yml
2199
- - spec/spec_tests/data/dns_seedlist_discovery/misformatted-option.yml
2200
- - spec/spec_tests/data/dns_seedlist_discovery/no-results.yml
2201
- - spec/spec_tests/data/dns_seedlist_discovery/not-enough-parts.yml
2202
- - spec/spec_tests/data/dns_seedlist_discovery/one-result-default-port.yml
2203
- - spec/spec_tests/data/dns_seedlist_discovery/one-txt-record-multiple-strings.yml
2204
- - spec/spec_tests/data/dns_seedlist_discovery/one-txt-record.yml
2205
- - spec/spec_tests/data/dns_seedlist_discovery/parent-part-mismatch1.yml
2206
- - spec/spec_tests/data/dns_seedlist_discovery/parent-part-mismatch2.yml
2207
- - spec/spec_tests/data/dns_seedlist_discovery/parent-part-mismatch3.yml
2208
- - spec/spec_tests/data/dns_seedlist_discovery/parent-part-mismatch4.yml
2209
- - spec/spec_tests/data/dns_seedlist_discovery/parent-part-mismatch5.yml
2210
- - spec/spec_tests/data/dns_seedlist_discovery/returned-parent-too-short.yml
2211
- - spec/spec_tests/data/dns_seedlist_discovery/returned-parent-wrong.yml
2212
- - spec/spec_tests/data/dns_seedlist_discovery/two-results-default-port.yml
2213
- - spec/spec_tests/data/dns_seedlist_discovery/two-results-nonstandard-port.yml
2214
- - spec/spec_tests/data/dns_seedlist_discovery/two-txt-records.yml
2215
- - spec/spec_tests/data/dns_seedlist_discovery/txt-record-not-allowed-option.yml
2216
- - spec/spec_tests/data/dns_seedlist_discovery/txt-record-with-overridden-ssl-option.yml
2217
- - spec/spec_tests/data/dns_seedlist_discovery/txt-record-with-overridden-uri-option.yml
2218
- - spec/spec_tests/data/dns_seedlist_discovery/txt-record-with-unallowed-option.yml
2219
- - spec/spec_tests/data/dns_seedlist_discovery/uri-with-port.yml
2220
- - spec/spec_tests/data/dns_seedlist_discovery/uri-with-two-hosts.yml
2221
2224
  - spec/spec_tests/data/gridfs/delete.yml
2222
2225
  - spec/spec_tests/data/gridfs/download.yml
2223
2226
  - spec/spec_tests/data/gridfs/download_by_name.yml
2224
2227
  - spec/spec_tests/data/gridfs/upload.yml
2228
+ - spec/spec_tests/data/load_balancers/event-monitoring.yml
2229
+ - spec/spec_tests/data/load_balancers/lb-connection-establishment.yml
2230
+ - spec/spec_tests/data/load_balancers/non-lb-connection-establishment.yml
2231
+ - spec/spec_tests/data/load_balancers/server-selection.yml
2225
2232
  - spec/spec_tests/data/max_staleness/ReplicaSetNoPrimary/DefaultNoMaxStaleness.yml
2226
2233
  - spec/spec_tests/data/max_staleness/ReplicaSetNoPrimary/Incompatible.yml
2227
2234
  - spec/spec_tests/data/max_staleness/ReplicaSetNoPrimary/LastUpdateTime.yml
@@ -2419,6 +2426,7 @@ test_files:
2419
2426
  - spec/spec_tests/data/sdam/errors/stale-topologyVersion-PrimarySteppedDown.yml
2420
2427
  - spec/spec_tests/data/sdam/errors/stale-topologyVersion-ShutdownInProgress.yml
2421
2428
  - spec/spec_tests/data/sdam/errors/write_errors_ignored.yml
2429
+ - spec/spec_tests/data/sdam/load-balanced/discover_load_balancer.yml
2422
2430
  - spec/spec_tests/data/sdam/rs/compatible.yml
2423
2431
  - spec/spec_tests/data/sdam/rs/compatible_unknown.yml
2424
2432
  - spec/spec_tests/data/sdam/rs/discover_arbiters.yml
@@ -2528,6 +2536,7 @@ test_files:
2528
2536
  - spec/spec_tests/data/sdam_integration/insert-shutdown-error.yml
2529
2537
  - spec/spec_tests/data/sdam_integration/rediscover-quickly-after-step-down.yml
2530
2538
  - spec/spec_tests/data/sdam_monitoring/discovered_standalone.yml
2539
+ - spec/spec_tests/data/sdam_monitoring/load_balancer.yml
2531
2540
  - spec/spec_tests/data/sdam_monitoring/replica_set_other_chain.yml
2532
2541
  - spec/spec_tests/data/sdam_monitoring/replica_set_other_change.yml
2533
2542
  - spec/spec_tests/data/sdam_monitoring/replica_set_primary_address_change.yml
@@ -2543,6 +2552,39 @@ test_files:
2543
2552
  - spec/spec_tests/data/sdam_monitoring/standalone_repeated.yml
2544
2553
  - spec/spec_tests/data/sdam_monitoring/standalone_suppress_equal_description_changes.yml
2545
2554
  - spec/spec_tests/data/sdam_monitoring/standalone_to_rs_with_me_mismatch.yml
2555
+ - spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-directConnection.yml
2556
+ - spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-replicaSet-errors.yml
2557
+ - spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-true-multiple-hosts.yml
2558
+ - spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-true-txt.yml
2559
+ - spec/spec_tests/data/seed_list_discovery/replica-set/direct-connection-false.yml
2560
+ - spec/spec_tests/data/seed_list_discovery/replica-set/direct-connection-true.yml
2561
+ - spec/spec_tests/data/seed_list_discovery/replica-set/encoded-userinfo-and-db.yml
2562
+ - spec/spec_tests/data/seed_list_discovery/replica-set/loadBalanced-false-txt.yml
2563
+ - spec/spec_tests/data/seed_list_discovery/replica-set/longer-parent-in-return.yml
2564
+ - spec/spec_tests/data/seed_list_discovery/replica-set/misformatted-option.yml
2565
+ - spec/spec_tests/data/seed_list_discovery/replica-set/no-results.yml
2566
+ - spec/spec_tests/data/seed_list_discovery/replica-set/not-enough-parts.yml
2567
+ - spec/spec_tests/data/seed_list_discovery/replica-set/one-result-default-port.yml
2568
+ - spec/spec_tests/data/seed_list_discovery/replica-set/one-txt-record-multiple-strings.yml
2569
+ - spec/spec_tests/data/seed_list_discovery/replica-set/one-txt-record.yml
2570
+ - spec/spec_tests/data/seed_list_discovery/replica-set/parent-part-mismatch1.yml
2571
+ - spec/spec_tests/data/seed_list_discovery/replica-set/parent-part-mismatch2.yml
2572
+ - spec/spec_tests/data/seed_list_discovery/replica-set/parent-part-mismatch3.yml
2573
+ - spec/spec_tests/data/seed_list_discovery/replica-set/parent-part-mismatch4.yml
2574
+ - spec/spec_tests/data/seed_list_discovery/replica-set/parent-part-mismatch5.yml
2575
+ - spec/spec_tests/data/seed_list_discovery/replica-set/returned-parent-too-short.yml
2576
+ - spec/spec_tests/data/seed_list_discovery/replica-set/returned-parent-wrong.yml
2577
+ - spec/spec_tests/data/seed_list_discovery/replica-set/two-results-default-port.yml
2578
+ - spec/spec_tests/data/seed_list_discovery/replica-set/two-results-nonstandard-port.yml
2579
+ - spec/spec_tests/data/seed_list_discovery/replica-set/two-txt-records.yml
2580
+ - spec/spec_tests/data/seed_list_discovery/replica-set/txt-record-not-allowed-option.yml
2581
+ - spec/spec_tests/data/seed_list_discovery/replica-set/txt-record-with-overridden-ssl-option.yml
2582
+ - spec/spec_tests/data/seed_list_discovery/replica-set/txt-record-with-overridden-uri-option.yml
2583
+ - spec/spec_tests/data/seed_list_discovery/replica-set/txt-record-with-unallowed-option.yml
2584
+ - spec/spec_tests/data/seed_list_discovery/replica-set/uri-with-admin-database.yml
2585
+ - spec/spec_tests/data/seed_list_discovery/replica-set/uri-with-auth.yml
2586
+ - spec/spec_tests/data/seed_list_discovery/replica-set/uri-with-port.yml
2587
+ - spec/spec_tests/data/seed_list_discovery/replica-set/uri-with-two-hosts.yml
2546
2588
  - spec/spec_tests/data/server_selection/ReplicaSetNoPrimary/read/Nearest.yml
2547
2589
  - spec/spec_tests/data/server_selection/ReplicaSetNoPrimary/read/Nearest_multiple.yml
2548
2590
  - spec/spec_tests/data/server_selection/ReplicaSetNoPrimary/read/Nearest_non_matching.yml
@@ -2650,8 +2692,8 @@ test_files:
2650
2692
  - spec/spec_tests/data/versioned_api/test-commands-deprecation-errors.yml
2651
2693
  - spec/spec_tests/data/versioned_api/test-commands-strict-mode.yml
2652
2694
  - spec/spec_tests/data/versioned_api/transaction-handling.yml
2653
- - spec/spec_tests/dns_seedlist_discovery_spec.rb
2654
2695
  - spec/spec_tests/gridfs_spec.rb
2696
+ - spec/spec_tests/load_balancers_spec.rb
2655
2697
  - spec/spec_tests/max_staleness_spec.rb
2656
2698
  - spec/spec_tests/read_write_concern_connection_string_spec.rb
2657
2699
  - spec/spec_tests/read_write_concern_document_spec.rb
@@ -2661,6 +2703,7 @@ test_files:
2661
2703
  - spec/spec_tests/sdam_integration_spec.rb
2662
2704
  - spec/spec_tests/sdam_monitoring_spec.rb
2663
2705
  - spec/spec_tests/sdam_spec.rb
2706
+ - spec/spec_tests/seed_list_discovery_spec.rb
2664
2707
  - spec/spec_tests/server_selection_rtt_spec.rb
2665
2708
  - spec/spec_tests/server_selection_spec.rb
2666
2709
  - spec/spec_tests/transactions_api_spec.rb
@@ -2730,7 +2773,6 @@ test_files:
2730
2773
  - spec/support/crypt/schema_maps/schema_map_local_key_alt_names.json
2731
2774
  - spec/support/crypt.rb
2732
2775
  - spec/support/dns.rb
2733
- - spec/support/event_subscriber.rb
2734
2776
  - spec/support/json_ext_formatter.rb
2735
2777
  - spec/support/keyword_struct.rb
2736
2778
  - spec/support/local_resource_registry.rb
@@ -2741,10 +2783,12 @@ test_files:
2741
2783
  - spec/support/sdam_formatter_integration.rb
2742
2784
  - spec/support/session_registry.rb
2743
2785
  - spec/support/shared/app_metadata.rb
2786
+ - spec/support/shared/auth_context.rb
2744
2787
  - spec/support/shared/protocol.rb
2745
2788
  - spec/support/shared/scram_conversation.rb
2746
2789
  - spec/support/shared/server_selector.rb
2747
2790
  - spec/support/shared/session.rb
2748
2791
  - spec/support/spec_config.rb
2749
2792
  - spec/support/spec_setup.rb
2793
+ - spec/support/using_hash.rb
2750
2794
  - spec/support/utils.rb
metadata.gz.sig CHANGED
Binary file