mongo 2.20.0 → 2.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (296) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +40 -1
  3. data/Rakefile +59 -23
  4. data/lib/mongo/address.rb +22 -3
  5. data/lib/mongo/auth/aws/credentials_retriever.rb +70 -17
  6. data/lib/mongo/auth/base.rb +1 -1
  7. data/lib/mongo/bulk_write.rb +35 -2
  8. data/lib/mongo/client.rb +38 -6
  9. data/lib/mongo/client_encryption.rb +6 -3
  10. data/lib/mongo/cluster/reapers/cursor_reaper.rb +6 -1
  11. data/lib/mongo/cluster/sdam_flow.rb +20 -7
  12. data/lib/mongo/cluster.rb +14 -4
  13. data/lib/mongo/collection/helpers.rb +1 -1
  14. data/lib/mongo/collection/view/aggregation/behavior.rb +131 -0
  15. data/lib/mongo/collection/view/aggregation.rb +33 -99
  16. data/lib/mongo/collection/view/builder/aggregation.rb +1 -7
  17. data/lib/mongo/collection/view/change_stream.rb +80 -27
  18. data/lib/mongo/collection/view/iterable.rb +76 -60
  19. data/lib/mongo/collection/view/map_reduce.rb +25 -8
  20. data/lib/mongo/collection/view/readable.rb +79 -30
  21. data/lib/mongo/collection/view/writable.rb +109 -48
  22. data/lib/mongo/collection/view.rb +43 -3
  23. data/lib/mongo/collection.rb +158 -23
  24. data/lib/mongo/config.rb +2 -2
  25. data/lib/mongo/crypt/auto_encrypter.rb +4 -6
  26. data/lib/mongo/crypt/binding.rb +4 -4
  27. data/lib/mongo/crypt/context.rb +20 -14
  28. data/lib/mongo/crypt/encryption_io.rb +56 -26
  29. data/lib/mongo/crypt/explicit_encrypter.rb +49 -20
  30. data/lib/mongo/crypt/explicit_encryption_context.rb +17 -11
  31. data/lib/mongo/crypt/kms/azure/credentials_retriever.rb +22 -6
  32. data/lib/mongo/crypt/kms/gcp/credentials_retriever.rb +29 -4
  33. data/lib/mongo/csot_timeout_holder.rb +119 -0
  34. data/lib/mongo/cursor/kill_spec.rb +5 -2
  35. data/lib/mongo/cursor/nontailable.rb +27 -0
  36. data/lib/mongo/cursor.rb +86 -24
  37. data/lib/mongo/cursor_host.rb +82 -0
  38. data/lib/mongo/database/view.rb +81 -14
  39. data/lib/mongo/database.rb +88 -18
  40. data/lib/mongo/error/operation_failure.rb +209 -204
  41. data/lib/mongo/error/server_timeout_error.rb +12 -0
  42. data/lib/mongo/error/socket_timeout_error.rb +3 -1
  43. data/lib/mongo/error/timeout_error.rb +23 -0
  44. data/lib/mongo/error.rb +2 -0
  45. data/lib/mongo/grid/fs_bucket.rb +45 -12
  46. data/lib/mongo/grid/stream/read.rb +15 -1
  47. data/lib/mongo/grid/stream/write.rb +21 -4
  48. data/lib/mongo/index/view.rb +77 -16
  49. data/lib/mongo/operation/context.rb +40 -2
  50. data/lib/mongo/operation/create_search_indexes/op_msg.rb +2 -2
  51. data/lib/mongo/operation/delete/op_msg.rb +2 -1
  52. data/lib/mongo/operation/drop_search_index/op_msg.rb +2 -2
  53. data/lib/mongo/operation/find/op_msg.rb +45 -0
  54. data/lib/mongo/operation/get_more/op_msg.rb +33 -0
  55. data/lib/mongo/operation/insert/op_msg.rb +3 -2
  56. data/lib/mongo/operation/insert/result.rb +4 -2
  57. data/lib/mongo/operation/list_collections/result.rb +1 -1
  58. data/lib/mongo/operation/map_reduce/result.rb +1 -1
  59. data/lib/mongo/operation/op_msg_base.rb +3 -1
  60. data/lib/mongo/operation/result.rb +26 -5
  61. data/lib/mongo/operation/shared/executable.rb +12 -1
  62. data/lib/mongo/operation/shared/op_msg_executable.rb +4 -1
  63. data/lib/mongo/operation/shared/response_handling.rb +3 -3
  64. data/lib/mongo/operation/shared/sessions_supported.rb +1 -1
  65. data/lib/mongo/operation/shared/timed.rb +52 -0
  66. data/lib/mongo/operation/shared/write.rb +4 -1
  67. data/lib/mongo/operation/update/op_msg.rb +2 -1
  68. data/lib/mongo/operation/update_search_index/op_msg.rb +2 -2
  69. data/lib/mongo/operation.rb +1 -0
  70. data/lib/mongo/protocol/message.rb +1 -4
  71. data/lib/mongo/protocol/msg.rb +2 -2
  72. data/lib/mongo/retryable/base_worker.rb +28 -3
  73. data/lib/mongo/retryable/read_worker.rb +76 -35
  74. data/lib/mongo/retryable/write_worker.rb +53 -22
  75. data/lib/mongo/retryable.rb +8 -2
  76. data/lib/mongo/server/connection.rb +11 -5
  77. data/lib/mongo/server/connection_base.rb +22 -2
  78. data/lib/mongo/server/connection_pool.rb +32 -14
  79. data/lib/mongo/server/description/features.rb +1 -1
  80. data/lib/mongo/server/description.rb +18 -5
  81. data/lib/mongo/server/monitor.rb +7 -4
  82. data/lib/mongo/server/pending_connection.rb +25 -8
  83. data/lib/mongo/server/{round_trip_time_averager.rb → round_trip_time_calculator.rb} +25 -7
  84. data/lib/mongo/server.rb +11 -6
  85. data/lib/mongo/server_selector/base.rb +25 -9
  86. data/lib/mongo/session.rb +78 -9
  87. data/lib/mongo/socket/ssl.rb +131 -18
  88. data/lib/mongo/socket/tcp.rb +40 -6
  89. data/lib/mongo/socket.rb +154 -25
  90. data/lib/mongo/uri/options_mapper.rb +1 -0
  91. data/lib/mongo/version.rb +1 -5
  92. data/lib/mongo.rb +1 -0
  93. data/mongo.gemspec +8 -11
  94. data/spec/atlas/atlas_connectivity_spec.rb +4 -0
  95. data/spec/atlas/operations_spec.rb +4 -0
  96. data/spec/integration/client_side_encryption/auto_encryption_mongocryptd_spawn_spec.rb +2 -1
  97. data/spec/integration/client_side_encryption/auto_encryption_spec.rb +494 -487
  98. data/spec/integration/client_side_encryption/on_demand_aws_credentials_spec.rb +1 -1
  99. data/spec/integration/client_side_encryption/range_explicit_encryption_prose_spec.rb +67 -20
  100. data/spec/integration/client_side_operations_timeout/encryption_prose_spec.rb +131 -0
  101. data/spec/integration/connection_pool_populator_spec.rb +2 -0
  102. data/spec/integration/cursor_pinning_spec.rb +15 -60
  103. data/spec/integration/cursor_reaping_spec.rb +1 -1
  104. data/spec/integration/docs_examples_spec.rb +1 -1
  105. data/spec/integration/operation_failure_code_spec.rb +1 -1
  106. data/spec/integration/operation_failure_message_spec.rb +3 -3
  107. data/spec/integration/retryable_errors_spec.rb +2 -2
  108. data/spec/integration/retryable_reads_errors_spec.rb +35 -23
  109. data/spec/integration/sdam_error_handling_spec.rb +4 -1
  110. data/spec/integration/search_indexes_prose_spec.rb +4 -0
  111. data/spec/integration/server_spec.rb +4 -3
  112. data/spec/integration/transactions_api_examples_spec.rb +2 -0
  113. data/spec/kerberos/kerberos_spec.rb +4 -0
  114. data/spec/lite_spec_helper.rb +3 -11
  115. data/spec/mongo/auth/user/view_spec.rb +1 -1
  116. data/spec/mongo/caching_cursor_spec.rb +1 -1
  117. data/spec/mongo/client_encryption_spec.rb +1 -0
  118. data/spec/mongo/client_spec.rb +158 -4
  119. data/spec/mongo/collection/view/aggregation_spec.rb +14 -39
  120. data/spec/mongo/collection/view/change_stream_spec.rb +3 -3
  121. data/spec/mongo/collection_crud_spec.rb +1 -0
  122. data/spec/mongo/collection_spec.rb +5 -6
  123. data/spec/mongo/crypt/auto_encrypter_spec.rb +14 -12
  124. data/spec/mongo/crypt/data_key_context_spec.rb +3 -1
  125. data/spec/mongo/crypt/explicit_encryption_context_spec.rb +2 -2
  126. data/spec/mongo/crypt/handle_spec.rb +1 -1
  127. data/spec/mongo/cursor_spec.rb +26 -9
  128. data/spec/mongo/error/operation_failure_heavy_spec.rb +2 -2
  129. data/spec/mongo/operation/context_spec.rb +79 -0
  130. data/spec/mongo/operation/create/op_msg_spec.rb +106 -110
  131. data/spec/mongo/operation/delete/op_msg_spec.rb +6 -5
  132. data/spec/mongo/operation/find/op_msg_spec.rb +66 -0
  133. data/spec/mongo/operation/get_more/op_msg_spec.rb +65 -0
  134. data/spec/mongo/operation/insert/op_msg_spec.rb +128 -131
  135. data/spec/mongo/operation/shared/csot/examples.rb +113 -0
  136. data/spec/mongo/query_cache_spec.rb +243 -225
  137. data/spec/mongo/retryable_spec.rb +1 -0
  138. data/spec/mongo/server/connection_spec.rb +22 -0
  139. data/spec/mongo/server/round_trip_time_calculator_spec.rb +120 -0
  140. data/spec/mongo/socket/ssl_spec.rb +0 -10
  141. data/spec/runners/change_streams/test.rb +2 -2
  142. data/spec/runners/crud/operation.rb +1 -1
  143. data/spec/runners/crud/verifier.rb +3 -1
  144. data/spec/runners/transactions/operation.rb +4 -6
  145. data/spec/runners/unified/ambiguous_operations.rb +13 -0
  146. data/spec/runners/unified/assertions.rb +4 -0
  147. data/spec/runners/unified/change_stream_operations.rb +14 -24
  148. data/spec/runners/unified/crud_operations.rb +82 -59
  149. data/spec/runners/unified/ddl_operations.rb +38 -7
  150. data/spec/runners/unified/grid_fs_operations.rb +37 -2
  151. data/spec/runners/unified/support_operations.rb +43 -4
  152. data/spec/runners/unified/test.rb +22 -10
  153. data/spec/runners/unified.rb +1 -1
  154. data/spec/solo/clean_exit_spec.rb +2 -0
  155. data/spec/spec_tests/client_side_operations_timeout_spec.rb +15 -0
  156. data/spec/spec_tests/data/change_streams_unified/change-streams-clusterTime.yml +3 -1
  157. data/spec/spec_tests/data/change_streams_unified/change-streams-disambiguatedPaths.yml +3 -1
  158. data/spec/spec_tests/data/change_streams_unified/change-streams-errors.yml +3 -1
  159. data/spec/spec_tests/data/change_streams_unified/change-streams-pre_and_post_images.yml +1 -1
  160. data/spec/spec_tests/data/change_streams_unified/change-streams-resume-allowlist.yml +1 -1
  161. data/spec/spec_tests/data/change_streams_unified/change-streams-resume-errorLabels.yml +1 -1
  162. data/spec/spec_tests/data/change_streams_unified/change-streams-showExpandedEvents.yml +1 -1
  163. data/spec/spec_tests/data/client_side_encryption/badQueries.yml +2 -1
  164. data/spec/spec_tests/data/client_side_encryption/fle2v2-BypassQueryAnalysis.yml +1 -0
  165. data/spec/spec_tests/data/client_side_encryption/fle2v2-Compact.yml +1 -0
  166. data/spec/spec_tests/data/client_side_encryption/fle2v2-CreateCollection.yml +1 -0
  167. data/spec/spec_tests/data/client_side_encryption/fle2v2-DecryptExistingData.yml +1 -0
  168. data/spec/spec_tests/data/client_side_encryption/fle2v2-Delete.yml +1 -0
  169. data/spec/spec_tests/data/client_side_encryption/fle2v2-EncryptedFields-vs-EncryptedFieldsMap.yml +1 -0
  170. data/spec/spec_tests/data/client_side_encryption/fle2v2-EncryptedFields-vs-jsonSchema.yml +1 -0
  171. data/spec/spec_tests/data/client_side_encryption/fle2v2-EncryptedFieldsMap-defaults.yml +1 -0
  172. data/spec/spec_tests/data/client_side_encryption/fle2v2-FindOneAndUpdate.yml +1 -0
  173. data/spec/spec_tests/data/client_side_encryption/fle2v2-InsertFind-Indexed.yml +1 -0
  174. data/spec/spec_tests/data/client_side_encryption/fle2v2-InsertFind-Unindexed.yml +1 -0
  175. data/spec/spec_tests/data/client_side_encryption/fle2v2-MissingKey.yml +1 -0
  176. data/spec/spec_tests/data/client_side_encryption/fle2v2-NoEncryption.yml +1 -0
  177. data/spec/spec_tests/data/client_side_encryption/fle2v2-Update.yml +1 -0
  178. data/spec/spec_tests/data/client_side_encryption/fle2v2-validatorAndPartialFieldExpression.yml +2 -1
  179. data/spec/spec_tests/data/client_side_encryption/timeoutMS.yml +67 -0
  180. data/spec/spec_tests/data/client_side_operations_timeout/bulkWrite.yml +87 -0
  181. data/spec/spec_tests/data/client_side_operations_timeout/change-streams.yml +358 -0
  182. data/spec/spec_tests/data/client_side_operations_timeout/close-cursors.yml +129 -0
  183. data/spec/spec_tests/data/client_side_operations_timeout/command-execution.yml +250 -0
  184. data/spec/spec_tests/data/client_side_operations_timeout/convenient-transactions.yml +113 -0
  185. data/spec/spec_tests/data/client_side_operations_timeout/cursors.yml +70 -0
  186. data/spec/spec_tests/data/client_side_operations_timeout/deprecated-options.yml +3982 -0
  187. data/spec/spec_tests/data/client_side_operations_timeout/error-transformations.yml +96 -0
  188. data/spec/spec_tests/data/client_side_operations_timeout/global-timeoutMS.yml +3236 -0
  189. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-advanced.yml +207 -0
  190. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-delete.yml +152 -0
  191. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-download.yml +182 -0
  192. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-find.yml +100 -0
  193. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-upload.yml +249 -0
  194. data/spec/spec_tests/data/client_side_operations_timeout/legacy-timeouts.yml +204 -0
  195. data/spec/spec_tests/data/client_side_operations_timeout/non-tailable-cursors.yml +307 -0
  196. data/spec/spec_tests/data/client_side_operations_timeout/override-collection-timeoutMS.yml +1877 -0
  197. data/spec/spec_tests/data/client_side_operations_timeout/override-operation-timeoutMS.yml +1918 -0
  198. data/spec/spec_tests/data/client_side_operations_timeout/retryability-legacy-timeouts.yml +1676 -0
  199. data/spec/spec_tests/data/client_side_operations_timeout/retryability-timeoutMS.yml +2824 -0
  200. data/spec/spec_tests/data/client_side_operations_timeout/sessions-inherit-timeoutMS.yml +168 -0
  201. data/spec/spec_tests/data/client_side_operations_timeout/sessions-override-operation-timeoutMS.yml +171 -0
  202. data/spec/spec_tests/data/client_side_operations_timeout/sessions-override-timeoutMS.yml +168 -0
  203. data/spec/spec_tests/data/client_side_operations_timeout/tailable-awaitData.yml +247 -0
  204. data/spec/spec_tests/data/client_side_operations_timeout/tailable-non-awaitData.yml +181 -0
  205. data/spec/spec_tests/data/crud_unified/aggregate-write-readPreference.yml +6 -0
  206. data/spec/spec_tests/data/crud_unified/db-aggregate-write-readPreference.yml +6 -0
  207. data/spec/spec_tests/data/crud_unified/find-test-all-options.yml +29 -0
  208. data/spec/spec_tests/server_selection_rtt_spec.rb +6 -6
  209. data/spec/spec_tests/transactions_unified_spec.rb +2 -1
  210. data/spec/support/certificates/atlas-ocsp-ca.crt +89 -79
  211. data/spec/support/certificates/atlas-ocsp.crt +117 -122
  212. data/spec/support/certificates/retrieve-atlas-cert +1 -1
  213. data/spec/support/cluster_tools.rb +3 -3
  214. data/spec/support/common_shortcuts.rb +2 -2
  215. data/spec/support/crypt/encrypted_fields/range-encryptedFields-Date.json +1 -1
  216. data/spec/support/crypt/encrypted_fields/range-encryptedFields-DecimalNoPrecision.json +1 -1
  217. data/spec/support/crypt/encrypted_fields/range-encryptedFields-DecimalPrecision.json +1 -1
  218. data/spec/support/crypt/encrypted_fields/range-encryptedFields-DoubleNoPrecision.json +1 -1
  219. data/spec/support/crypt/encrypted_fields/range-encryptedFields-DoublePrecision.json +1 -1
  220. data/spec/support/crypt/encrypted_fields/range-encryptedFields-Int.json +1 -1
  221. data/spec/support/crypt/encrypted_fields/range-encryptedFields-Long.json +1 -1
  222. data/spec/support/shared/session.rb +2 -2
  223. data/spec/support/spec_setup.rb +2 -2
  224. data/spec/support/utils.rb +3 -1
  225. metadata +88 -173
  226. checksums.yaml.gz.sig +0 -0
  227. data/spec/mongo/server/round_trip_time_averager_spec.rb +0 -48
  228. data/spec/shared/LICENSE +0 -20
  229. data/spec/shared/bin/get-mongodb-download-url +0 -17
  230. data/spec/shared/bin/s3-copy +0 -45
  231. data/spec/shared/bin/s3-upload +0 -69
  232. data/spec/shared/lib/mrss/child_process_helper.rb +0 -80
  233. data/spec/shared/lib/mrss/cluster_config.rb +0 -231
  234. data/spec/shared/lib/mrss/constraints.rb +0 -378
  235. data/spec/shared/lib/mrss/docker_runner.rb +0 -298
  236. data/spec/shared/lib/mrss/eg_config_utils.rb +0 -51
  237. data/spec/shared/lib/mrss/event_subscriber.rb +0 -210
  238. data/spec/shared/lib/mrss/lite_constraints.rb +0 -238
  239. data/spec/shared/lib/mrss/server_version_registry.rb +0 -113
  240. data/spec/shared/lib/mrss/session_registry.rb +0 -69
  241. data/spec/shared/lib/mrss/session_registry_legacy.rb +0 -60
  242. data/spec/shared/lib/mrss/spec_organizer.rb +0 -179
  243. data/spec/shared/lib/mrss/utils.rb +0 -37
  244. data/spec/shared/share/Dockerfile.erb +0 -281
  245. data/spec/shared/share/haproxy-1.conf +0 -16
  246. data/spec/shared/share/haproxy-2.conf +0 -17
  247. data/spec/shared/shlib/config.sh +0 -27
  248. data/spec/shared/shlib/distro.sh +0 -74
  249. data/spec/shared/shlib/server.sh +0 -417
  250. data/spec/shared/shlib/set_env.sh +0 -146
  251. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Aggregate.yml +0 -241
  252. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Correctness.yml +0 -422
  253. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Delete.yml +0 -182
  254. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-FindOneAndUpdate.yml +0 -239
  255. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-InsertFind.yml +0 -235
  256. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Update.yml +0 -252
  257. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Aggregate.yml +0 -1687
  258. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Correctness.yml +0 -293
  259. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Delete.yml +0 -905
  260. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-FindOneAndUpdate.yml +0 -1684
  261. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-InsertFind.yml +0 -1680
  262. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Update.yml +0 -1697
  263. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Aggregate.yml +0 -329
  264. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Correctness.yml +0 -424
  265. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Delete.yml +0 -226
  266. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-FindOneAndUpdate.yml +0 -327
  267. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-InsertFind.yml +0 -319
  268. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Update.yml +0 -336
  269. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Aggregate.yml +0 -913
  270. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Correctness.yml +0 -292
  271. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Delete.yml +0 -518
  272. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-FindOneAndUpdate.yml +0 -911
  273. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-InsertFind.yml +0 -907
  274. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Update.yml +0 -924
  275. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Aggregate.yml +0 -325
  276. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Correctness.yml +0 -424
  277. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Delete.yml +0 -224
  278. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-FindOneAndUpdate.yml +0 -323
  279. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-InsertFind.yml +0 -319
  280. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Update.yml +0 -338
  281. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Aggregate.yml +0 -241
  282. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Correctness.yml +0 -423
  283. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Delete.yml +0 -182
  284. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-FindOneAndUpdate.yml +0 -239
  285. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-InsertFind.yml +0 -235
  286. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Update.yml +0 -254
  287. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Aggregate.yml +0 -241
  288. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Correctness.yml +0 -422
  289. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Delete.yml +0 -182
  290. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-FindOneAndUpdate.yml +0 -239
  291. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-InsertFind.yml +0 -235
  292. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Update.yml +0 -254
  293. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-WrongType.yml +0 -43
  294. data/spec/support/faas/app/aws_lambda/mongodb/Gemfile.lock +0 -19
  295. data.tar.gz.sig +0 -0
  296. metadata.gz.sig +0 -3
@@ -10,7 +10,7 @@
10
10
  "path": "encryptedDoublePrecision",
11
11
  "bsonType": "double",
12
12
  "queries": {
13
- "queryType": "rangePreview",
13
+ "queryType": "range",
14
14
  "sparsity": {
15
15
  "$numberLong": "1"
16
16
  },
@@ -10,7 +10,7 @@
10
10
  "path": "encryptedInt",
11
11
  "bsonType": "int",
12
12
  "queries": {
13
- "queryType": "rangePreview",
13
+ "queryType": "range",
14
14
  "sparsity": {
15
15
  "$numberLong": "1"
16
16
  },
@@ -10,7 +10,7 @@
10
10
  "path": "encryptedLong",
11
11
  "bsonType": "long",
12
12
  "queries": {
13
- "queryType": "rangePreview",
13
+ "queryType": "range",
14
14
  "sparsity": {
15
15
  "$numberLong": "1"
16
16
  },
@@ -110,8 +110,8 @@ shared_examples 'a failed operation using a session' do
110
110
  end
111
111
 
112
112
  it 'raises an error' do
113
- expect([Mongo::Error::OperationFailure,
114
- Mongo::Error::BulkWriteError]).to include(operation_result.class)
113
+ expect([Mongo::Error::OperationFailure::Family,
114
+ Mongo::Error::BulkWriteError].any? { |e| e === operation_result }).to be true
115
115
  end
116
116
 
117
117
  it 'updates the last use value' do
@@ -28,7 +28,7 @@ class SpecSetup
28
28
  # more users to any other databases.
29
29
  begin
30
30
  create_user(client, SpecConfig.instance.root_user)
31
- rescue Mongo::Error::OperationFailure => e
31
+ rescue Mongo::Error::OperationFailure::Family => e
32
32
  # When testing a cluster that requires auth, root user is already set up
33
33
  # and it is not creatable without auth.
34
34
  # Seems like every mongodb version has its own error message
@@ -61,7 +61,7 @@ class SpecSetup
61
61
  users = client.use('admin').database.users
62
62
  begin
63
63
  users.create(user)
64
- rescue Mongo::Error::OperationFailure => e
64
+ rescue Mongo::Error::OperationFailure::Family => e
65
65
  if e.message =~ /User.*already exists/
66
66
  users.remove(user.name)
67
67
  users.create(user)
@@ -330,8 +330,10 @@ module Utils
330
330
  when 'long'
331
331
  expected_class = BSON::Int64
332
332
  expected_key = '$numberLong'
333
+ when %w[int long]
334
+ return actual.is_a?(Numeric) || actual.is_a?(BSON::Int32) || actual.is_a?(BSON::Int64)
333
335
  else
334
- raise "Tests do not currently support matching against $$type #{v['$$type']}"
336
+ raise "Tests do not currently support matching against $$type #{expected['$$type']}"
335
337
  end
336
338
 
337
339
  actual.is_a?(expected_class) || actual.key?(expected_key)
metadata CHANGED
@@ -1,41 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.20.0
4
+ version: 2.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The MongoDB Ruby Team
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
- cert_chain:
11
- - |
12
- -----BEGIN CERTIFICATE-----
13
- MIIEeDCCAuCgAwIBAgIBATANBgkqhkiG9w0BAQsFADBBMREwDwYDVQQDDAhkYngt
14
- cnVieTEXMBUGCgmSJomT8ixkARkWB21vbmdvZGIxEzARBgoJkiaJk/IsZAEZFgNj
15
- b20wHhcNMjQwMjA5MTc0NzIyWhcNMjUwMjA4MTc0NzIyWjBBMREwDwYDVQQDDAhk
16
- YngtcnVieTEXMBUGCgmSJomT8ixkARkWB21vbmdvZGIxEzARBgoJkiaJk/IsZAEZ
17
- FgNjb20wggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQC0/Veq9l47cTfX
18
- tQ+kHq2NOCwJuJGt1iXWQ/vH/yp7pZ/bLej7gPDl2CfIngAXRjM7r1FkR9ya7VAm
19
- IneBFcVU3HhpIXWi4ByXGjBOXFD1Dfbz4C4zedIWRk/hNzXa+rQY4KPwpOwG/hZg
20
- id+rSXWSbNlkyN97XfonweVh7JsIa9X/2JY9ADYjhCfEZF+b0+Wl7+jgwzLWb46I
21
- 0WH0bZBIZ0BbKAwUXIgvq5mQf9PzukmMVYCwnkJ/P4wrHO22HuwnbMyvJuGjVwqi
22
- j1NRp/2vjmKBFWxIfhlSXEIiqAmeEVNXzhPvTVeyo+rma+7R3Bo+4WHkcnPpXJJZ
23
- Jd63qXMvTB0GplEcMJPztWhrJOmcxIOVoQyigEPSQT8JpzFVXby4SGioizv2eT7l
24
- VYSiCHuc3yEDyq5M+98WGX2etbj6esYtzI3rDevpIAHPB6HQmtoJIA4dSl3gjFb+
25
- D+YQSuB2qYu021FI9zeY9sbZyWysEXBxhwrmTk+XUV0qz+OQZkMCAwEAAaN7MHkw
26
- CQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFH4nnr4tYlatU57RbExW
27
- jG86YM5nMB8GA1UdEQQYMBaBFGRieC1ydWJ5QG1vbmdvZGIuY29tMB8GA1UdEgQY
28
- MBaBFGRieC1ydWJ5QG1vbmdvZGIuY29tMA0GCSqGSIb3DQEBCwUAA4IBgQBKGtHA
29
- fpi3N/BL1J5O4CBsAjtF4jHDiw2r5MwK+66NzMh3uedjgPI7MoosemLy++SB+8BR
30
- SE8bDkb6gfDQQzrI6KSXXyqH2TbQXpY5Tac7/yqXRiu8G2qOrOj4czB/Hq7j09CV
31
- YoH88v6hL11i5jt6jPjFh8hXYG0hDQxhi3atRz5Wwd98tUf2DSbyJXJiRgCBeZjl
32
- rP7AnKsWMu0C+zPlL+nXtQr+nTFtkKXRWfUJMqePpBqtriQvgQ+Y1ItqYVTSLuiM
33
- iwUMcn/rGhdCMBSaKDXdFkIveCHQE2f2WBo2EdErrcTrgEKYYdNfzcb/43j7L1kx
34
- AUwyTtk+HFrviBynQbKN82rjbZE+5gukVea5c7idQPkqacPYsoU37DI+hTlUyJkV
35
- dcTtfEg44lLlfNukBslfiQf54r+uWbyB0m0rDUN/py7/Ghyzt5GLBU91uCO3dGoI
36
- 55uFRHMvEcJMTDeImC/nuucPCAiEGMHggr9+NPC0tqpxjGKTo7lS7GzUFjg=
37
- -----END CERTIFICATE-----
38
- date: 2024-03-28 00:00:00.000000000 Z
10
+ cert_chain: []
11
+ date: 2024-09-19 00:00:00.000000000 Z
39
12
  dependencies:
40
13
  - !ruby/object:Gem::Dependency
41
14
  name: bson
@@ -57,7 +30,10 @@ dependencies:
57
30
  - - "<"
58
31
  - !ruby/object:Gem::Version
59
32
  version: 6.0.0
60
- description: A Ruby driver for MongoDB
33
+ description: |
34
+ A pure-Ruby driver for connecting to, querying, and manipulating MongoDB
35
+ databases. Officially developed and supported by MongoDB, with love for
36
+ the Ruby community.
61
37
  email: dbx-ruby@mongodb.com
62
38
  executables:
63
39
  - mongo_console
@@ -141,6 +117,7 @@ files:
141
117
  - lib/mongo/collection/queryable_encryption.rb
142
118
  - lib/mongo/collection/view.rb
143
119
  - lib/mongo/collection/view/aggregation.rb
120
+ - lib/mongo/collection/view/aggregation/behavior.rb
144
121
  - lib/mongo/collection/view/builder.rb
145
122
  - lib/mongo/collection/view/builder/aggregation.rb
146
123
  - lib/mongo/collection/view/builder/map_reduce.rb
@@ -196,8 +173,11 @@ files:
196
173
  - lib/mongo/crypt/rewrap_many_data_key_context.rb
197
174
  - lib/mongo/crypt/rewrap_many_data_key_result.rb
198
175
  - lib/mongo/crypt/status.rb
176
+ - lib/mongo/csot_timeout_holder.rb
199
177
  - lib/mongo/cursor.rb
200
178
  - lib/mongo/cursor/kill_spec.rb
179
+ - lib/mongo/cursor/nontailable.rb
180
+ - lib/mongo/cursor_host.rb
201
181
  - lib/mongo/database.rb
202
182
  - lib/mongo/database/view.rb
203
183
  - lib/mongo/dbref.rb
@@ -279,6 +259,7 @@ files:
279
259
  - lib/mongo/error/server_api_not_supported.rb
280
260
  - lib/mongo/error/server_certificate_revoked.rb
281
261
  - lib/mongo/error/server_not_usable.rb
262
+ - lib/mongo/error/server_timeout_error.rb
282
263
  - lib/mongo/error/session_ended.rb
283
264
  - lib/mongo/error/session_not_materialized.rb
284
265
  - lib/mongo/error/sessions_not_supported.rb
@@ -286,6 +267,7 @@ files:
286
267
  - lib/mongo/error/snapshot_session_transaction_prohibited.rb
287
268
  - lib/mongo/error/socket_error.rb
288
269
  - lib/mongo/error/socket_timeout_error.rb
270
+ - lib/mongo/error/timeout_error.rb
289
271
  - lib/mongo/error/transactions_not_supported.rb
290
272
  - lib/mongo/error/unchangeable_collection_option.rb
291
273
  - lib/mongo/error/unexpected_chunk_length.rb
@@ -443,6 +425,7 @@ files:
443
425
  - lib/mongo/operation/shared/result/use_legacy_error_parser.rb
444
426
  - lib/mongo/operation/shared/sessions_supported.rb
445
427
  - lib/mongo/operation/shared/specifiable.rb
428
+ - lib/mongo/operation/shared/timed.rb
446
429
  - lib/mongo/operation/shared/validatable.rb
447
430
  - lib/mongo/operation/shared/write.rb
448
431
  - lib/mongo/operation/shared/write_concern_supported.rb
@@ -501,7 +484,7 @@ files:
501
484
  - lib/mongo/server/pending_connection.rb
502
485
  - lib/mongo/server/push_monitor.rb
503
486
  - lib/mongo/server/push_monitor/connection.rb
504
- - lib/mongo/server/round_trip_time_averager.rb
487
+ - lib/mongo/server/round_trip_time_calculator.rb
505
488
  - lib/mongo/server_selector.rb
506
489
  - lib/mongo/server_selector/base.rb
507
490
  - lib/mongo/server_selector/nearest.rb
@@ -590,6 +573,7 @@ files:
590
573
  - spec/integration/client_side_encryption/rewrap_prose_spec.rb
591
574
  - spec/integration/client_side_encryption/unique_index_on_key_alt_names_prose_spec.rb
592
575
  - spec/integration/client_side_encryption/views_spec.rb
576
+ - spec/integration/client_side_operations_timeout/encryption_prose_spec.rb
593
577
  - spec/integration/client_spec.rb
594
578
  - spec/integration/client_update_spec.rb
595
579
  - spec/integration/collection_indexes_prose_spec.rb
@@ -807,6 +791,7 @@ files:
807
791
  - spec/mongo/operation/aggregate_spec.rb
808
792
  - spec/mongo/operation/collections_info_spec.rb
809
793
  - spec/mongo/operation/command_spec.rb
794
+ - spec/mongo/operation/context_spec.rb
810
795
  - spec/mongo/operation/create/op_msg_spec.rb
811
796
  - spec/mongo/operation/create_index_spec.rb
812
797
  - spec/mongo/operation/create_user_spec.rb
@@ -816,6 +801,8 @@ files:
816
801
  - spec/mongo/operation/drop_index_spec.rb
817
802
  - spec/mongo/operation/find/builder/flags_spec.rb
818
803
  - spec/mongo/operation/find/builder/modifiers_spec.rb
804
+ - spec/mongo/operation/find/op_msg_spec.rb
805
+ - spec/mongo/operation/get_more/op_msg_spec.rb
819
806
  - spec/mongo/operation/indexes_spec.rb
820
807
  - spec/mongo/operation/insert/bulk_spec.rb
821
808
  - spec/mongo/operation/insert/op_msg_spec.rb
@@ -826,6 +813,7 @@ files:
826
813
  - spec/mongo/operation/read_preference_op_msg_spec.rb
827
814
  - spec/mongo/operation/remove_user_spec.rb
828
815
  - spec/mongo/operation/result_spec.rb
816
+ - spec/mongo/operation/shared/csot/examples.rb
829
817
  - spec/mongo/operation/specifiable_spec.rb
830
818
  - spec/mongo/operation/update/bulk_spec.rb
831
819
  - spec/mongo/operation/update/op_msg_spec.rb
@@ -860,7 +848,7 @@ files:
860
848
  - spec/mongo/server/monitor/connection_spec.rb
861
849
  - spec/mongo/server/monitor_spec.rb
862
850
  - spec/mongo/server/push_monitor_spec.rb
863
- - spec/mongo/server/round_trip_time_averager_spec.rb
851
+ - spec/mongo/server/round_trip_time_calculator_spec.rb
864
852
  - spec/mongo/server_selector/nearest_spec.rb
865
853
  - spec/mongo/server_selector/primary_preferred_spec.rb
866
854
  - spec/mongo/server_selector/primary_spec.rb
@@ -916,6 +904,7 @@ files:
916
904
  - spec/runners/transactions/spec.rb
917
905
  - spec/runners/transactions/test.rb
918
906
  - spec/runners/unified.rb
907
+ - spec/runners/unified/ambiguous_operations.rb
919
908
  - spec/runners/unified/assertions.rb
920
909
  - spec/runners/unified/change_stream_operations.rb
921
910
  - spec/runners/unified/client_side_encryption_operations.rb
@@ -931,35 +920,13 @@ files:
931
920
  - spec/runners/unified/test.rb
932
921
  - spec/runners/unified/test_group.rb
933
922
  - spec/runners/unified/thread_operations.rb
934
- - spec/shared/LICENSE
935
- - spec/shared/bin/get-mongodb-download-url
936
- - spec/shared/bin/s3-copy
937
- - spec/shared/bin/s3-upload
938
- - spec/shared/lib/mrss/child_process_helper.rb
939
- - spec/shared/lib/mrss/cluster_config.rb
940
- - spec/shared/lib/mrss/constraints.rb
941
- - spec/shared/lib/mrss/docker_runner.rb
942
- - spec/shared/lib/mrss/eg_config_utils.rb
943
- - spec/shared/lib/mrss/event_subscriber.rb
944
- - spec/shared/lib/mrss/lite_constraints.rb
945
- - spec/shared/lib/mrss/server_version_registry.rb
946
- - spec/shared/lib/mrss/session_registry.rb
947
- - spec/shared/lib/mrss/session_registry_legacy.rb
948
- - spec/shared/lib/mrss/spec_organizer.rb
949
- - spec/shared/lib/mrss/utils.rb
950
- - spec/shared/share/Dockerfile.erb
951
- - spec/shared/share/haproxy-1.conf
952
- - spec/shared/share/haproxy-2.conf
953
- - spec/shared/shlib/config.sh
954
- - spec/shared/shlib/distro.sh
955
- - spec/shared/shlib/server.sh
956
- - spec/shared/shlib/set_env.sh
957
923
  - spec/solo/clean_exit_spec.rb
958
924
  - spec/spec_helper.rb
959
925
  - spec/spec_tests/auth_spec.rb
960
926
  - spec/spec_tests/change_streams_unified_spec.rb
961
927
  - spec/spec_tests/client_side_encryption_spec.rb
962
928
  - spec/spec_tests/client_side_encryption_unified_spec.rb
929
+ - spec/spec_tests/client_side_operations_timeout_spec.rb
963
930
  - spec/spec_tests/cmap_spec.rb
964
931
  - spec/spec_tests/collection_management_spec.rb
965
932
  - spec/spec_tests/command_monitoring_unified_spec.rb
@@ -1008,49 +975,6 @@ files:
1008
975
  - spec/spec_tests/data/client_side_encryption/fle2v2-InsertFind-Unindexed.yml
1009
976
  - spec/spec_tests/data/client_side_encryption/fle2v2-MissingKey.yml
1010
977
  - spec/spec_tests/data/client_side_encryption/fle2v2-NoEncryption.yml
1011
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Aggregate.yml
1012
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Correctness.yml
1013
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Delete.yml
1014
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-FindOneAndUpdate.yml
1015
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-InsertFind.yml
1016
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Update.yml
1017
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Aggregate.yml
1018
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Correctness.yml
1019
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Delete.yml
1020
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-FindOneAndUpdate.yml
1021
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-InsertFind.yml
1022
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Update.yml
1023
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Aggregate.yml
1024
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Correctness.yml
1025
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Delete.yml
1026
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-FindOneAndUpdate.yml
1027
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-InsertFind.yml
1028
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Update.yml
1029
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Aggregate.yml
1030
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Correctness.yml
1031
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Delete.yml
1032
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-FindOneAndUpdate.yml
1033
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-InsertFind.yml
1034
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Update.yml
1035
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Aggregate.yml
1036
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Correctness.yml
1037
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Delete.yml
1038
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-FindOneAndUpdate.yml
1039
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-InsertFind.yml
1040
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Update.yml
1041
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Aggregate.yml
1042
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Correctness.yml
1043
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Delete.yml
1044
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-FindOneAndUpdate.yml
1045
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-InsertFind.yml
1046
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Update.yml
1047
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Aggregate.yml
1048
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Correctness.yml
1049
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Delete.yml
1050
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-FindOneAndUpdate.yml
1051
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-InsertFind.yml
1052
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Update.yml
1053
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-WrongType.yml
1054
978
  - spec/spec_tests/data/client_side_encryption/fle2v2-Update.yml
1055
979
  - spec/spec_tests/data/client_side_encryption/fle2v2-validatorAndPartialFieldExpression.yml
1056
980
  - spec/spec_tests/data/client_side_encryption/gcpKMS.yml
@@ -1064,6 +988,7 @@ files:
1064
988
  - spec/spec_tests/data/client_side_encryption/missingKey.yml
1065
989
  - spec/spec_tests/data/client_side_encryption/noSchema.yml
1066
990
  - spec/spec_tests/data/client_side_encryption/replaceOne.yml
991
+ - spec/spec_tests/data/client_side_encryption/timeoutMS.yml
1067
992
  - spec/spec_tests/data/client_side_encryption/types.yml
1068
993
  - spec/spec_tests/data/client_side_encryption/unified/addKeyAltName.yml
1069
994
  - spec/spec_tests/data/client_side_encryption/unified/createDataKey-kms_providers-invalid.yml
@@ -1080,6 +1005,31 @@ files:
1080
1005
  - spec/spec_tests/data/client_side_encryption/updateMany.yml
1081
1006
  - spec/spec_tests/data/client_side_encryption/updateOne.yml
1082
1007
  - spec/spec_tests/data/client_side_encryption/validatorAndPartialFieldExpression.yml
1008
+ - spec/spec_tests/data/client_side_operations_timeout/bulkWrite.yml
1009
+ - spec/spec_tests/data/client_side_operations_timeout/change-streams.yml
1010
+ - spec/spec_tests/data/client_side_operations_timeout/close-cursors.yml
1011
+ - spec/spec_tests/data/client_side_operations_timeout/command-execution.yml
1012
+ - spec/spec_tests/data/client_side_operations_timeout/convenient-transactions.yml
1013
+ - spec/spec_tests/data/client_side_operations_timeout/cursors.yml
1014
+ - spec/spec_tests/data/client_side_operations_timeout/deprecated-options.yml
1015
+ - spec/spec_tests/data/client_side_operations_timeout/error-transformations.yml
1016
+ - spec/spec_tests/data/client_side_operations_timeout/global-timeoutMS.yml
1017
+ - spec/spec_tests/data/client_side_operations_timeout/gridfs-advanced.yml
1018
+ - spec/spec_tests/data/client_side_operations_timeout/gridfs-delete.yml
1019
+ - spec/spec_tests/data/client_side_operations_timeout/gridfs-download.yml
1020
+ - spec/spec_tests/data/client_side_operations_timeout/gridfs-find.yml
1021
+ - spec/spec_tests/data/client_side_operations_timeout/gridfs-upload.yml
1022
+ - spec/spec_tests/data/client_side_operations_timeout/legacy-timeouts.yml
1023
+ - spec/spec_tests/data/client_side_operations_timeout/non-tailable-cursors.yml
1024
+ - spec/spec_tests/data/client_side_operations_timeout/override-collection-timeoutMS.yml
1025
+ - spec/spec_tests/data/client_side_operations_timeout/override-operation-timeoutMS.yml
1026
+ - spec/spec_tests/data/client_side_operations_timeout/retryability-legacy-timeouts.yml
1027
+ - spec/spec_tests/data/client_side_operations_timeout/retryability-timeoutMS.yml
1028
+ - spec/spec_tests/data/client_side_operations_timeout/sessions-inherit-timeoutMS.yml
1029
+ - spec/spec_tests/data/client_side_operations_timeout/sessions-override-operation-timeoutMS.yml
1030
+ - spec/spec_tests/data/client_side_operations_timeout/sessions-override-timeoutMS.yml
1031
+ - spec/spec_tests/data/client_side_operations_timeout/tailable-awaitData.yml
1032
+ - spec/spec_tests/data/client_side_operations_timeout/tailable-non-awaitData.yml
1083
1033
  - spec/spec_tests/data/cmap/connection-must-have-id.yml
1084
1034
  - spec/spec_tests/data/cmap/connection-must-order-ids.yml
1085
1035
  - spec/spec_tests/data/cmap/pool-checkin-destroy-closed.yml
@@ -1942,7 +1892,6 @@ files:
1942
1892
  - spec/support/crypt/schema_maps/schema_map_local.json
1943
1893
  - spec/support/crypt/schema_maps/schema_map_local_key_alt_names.json
1944
1894
  - spec/support/dns.rb
1945
- - spec/support/faas/app/aws_lambda/mongodb/Gemfile.lock
1946
1895
  - spec/support/json_ext_formatter.rb
1947
1896
  - spec/support/keyword_struct.rb
1948
1897
  - spec/support/local_resource_registry.rb
@@ -1970,10 +1919,10 @@ licenses:
1970
1919
  metadata:
1971
1920
  bug_tracker_uri: https://jira.mongodb.org/projects/RUBY
1972
1921
  changelog_uri: https://github.com/mongodb/mongo-ruby-driver/releases
1973
- documentation_uri: https://mongodb.com/docs/ruby-driver/
1974
1922
  homepage_uri: https://mongodb.com/docs/ruby-driver/
1923
+ documentation_uri: https://mongodb.com/docs/ruby-driver/current/tutorials/quick-start/
1975
1924
  source_code_uri: https://github.com/mongodb/mongo-ruby-driver
1976
- post_install_message:
1925
+ post_install_message:
1977
1926
  rdoc_options: []
1978
1927
  require_paths:
1979
1928
  - lib
@@ -1988,8 +1937,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1988
1937
  - !ruby/object:Gem::Version
1989
1938
  version: '0'
1990
1939
  requirements: []
1991
- rubygems_version: 3.3.15
1992
- signing_key:
1940
+ rubygems_version: 3.4.19
1941
+ signing_key:
1993
1942
  specification_version: 4
1994
1943
  summary: Ruby driver for MongoDB
1995
1944
  test_files:
@@ -2048,6 +1997,7 @@ test_files:
2048
1997
  - spec/integration/client_side_encryption/rewrap_prose_spec.rb
2049
1998
  - spec/integration/client_side_encryption/unique_index_on_key_alt_names_prose_spec.rb
2050
1999
  - spec/integration/client_side_encryption/views_spec.rb
2000
+ - spec/integration/client_side_operations_timeout/encryption_prose_spec.rb
2051
2001
  - spec/integration/client_spec.rb
2052
2002
  - spec/integration/client_update_spec.rb
2053
2003
  - spec/integration/collection_indexes_prose_spec.rb
@@ -2265,6 +2215,7 @@ test_files:
2265
2215
  - spec/mongo/operation/aggregate_spec.rb
2266
2216
  - spec/mongo/operation/collections_info_spec.rb
2267
2217
  - spec/mongo/operation/command_spec.rb
2218
+ - spec/mongo/operation/context_spec.rb
2268
2219
  - spec/mongo/operation/create/op_msg_spec.rb
2269
2220
  - spec/mongo/operation/create_index_spec.rb
2270
2221
  - spec/mongo/operation/create_user_spec.rb
@@ -2274,6 +2225,8 @@ test_files:
2274
2225
  - spec/mongo/operation/drop_index_spec.rb
2275
2226
  - spec/mongo/operation/find/builder/flags_spec.rb
2276
2227
  - spec/mongo/operation/find/builder/modifiers_spec.rb
2228
+ - spec/mongo/operation/find/op_msg_spec.rb
2229
+ - spec/mongo/operation/get_more/op_msg_spec.rb
2277
2230
  - spec/mongo/operation/indexes_spec.rb
2278
2231
  - spec/mongo/operation/insert/bulk_spec.rb
2279
2232
  - spec/mongo/operation/insert/op_msg_spec.rb
@@ -2284,6 +2237,7 @@ test_files:
2284
2237
  - spec/mongo/operation/read_preference_op_msg_spec.rb
2285
2238
  - spec/mongo/operation/remove_user_spec.rb
2286
2239
  - spec/mongo/operation/result_spec.rb
2240
+ - spec/mongo/operation/shared/csot/examples.rb
2287
2241
  - spec/mongo/operation/specifiable_spec.rb
2288
2242
  - spec/mongo/operation/update/bulk_spec.rb
2289
2243
  - spec/mongo/operation/update/op_msg_spec.rb
@@ -2318,7 +2272,7 @@ test_files:
2318
2272
  - spec/mongo/server/monitor/connection_spec.rb
2319
2273
  - spec/mongo/server/monitor_spec.rb
2320
2274
  - spec/mongo/server/push_monitor_spec.rb
2321
- - spec/mongo/server/round_trip_time_averager_spec.rb
2275
+ - spec/mongo/server/round_trip_time_calculator_spec.rb
2322
2276
  - spec/mongo/server_selector/nearest_spec.rb
2323
2277
  - spec/mongo/server_selector/primary_preferred_spec.rb
2324
2278
  - spec/mongo/server_selector/primary_spec.rb
@@ -2373,6 +2327,7 @@ test_files:
2373
2327
  - spec/runners/transactions/spec.rb
2374
2328
  - spec/runners/transactions/test.rb
2375
2329
  - spec/runners/transactions.rb
2330
+ - spec/runners/unified/ambiguous_operations.rb
2376
2331
  - spec/runners/unified/assertions.rb
2377
2332
  - spec/runners/unified/change_stream_operations.rb
2378
2333
  - spec/runners/unified/client_side_encryption_operations.rb
@@ -2389,35 +2344,13 @@ test_files:
2389
2344
  - spec/runners/unified/test_group.rb
2390
2345
  - spec/runners/unified/thread_operations.rb
2391
2346
  - spec/runners/unified.rb
2392
- - spec/shared/LICENSE
2393
- - spec/shared/bin/get-mongodb-download-url
2394
- - spec/shared/bin/s3-copy
2395
- - spec/shared/bin/s3-upload
2396
- - spec/shared/lib/mrss/child_process_helper.rb
2397
- - spec/shared/lib/mrss/cluster_config.rb
2398
- - spec/shared/lib/mrss/constraints.rb
2399
- - spec/shared/lib/mrss/docker_runner.rb
2400
- - spec/shared/lib/mrss/eg_config_utils.rb
2401
- - spec/shared/lib/mrss/event_subscriber.rb
2402
- - spec/shared/lib/mrss/lite_constraints.rb
2403
- - spec/shared/lib/mrss/server_version_registry.rb
2404
- - spec/shared/lib/mrss/session_registry.rb
2405
- - spec/shared/lib/mrss/session_registry_legacy.rb
2406
- - spec/shared/lib/mrss/spec_organizer.rb
2407
- - spec/shared/lib/mrss/utils.rb
2408
- - spec/shared/share/Dockerfile.erb
2409
- - spec/shared/share/haproxy-1.conf
2410
- - spec/shared/share/haproxy-2.conf
2411
- - spec/shared/shlib/config.sh
2412
- - spec/shared/shlib/distro.sh
2413
- - spec/shared/shlib/server.sh
2414
- - spec/shared/shlib/set_env.sh
2415
2347
  - spec/solo/clean_exit_spec.rb
2416
2348
  - spec/spec_helper.rb
2417
2349
  - spec/spec_tests/auth_spec.rb
2418
2350
  - spec/spec_tests/change_streams_unified_spec.rb
2419
2351
  - spec/spec_tests/client_side_encryption_spec.rb
2420
2352
  - spec/spec_tests/client_side_encryption_unified_spec.rb
2353
+ - spec/spec_tests/client_side_operations_timeout_spec.rb
2421
2354
  - spec/spec_tests/cmap_spec.rb
2422
2355
  - spec/spec_tests/collection_management_spec.rb
2423
2356
  - spec/spec_tests/command_monitoring_unified_spec.rb
@@ -2466,49 +2399,6 @@ test_files:
2466
2399
  - spec/spec_tests/data/client_side_encryption/fle2v2-InsertFind-Unindexed.yml
2467
2400
  - spec/spec_tests/data/client_side_encryption/fle2v2-MissingKey.yml
2468
2401
  - spec/spec_tests/data/client_side_encryption/fle2v2-NoEncryption.yml
2469
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Aggregate.yml
2470
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Correctness.yml
2471
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Delete.yml
2472
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-FindOneAndUpdate.yml
2473
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-InsertFind.yml
2474
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Update.yml
2475
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Aggregate.yml
2476
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Correctness.yml
2477
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Delete.yml
2478
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-FindOneAndUpdate.yml
2479
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-InsertFind.yml
2480
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Update.yml
2481
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Aggregate.yml
2482
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Correctness.yml
2483
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Delete.yml
2484
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-FindOneAndUpdate.yml
2485
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-InsertFind.yml
2486
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Update.yml
2487
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Aggregate.yml
2488
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Correctness.yml
2489
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Delete.yml
2490
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-FindOneAndUpdate.yml
2491
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-InsertFind.yml
2492
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Update.yml
2493
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Aggregate.yml
2494
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Correctness.yml
2495
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Delete.yml
2496
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-FindOneAndUpdate.yml
2497
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-InsertFind.yml
2498
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Update.yml
2499
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Aggregate.yml
2500
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Correctness.yml
2501
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Delete.yml
2502
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-FindOneAndUpdate.yml
2503
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-InsertFind.yml
2504
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Update.yml
2505
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Aggregate.yml
2506
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Correctness.yml
2507
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Delete.yml
2508
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-FindOneAndUpdate.yml
2509
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-InsertFind.yml
2510
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Update.yml
2511
- - spec/spec_tests/data/client_side_encryption/fle2v2-Range-WrongType.yml
2512
2402
  - spec/spec_tests/data/client_side_encryption/fle2v2-Update.yml
2513
2403
  - spec/spec_tests/data/client_side_encryption/fle2v2-validatorAndPartialFieldExpression.yml
2514
2404
  - spec/spec_tests/data/client_side_encryption/gcpKMS.yml
@@ -2522,6 +2412,7 @@ test_files:
2522
2412
  - spec/spec_tests/data/client_side_encryption/missingKey.yml
2523
2413
  - spec/spec_tests/data/client_side_encryption/noSchema.yml
2524
2414
  - spec/spec_tests/data/client_side_encryption/replaceOne.yml
2415
+ - spec/spec_tests/data/client_side_encryption/timeoutMS.yml
2525
2416
  - spec/spec_tests/data/client_side_encryption/types.yml
2526
2417
  - spec/spec_tests/data/client_side_encryption/unified/addKeyAltName.yml
2527
2418
  - spec/spec_tests/data/client_side_encryption/unified/createDataKey-kms_providers-invalid.yml
@@ -2538,6 +2429,31 @@ test_files:
2538
2429
  - spec/spec_tests/data/client_side_encryption/updateMany.yml
2539
2430
  - spec/spec_tests/data/client_side_encryption/updateOne.yml
2540
2431
  - spec/spec_tests/data/client_side_encryption/validatorAndPartialFieldExpression.yml
2432
+ - spec/spec_tests/data/client_side_operations_timeout/bulkWrite.yml
2433
+ - spec/spec_tests/data/client_side_operations_timeout/change-streams.yml
2434
+ - spec/spec_tests/data/client_side_operations_timeout/close-cursors.yml
2435
+ - spec/spec_tests/data/client_side_operations_timeout/command-execution.yml
2436
+ - spec/spec_tests/data/client_side_operations_timeout/convenient-transactions.yml
2437
+ - spec/spec_tests/data/client_side_operations_timeout/cursors.yml
2438
+ - spec/spec_tests/data/client_side_operations_timeout/deprecated-options.yml
2439
+ - spec/spec_tests/data/client_side_operations_timeout/error-transformations.yml
2440
+ - spec/spec_tests/data/client_side_operations_timeout/global-timeoutMS.yml
2441
+ - spec/spec_tests/data/client_side_operations_timeout/gridfs-advanced.yml
2442
+ - spec/spec_tests/data/client_side_operations_timeout/gridfs-delete.yml
2443
+ - spec/spec_tests/data/client_side_operations_timeout/gridfs-download.yml
2444
+ - spec/spec_tests/data/client_side_operations_timeout/gridfs-find.yml
2445
+ - spec/spec_tests/data/client_side_operations_timeout/gridfs-upload.yml
2446
+ - spec/spec_tests/data/client_side_operations_timeout/legacy-timeouts.yml
2447
+ - spec/spec_tests/data/client_side_operations_timeout/non-tailable-cursors.yml
2448
+ - spec/spec_tests/data/client_side_operations_timeout/override-collection-timeoutMS.yml
2449
+ - spec/spec_tests/data/client_side_operations_timeout/override-operation-timeoutMS.yml
2450
+ - spec/spec_tests/data/client_side_operations_timeout/retryability-legacy-timeouts.yml
2451
+ - spec/spec_tests/data/client_side_operations_timeout/retryability-timeoutMS.yml
2452
+ - spec/spec_tests/data/client_side_operations_timeout/sessions-inherit-timeoutMS.yml
2453
+ - spec/spec_tests/data/client_side_operations_timeout/sessions-override-operation-timeoutMS.yml
2454
+ - spec/spec_tests/data/client_side_operations_timeout/sessions-override-timeoutMS.yml
2455
+ - spec/spec_tests/data/client_side_operations_timeout/tailable-awaitData.yml
2456
+ - spec/spec_tests/data/client_side_operations_timeout/tailable-non-awaitData.yml
2541
2457
  - spec/spec_tests/data/cmap/connection-must-have-id.yml
2542
2458
  - spec/spec_tests/data/cmap/connection-must-order-ids.yml
2543
2459
  - spec/spec_tests/data/cmap/pool-checkin-destroy-closed.yml
@@ -3400,7 +3316,6 @@ test_files:
3400
3316
  - spec/support/crypt/schema_maps/schema_map_local_key_alt_names.json
3401
3317
  - spec/support/crypt.rb
3402
3318
  - spec/support/dns.rb
3403
- - spec/support/faas/app/aws_lambda/mongodb/Gemfile.lock
3404
3319
  - spec/support/json_ext_formatter.rb
3405
3320
  - spec/support/keyword_struct.rb
3406
3321
  - spec/support/local_resource_registry.rb
checksums.yaml.gz.sig DELETED
Binary file
@@ -1,48 +0,0 @@
1
- # frozen_string_literal: true
2
- # rubocop:todo all
3
-
4
- require 'spec_helper'
5
-
6
- describe Mongo::Server::RoundTripTimeAverager do
7
- let(:averager) { Mongo::Server::RoundTripTimeAverager.new }
8
-
9
- describe '#update_average_round_trip_time' do
10
- context 'no existing average rtt' do
11
- it 'updates average rtt' do
12
- averager.instance_variable_set('@last_round_trip_time', 5)
13
- averager.send(:update_average_round_trip_time)
14
- expect(averager.average_round_trip_time).to eq(5)
15
- end
16
- end
17
-
18
- context 'with existing average rtt' do
19
- it 'averages with existing average rtt' do
20
- averager.instance_variable_set('@last_round_trip_time', 5)
21
- averager.instance_variable_set('@average_round_trip_time', 10)
22
- averager.send(:update_average_round_trip_time)
23
- expect(averager.average_round_trip_time).to eq(9)
24
- end
25
- end
26
- end
27
-
28
- describe '#measure' do
29
- context 'block does not raise' do
30
- it 'updates average rtt' do
31
- expect(averager).to receive(:update_average_round_trip_time)
32
- averager.measure do
33
- end
34
- end
35
- end
36
-
37
- context 'block raises' do
38
- it 'does not update average rtt' do
39
- expect(averager).not_to receive(:update_average_round_trip_time)
40
- lambda do
41
- averager.measure do
42
- raise "Problem"
43
- end
44
- end.should raise_error(/Problem/)
45
- end
46
- end
47
- end
48
- end
data/spec/shared/LICENSE DELETED
@@ -1,20 +0,0 @@
1
- Copyright (c) 2020 MongoDB, Inc.
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.