mongo 2.16.4 → 2.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/README.md +1 -1
  4. data/lib/mongo/auth/aws/request.rb +0 -1
  5. data/lib/mongo/client.rb +4 -0
  6. data/lib/mongo/collection/view/aggregation.rb +62 -17
  7. data/lib/mongo/collection/view/builder/aggregation.rb +11 -13
  8. data/lib/mongo/collection/view/builder/map_reduce.rb +5 -8
  9. data/lib/mongo/collection/view/change_stream.rb +7 -3
  10. data/lib/mongo/collection/view/iterable.rb +3 -20
  11. data/lib/mongo/collection/view/map_reduce.rb +3 -14
  12. data/lib/mongo/collection/view/readable.rb +24 -1
  13. data/lib/mongo/collection/view/writable.rb +23 -0
  14. data/lib/mongo/collection/view.rb +0 -1
  15. data/lib/mongo/collection.rb +21 -1
  16. data/lib/mongo/database/view.rb +4 -2
  17. data/lib/mongo/database.rb +6 -6
  18. data/lib/mongo/error/snapshot_session_invalid_server_version.rb +31 -0
  19. data/lib/mongo/error/snapshot_session_transaction_prohibited.rb +30 -0
  20. data/lib/mongo/error.rb +2 -0
  21. data/lib/mongo/operation/delete/op_msg.rb +2 -1
  22. data/lib/mongo/operation/find/builder/command.rb +1 -0
  23. data/lib/mongo/operation/result.rb +6 -0
  24. data/lib/mongo/operation/shared/executable.rb +4 -0
  25. data/lib/mongo/operation/shared/sessions_supported.rb +18 -2
  26. data/lib/mongo/operation/update/op_msg.rb +2 -1
  27. data/lib/mongo/query_cache.rb +2 -12
  28. data/lib/mongo/server/description/features.rb +3 -1
  29. data/lib/mongo/server/monitor/connection.rb +4 -10
  30. data/lib/mongo/server_selector/base.rb +26 -4
  31. data/lib/mongo/session.rb +19 -0
  32. data/lib/mongo/socket/ocsp_cache.rb +2 -3
  33. data/lib/mongo/socket.rb +1 -5
  34. data/lib/mongo/utils.rb +0 -6
  35. data/lib/mongo/version.rb +1 -1
  36. data/mongo.gemspec +1 -1
  37. data/spec/integration/query_cache_spec.rb +0 -159
  38. data/spec/integration/read_preference_spec.rb +16 -12
  39. data/spec/integration/sdam_events_spec.rb +0 -40
  40. data/spec/lite_spec_helper.rb +0 -7
  41. data/spec/mongo/collection/view/aggregation_spec.rb +71 -95
  42. data/spec/mongo/collection/view/change_stream_spec.rb +1 -1
  43. data/spec/mongo/collection/view/map_reduce_spec.rb +14 -17
  44. data/spec/mongo/collection/view/readable_spec.rb +0 -56
  45. data/spec/mongo/operation/read_preference_op_msg_spec.rb +24 -1
  46. data/spec/mongo/query_cache_spec.rb +0 -165
  47. data/spec/mongo/server_selector_spec.rb +136 -15
  48. data/spec/mongo/socket/ssl_spec.rb +26 -58
  49. data/spec/mongo/utils_spec.rb +0 -14
  50. data/spec/runners/auth.rb +1 -1
  51. data/spec/runners/change_streams/spec.rb +1 -1
  52. data/spec/runners/cmap.rb +1 -1
  53. data/spec/runners/command_monitoring.rb +1 -1
  54. data/spec/runners/connection_string.rb +1 -1
  55. data/spec/runners/crud/spec.rb +3 -1
  56. data/spec/runners/crud/verifier.rb +1 -2
  57. data/spec/runners/gridfs.rb +1 -1
  58. data/spec/runners/read_write_concern_document.rb +1 -1
  59. data/spec/runners/sdam.rb +1 -1
  60. data/spec/runners/server_selection.rb +1 -1
  61. data/spec/runners/server_selection_rtt.rb +1 -1
  62. data/spec/runners/unified/assertions.rb +3 -1
  63. data/spec/runners/unified/crud_operations.rb +77 -23
  64. data/spec/runners/unified/ddl_operations.rb +29 -1
  65. data/spec/runners/unified/entity_map.rb +3 -3
  66. data/spec/runners/unified/support_operations.rb +6 -1
  67. data/spec/runners/unified/test.rb +15 -3
  68. data/spec/runners/unified/test_group.rb +1 -1
  69. data/spec/shared/share/Dockerfile.erb +3 -3
  70. data/spec/shared/shlib/server.sh +1 -1
  71. data/spec/spec_tests/data/crud_unified/aggregate-let.yml +138 -0
  72. data/spec/spec_tests/data/crud_unified/aggregate-write-readPreference.yml +155 -0
  73. data/spec/spec_tests/data/crud_unified/db-aggregate-write-readPreference.yml +151 -0
  74. data/spec/spec_tests/data/crud_unified/deleteMany-let.yml +91 -0
  75. data/spec/spec_tests/data/crud_unified/deleteOne-let.yml +89 -0
  76. data/spec/spec_tests/data/crud_unified/find-let.yml +71 -0
  77. data/spec/spec_tests/data/crud_unified/findOneAndDelete-let.yml +88 -0
  78. data/spec/spec_tests/data/crud_unified/findOneAndReplace-let.yml +94 -0
  79. data/spec/spec_tests/data/crud_unified/findOneAndUpdate-let.yml +96 -0
  80. data/spec/spec_tests/data/crud_unified/updateMany-let.yml +103 -0
  81. data/spec/spec_tests/data/crud_unified/updateOne-let.yml +98 -0
  82. data/spec/spec_tests/data/max_staleness/ReplicaSetNoPrimary/DefaultNoMaxStaleness.yml +2 -2
  83. data/spec/spec_tests/data/max_staleness/ReplicaSetNoPrimary/LastUpdateTime.yml +3 -3
  84. data/spec/spec_tests/data/max_staleness/ReplicaSetNoPrimary/Nearest.yml +3 -3
  85. data/spec/spec_tests/data/max_staleness/ReplicaSetNoPrimary/Nearest2.yml +3 -3
  86. data/spec/spec_tests/data/max_staleness/ReplicaSetNoPrimary/PrimaryPreferred.yml +2 -2
  87. data/spec/spec_tests/data/max_staleness/ReplicaSetNoPrimary/PrimaryPreferred_tags.yml +2 -2
  88. data/spec/spec_tests/data/max_staleness/ReplicaSetNoPrimary/Secondary.yml +4 -4
  89. data/spec/spec_tests/data/max_staleness/ReplicaSetNoPrimary/SecondaryPreferred.yml +2 -2
  90. data/spec/spec_tests/data/max_staleness/ReplicaSetNoPrimary/SecondaryPreferred_tags.yml +4 -4
  91. data/spec/spec_tests/data/max_staleness/ReplicaSetNoPrimary/ZeroMaxStaleness.yml +2 -2
  92. data/spec/spec_tests/data/max_staleness/ReplicaSetWithPrimary/DefaultNoMaxStaleness.yml +2 -2
  93. data/spec/spec_tests/data/max_staleness/ReplicaSetWithPrimary/LastUpdateTime.yml +3 -3
  94. data/spec/spec_tests/data/max_staleness/ReplicaSetWithPrimary/LongHeartbeat.yml +2 -2
  95. data/spec/spec_tests/data/max_staleness/ReplicaSetWithPrimary/LongHeartbeat2.yml +2 -2
  96. data/spec/spec_tests/data/max_staleness/ReplicaSetWithPrimary/MaxStalenessTooSmall.yml +2 -2
  97. data/spec/spec_tests/data/max_staleness/ReplicaSetWithPrimary/MaxStalenessWithModePrimary.yml +2 -2
  98. data/spec/spec_tests/data/max_staleness/ReplicaSetWithPrimary/Nearest.yml +3 -3
  99. data/spec/spec_tests/data/max_staleness/ReplicaSetWithPrimary/Nearest2.yml +3 -3
  100. data/spec/spec_tests/data/max_staleness/ReplicaSetWithPrimary/Nearest_tags.yml +2 -2
  101. data/spec/spec_tests/data/max_staleness/ReplicaSetWithPrimary/PrimaryPreferred.yml +2 -2
  102. data/spec/spec_tests/data/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred.yml +2 -2
  103. data/spec/spec_tests/data/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags.yml +5 -5
  104. data/spec/spec_tests/data/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags2.yml +3 -3
  105. data/spec/spec_tests/data/max_staleness/ReplicaSetWithPrimary/Secondary_tags.yml +5 -5
  106. data/spec/spec_tests/data/max_staleness/ReplicaSetWithPrimary/Secondary_tags2.yml +3 -3
  107. data/spec/spec_tests/data/max_staleness/ReplicaSetWithPrimary/ZeroMaxStaleness.yml +2 -2
  108. data/spec/spec_tests/data/max_staleness/Sharded/SmallMaxStaleness.yml +2 -2
  109. data/spec/spec_tests/data/max_staleness/Single/SmallMaxStaleness.yml +1 -1
  110. data/spec/spec_tests/data/max_staleness/Unknown/SmallMaxStaleness.yml +1 -1
  111. data/spec/spec_tests/data/sessions_unified/snapshot-sessions-not-supported-client-error.yml +69 -0
  112. data/spec/spec_tests/data/sessions_unified/snapshot-sessions-not-supported-server-error.yml +102 -0
  113. data/spec/spec_tests/data/sessions_unified/snapshot-sessions-unsupported-ops.yml +258 -0
  114. data/spec/spec_tests/data/sessions_unified/snapshot-sessions.yml +482 -0
  115. data/spec/spec_tests/seed_list_discovery_spec.rb +1 -1
  116. data/spec/spec_tests/sessions_unified_spec.rb +13 -0
  117. data/spec/support/certificates/atlas-ocsp-ca.crt +47 -40
  118. data/spec/support/certificates/atlas-ocsp.crt +106 -101
  119. data/spec/support/utils.rb +0 -31
  120. data.tar.gz.sig +0 -0
  121. metadata +1084 -1058
  122. metadata.gz.sig +0 -0
  123. data/spec/integration/find_options_spec.rb +0 -227
@@ -0,0 +1,98 @@
1
+ description: "updateOne-let"
2
+
3
+ schemaVersion: "1.0"
4
+
5
+ createEntities:
6
+ - client:
7
+ id: &client0 client0
8
+ observeEvents: [ commandStartedEvent ]
9
+ - database:
10
+ id: &database0 database0
11
+ client: *client0
12
+ databaseName: &database0Name crud-tests
13
+ - collection:
14
+ id: &collection0 collection0
15
+ database: *database0
16
+ collectionName: &collection0Name coll0
17
+
18
+ initialData: &initialData
19
+ - collectionName: *collection0Name
20
+ databaseName: *database0Name
21
+ documents:
22
+ - { _id: 1 }
23
+ - { _id: 2 }
24
+
25
+ tests:
26
+ - description: "UpdateOne with let option"
27
+ runOnRequirements:
28
+ - minServerVersion: "5.0"
29
+ operations:
30
+ - name: updateOne
31
+ object: *collection0
32
+ arguments:
33
+ filter: &filter
34
+ $expr:
35
+ $eq: [ "$_id", "$$id" ]
36
+ update: &update
37
+ - $set: {x: "$$x" }
38
+ let: &let0
39
+ id: 1
40
+ x: "foo"
41
+ expectResult:
42
+ matchedCount: 1
43
+ modifiedCount: 1
44
+ upsertedCount: 0
45
+ expectEvents:
46
+ - client: *client0
47
+ events:
48
+ - commandStartedEvent:
49
+ command:
50
+ update: *collection0Name
51
+ updates:
52
+ -
53
+ q: *filter
54
+ u: *update
55
+ let: *let0
56
+ outcome:
57
+ -
58
+ collectionName: *collection0Name
59
+ databaseName: *database0Name
60
+ documents:
61
+ - { _id: 1, x: "foo" }
62
+ - { _id: 2 }
63
+
64
+ - description: "UpdateOne with let option unsupported (server-side error)"
65
+ runOnRequirements:
66
+ - minServerVersion: "3.6.0"
67
+ maxServerVersion: "4.4.99"
68
+ operations:
69
+ - name: updateOne
70
+ object: *collection0
71
+ arguments:
72
+ filter: &filter1
73
+ _id: 1
74
+ update: &update1
75
+ - $set: {x: "$$x"}
76
+ let: &let1
77
+ x: foo
78
+ expectError:
79
+ errorContains: "'update.let' is an unknown field"
80
+ isClientError: false
81
+ expectEvents:
82
+ - client: *client0
83
+ events:
84
+ - commandStartedEvent:
85
+ command:
86
+ update: *collection0Name
87
+ updates:
88
+ -
89
+ q: *filter1
90
+ u: *update1
91
+ let: *let1
92
+ outcome:
93
+ -
94
+ collectionName: *collection0Name
95
+ databaseName: *database0Name
96
+ documents:
97
+ - { _id: 1 }
98
+ - { _id: 2 }
@@ -8,14 +8,14 @@ topology_description:
8
8
  type: RSSecondary
9
9
  avg_rtt_ms: 50 # Too far.
10
10
  lastUpdateTime: 0
11
- maxWireVersion: 5
11
+ maxWireVersion: 6
12
12
  lastWrite: {lastWriteDate: {$numberLong: "1000001"}}
13
13
  - &2
14
14
  address: b:27017
15
15
  type: RSSecondary
16
16
  avg_rtt_ms: 5
17
17
  lastUpdateTime: 0
18
- maxWireVersion: 5
18
+ maxWireVersion: 6
19
19
  lastWrite: {lastWriteDate: {$numberLong: "1"}} # Very stale.
20
20
  read_preference:
21
21
  mode: Nearest
@@ -8,21 +8,21 @@ topology_description:
8
8
  avg_rtt_ms: 5
9
9
  lastUpdateTime: 1
10
10
  lastWrite: {lastWriteDate: {$numberLong: "125002"}}
11
- maxWireVersion: 5
11
+ maxWireVersion: 6
12
12
  - &2
13
13
  address: b:27017
14
14
  type: RSSecondary
15
15
  avg_rtt_ms: 50 # Too far.
16
16
  lastUpdateTime: 25002 # Not used when there's no primary.
17
17
  lastWrite: {lastWriteDate: {$numberLong: "2"}} # 125 sec stale + 25 sec heartbeat <= 150 sec maxStaleness.
18
- maxWireVersion: 5
18
+ maxWireVersion: 6
19
19
  - &3
20
20
  address: c:27017
21
21
  type: RSSecondary
22
22
  avg_rtt_ms: 5
23
23
  lastUpdateTime: 25001
24
24
  lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale.
25
- maxWireVersion: 5
25
+ maxWireVersion: 6
26
26
  read_preference:
27
27
  mode: Nearest
28
28
  maxStalenessSeconds: 150
@@ -8,21 +8,21 @@ topology_description:
8
8
  avg_rtt_ms: 5
9
9
  lastUpdateTime: 0
10
10
  lastWrite: {lastWriteDate: {$numberLong: "125002"}}
11
- maxWireVersion: 5
11
+ maxWireVersion: 6
12
12
  - &2
13
13
  address: b:27017
14
14
  type: RSSecondary
15
15
  avg_rtt_ms: 50 # Too far.
16
16
  lastUpdateTime: 0
17
17
  lastWrite: {lastWriteDate: {$numberLong: "2"}} # 125 sec stale + 25 sec heartbeat <= 150 sec maxStaleness.
18
- maxWireVersion: 5
18
+ maxWireVersion: 6
19
19
  - &3
20
20
  address: c:27017
21
21
  avg_rtt_ms: 5
22
22
  lastUpdateTime: 0
23
23
  type: RSSecondary
24
24
  lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale.
25
- maxWireVersion: 5
25
+ maxWireVersion: 6
26
26
  read_preference:
27
27
  mode: Nearest
28
28
  maxStalenessSeconds: 150
@@ -8,21 +8,21 @@ topology_description:
8
8
  avg_rtt_ms: 50 # Too far.
9
9
  lastUpdateTime: 0
10
10
  lastWrite: {lastWriteDate: {$numberLong: "125002"}}
11
- maxWireVersion: 5
11
+ maxWireVersion: 6
12
12
  - &2
13
13
  address: b:27017
14
14
  type: RSSecondary
15
15
  avg_rtt_ms: 5
16
16
  lastUpdateTime: 0
17
17
  lastWrite: {lastWriteDate: {$numberLong: "2"}} # 125 sec stale + 25 sec heartbeat <= 150 sec maxStaleness.
18
- maxWireVersion: 5
18
+ maxWireVersion: 6
19
19
  - &3
20
20
  address: c:27017
21
21
  avg_rtt_ms: 5
22
22
  lastUpdateTime: 0
23
23
  type: RSSecondary
24
24
  lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale.
25
- maxWireVersion: 5
25
+ maxWireVersion: 6
26
26
  read_preference:
27
27
  mode: Nearest
28
28
  maxStalenessSeconds: 150
@@ -9,14 +9,14 @@ topology_description:
9
9
  type: RSSecondary
10
10
  avg_rtt_ms: 5
11
11
  lastUpdateTime: 0
12
- maxWireVersion: 5
12
+ maxWireVersion: 6
13
13
  lastWrite: {lastWriteDate: {$numberLong: "1000001"}}
14
14
  - &2
15
15
  address: b:27017
16
16
  type: RSSecondary
17
17
  avg_rtt_ms: 5
18
18
  lastUpdateTime: 0
19
- maxWireVersion: 5
19
+ maxWireVersion: 6
20
20
  lastWrite: {lastWriteDate: {$numberLong: "1"}} # Very stale.
21
21
  read_preference:
22
22
  mode: PrimaryPreferred
@@ -12,7 +12,7 @@ topology_description:
12
12
  avg_rtt_ms: 5
13
13
  lastUpdateTime: 0
14
14
  lastWrite: {lastWriteDate: {$numberLong: "125002"}}
15
- maxWireVersion: 5
15
+ maxWireVersion: 6
16
16
  tags:
17
17
  data_center: tokyo # Matches second tag set.
18
18
  - &2
@@ -21,7 +21,7 @@ topology_description:
21
21
  avg_rtt_ms: 5
22
22
  lastUpdateTime: 0
23
23
  lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale.
24
- maxWireVersion: 5
24
+ maxWireVersion: 6
25
25
  tags:
26
26
  data_center: nyc
27
27
  read_preference:
@@ -9,7 +9,7 @@ topology_description:
9
9
  type: RSSecondary
10
10
  avg_rtt_ms: 5
11
11
  lastUpdateTime: 0
12
- maxWireVersion: 5
12
+ maxWireVersion: 6
13
13
  lastWrite: {lastWriteDate: {$numberLong: "125002"}}
14
14
  tags:
15
15
  data_center: tokyo # No match, but its lastWriteDate is used in estimate.
@@ -18,7 +18,7 @@ topology_description:
18
18
  type: RSSecondary
19
19
  avg_rtt_ms: 5
20
20
  lastUpdateTime: 0
21
- maxWireVersion: 5
21
+ maxWireVersion: 6
22
22
  lastWrite: {lastWriteDate: {$numberLong: "2"}} # 125 sec stale + 25 sec heartbeat <= 150 sec maxStaleness.
23
23
  tags:
24
24
  data_center: nyc
@@ -27,7 +27,7 @@ topology_description:
27
27
  type: RSSecondary
28
28
  avg_rtt_ms: 5
29
29
  lastUpdateTime: 0
30
- maxWireVersion: 5
30
+ maxWireVersion: 6
31
31
  lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale.
32
32
  tags:
33
33
  data_center: nyc
@@ -36,7 +36,7 @@ topology_description:
36
36
  type: RSSecondary
37
37
  avg_rtt_ms: 5
38
38
  lastUpdateTime: 0
39
- maxWireVersion: 5
39
+ maxWireVersion: 6
40
40
  lastWrite: {lastWriteDate: {$numberLong: "2"}}
41
41
  tags:
42
42
  data_center: tokyo # No match.
@@ -8,14 +8,14 @@ topology_description:
8
8
  type: RSSecondary
9
9
  avg_rtt_ms: 5
10
10
  lastUpdateTime: 0
11
- maxWireVersion: 5
11
+ maxWireVersion: 6
12
12
  lastWrite: {lastWriteDate: {$numberLong: "1000001"}}
13
13
  - &2
14
14
  address: b:27017
15
15
  type: RSSecondary
16
16
  avg_rtt_ms: 5
17
17
  lastUpdateTime: 0
18
- maxWireVersion: 5
18
+ maxWireVersion: 6
19
19
  lastWrite: {lastWriteDate: {$numberLong: "1"}} # Very stale.
20
20
  read_preference:
21
21
  mode: SecondaryPreferred
@@ -9,7 +9,7 @@ topology_description:
9
9
  type: RSSecondary
10
10
  avg_rtt_ms: 5
11
11
  lastUpdateTime: 0
12
- maxWireVersion: 5
12
+ maxWireVersion: 6
13
13
  lastWrite: {lastWriteDate: {$numberLong: "125002"}}
14
14
  tags:
15
15
  data_center: tokyo # No match, but its lastWriteDate is used in estimate.
@@ -18,7 +18,7 @@ topology_description:
18
18
  type: RSSecondary
19
19
  avg_rtt_ms: 5
20
20
  lastUpdateTime: 0
21
- maxWireVersion: 5
21
+ maxWireVersion: 6
22
22
  lastWrite: {lastWriteDate: {$numberLong: "2"}} # 125 sec stale + 25 sec heartbeat <= 150 sec maxStaleness.
23
23
  tags:
24
24
  data_center: nyc
@@ -27,7 +27,7 @@ topology_description:
27
27
  type: RSSecondary
28
28
  avg_rtt_ms: 5
29
29
  lastUpdateTime: 0
30
- maxWireVersion: 5
30
+ maxWireVersion: 6
31
31
  lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale.
32
32
  tags:
33
33
  data_center: nyc
@@ -36,7 +36,7 @@ topology_description:
36
36
  type: RSSecondary
37
37
  avg_rtt_ms: 5
38
38
  lastUpdateTime: 0
39
- maxWireVersion: 5
39
+ maxWireVersion: 6
40
40
  lastWrite: {lastWriteDate: {$numberLong: "2"}}
41
41
  tags:
42
42
  data_center: tokyo # No match.
@@ -8,14 +8,14 @@ topology_description:
8
8
  type: RSSecondary
9
9
  avg_rtt_ms: 5
10
10
  lastUpdateTime: 0
11
- maxWireVersion: 5
11
+ maxWireVersion: 6
12
12
  lastWrite: {lastWriteDate: {$numberLong: "2"}}
13
13
  - &2
14
14
  address: b:27017
15
15
  type: RSSecondary
16
16
  avg_rtt_ms: 5
17
17
  lastUpdateTime: 0
18
- maxWireVersion: 4 # Incompatible.
18
+ maxWireVersion: 6
19
19
  lastWrite: {lastWriteDate: {$numberLong: "1"}}
20
20
  read_preference:
21
21
  mode: Nearest
@@ -8,14 +8,14 @@ topology_description:
8
8
  type: RSPrimary
9
9
  avg_rtt_ms: 50 # Too far.
10
10
  lastUpdateTime: 0
11
- maxWireVersion: 5
11
+ maxWireVersion: 6
12
12
  lastWrite: {lastWriteDate: {$numberLong: "1000001"}}
13
13
  - &2
14
14
  address: b:27017
15
15
  type: RSSecondary
16
16
  avg_rtt_ms: 5
17
17
  lastUpdateTime: 0
18
- maxWireVersion: 5
18
+ maxWireVersion: 6
19
19
  lastWrite: {lastWriteDate: {$numberLong: "1"}} # Very stale.
20
20
  read_preference:
21
21
  mode: Nearest
@@ -8,7 +8,7 @@ topology_description:
8
8
  avg_rtt_ms: 50 # Too far.
9
9
  lastUpdateTime: 1
10
10
  lastWrite: {lastWriteDate: {$numberLong: "2"}}
11
- maxWireVersion: 5
11
+ maxWireVersion: 6
12
12
  - &2
13
13
  address: b:27017
14
14
  type: RSSecondary
@@ -17,14 +17,14 @@ topology_description:
17
17
  # Updated 125 sec after primary, so 125 sec stale.
18
18
  # 125 sec stale + 25 sec heartbeat <= 150 sec maxStaleness.
19
19
  lastWrite: {lastWriteDate: {$numberLong: "2"}}
20
- maxWireVersion: 5
20
+ maxWireVersion: 6
21
21
  - &3
22
22
  address: c:27017
23
23
  type: RSSecondary
24
24
  avg_rtt_ms: 5
25
25
  lastUpdateTime: 125001
26
26
  lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale.
27
- maxWireVersion: 5
27
+ maxWireVersion: 6
28
28
  read_preference:
29
29
  mode: Nearest
30
30
  maxStalenessSeconds: 150
@@ -10,14 +10,14 @@ topology_description:
10
10
  type: RSPrimary
11
11
  avg_rtt_ms: 5
12
12
  lastUpdateTime: 0
13
- maxWireVersion: 5
13
+ maxWireVersion: 6
14
14
  lastWrite: {lastWriteDate: {$numberLong: "1"}}
15
15
  - &2
16
16
  address: b:27017
17
17
  type: RSSecondary
18
18
  avg_rtt_ms: 50 # Too far.
19
19
  lastUpdateTime: 0
20
- maxWireVersion: 5
20
+ maxWireVersion: 6
21
21
  lastWrite: {lastWriteDate: {$numberLong: "1"}}
22
22
  read_preference:
23
23
  mode: Nearest
@@ -10,14 +10,14 @@ topology_description:
10
10
  type: RSPrimary
11
11
  avg_rtt_ms: 5
12
12
  lastUpdateTime: 0
13
- maxWireVersion: 5
13
+ maxWireVersion: 6
14
14
  lastWrite: {lastWriteDate: {$numberLong: "1"}}
15
15
  - &2
16
16
  address: b:27017
17
17
  type: RSSecondary
18
18
  avg_rtt_ms: 5
19
19
  lastUpdateTime: 0
20
- maxWireVersion: 5
20
+ maxWireVersion: 6
21
21
  lastWrite: {lastWriteDate: {$numberLong: "1"}}
22
22
  read_preference:
23
23
  mode: Nearest
@@ -11,14 +11,14 @@ topology_description:
11
11
  type: RSPrimary
12
12
  avg_rtt_ms: 5
13
13
  lastUpdateTime: 0
14
- maxWireVersion: 5
14
+ maxWireVersion: 6
15
15
  lastWrite: {lastWriteDate: {$numberLong: "1"}}
16
16
  - &2
17
17
  address: b:27017
18
18
  type: RSSecondary
19
19
  avg_rtt_ms: 5
20
20
  lastUpdateTime: 0
21
- maxWireVersion: 5
21
+ maxWireVersion: 6
22
22
  lastWrite: {lastWriteDate: {$numberLong: "1"}}
23
23
  read_preference:
24
24
  mode: Nearest
@@ -9,14 +9,14 @@ topology_description:
9
9
  type: RSPrimary
10
10
  avg_rtt_ms: 5
11
11
  lastUpdateTime: 0
12
- maxWireVersion: 5
12
+ maxWireVersion: 6
13
13
  lastWrite: {lastWriteDate: {$numberLong: "1"}}
14
14
  - &2
15
15
  address: b:27017
16
16
  type: RSSecondary
17
17
  avg_rtt_ms: 5
18
18
  lastUpdateTime: 0
19
- maxWireVersion: 5
19
+ maxWireVersion: 6
20
20
  lastWrite: {lastWriteDate: {$numberLong: "1"}}
21
21
  read_preference:
22
22
  maxStalenessSeconds: 120
@@ -8,21 +8,21 @@ topology_description:
8
8
  avg_rtt_ms: 5
9
9
  lastUpdateTime: 0
10
10
  lastWrite: {lastWriteDate: {$numberLong: "125002"}}
11
- maxWireVersion: 5
11
+ maxWireVersion: 6
12
12
  - &2
13
13
  address: b:27017
14
14
  type: RSSecondary
15
15
  avg_rtt_ms: 50 # Too far.
16
16
  lastUpdateTime: 0
17
17
  lastWrite: {lastWriteDate: {$numberLong: "2"}} # 125 sec stale + 25 sec heartbeat <= 150 sec maxStaleness.
18
- maxWireVersion: 5
18
+ maxWireVersion: 6
19
19
  - &3
20
20
  address: c:27017
21
21
  avg_rtt_ms: 5
22
22
  lastUpdateTime: 0
23
23
  type: RSSecondary
24
24
  lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale.
25
- maxWireVersion: 5
25
+ maxWireVersion: 6
26
26
  read_preference:
27
27
  mode: Nearest
28
28
  maxStalenessSeconds: 150
@@ -8,21 +8,21 @@ topology_description:
8
8
  avg_rtt_ms: 50 # Too far.
9
9
  lastUpdateTime: 0
10
10
  lastWrite: {lastWriteDate: {$numberLong: "125002"}}
11
- maxWireVersion: 5
11
+ maxWireVersion: 6
12
12
  - &2
13
13
  address: b:27017
14
14
  type: RSSecondary
15
15
  avg_rtt_ms: 5
16
16
  lastUpdateTime: 0
17
17
  lastWrite: {lastWriteDate: {$numberLong: "2"}} # 125 sec stale + 25 sec heartbeat <= 150 sec maxStaleness.
18
- maxWireVersion: 5
18
+ maxWireVersion: 6
19
19
  - &3
20
20
  address: c:27017
21
21
  avg_rtt_ms: 5
22
22
  lastUpdateTime: 0
23
23
  type: RSSecondary
24
24
  lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale.
25
- maxWireVersion: 5
25
+ maxWireVersion: 6
26
26
  read_preference:
27
27
  mode: Nearest
28
28
  maxStalenessSeconds: 150
@@ -12,7 +12,7 @@ topology_description:
12
12
  avg_rtt_ms: 5
13
13
  lastUpdateTime: 0
14
14
  lastWrite: {lastWriteDate: {$numberLong: "125002"}}
15
- maxWireVersion: 5
15
+ maxWireVersion: 6
16
16
  tags:
17
17
  data_center: tokyo
18
18
  - &2
@@ -21,7 +21,7 @@ topology_description:
21
21
  avg_rtt_ms: 5
22
22
  lastUpdateTime: 0
23
23
  lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale.
24
- maxWireVersion: 5
24
+ maxWireVersion: 6
25
25
  tags:
26
26
  data_center: nyc
27
27
  read_preference:
@@ -9,14 +9,14 @@ topology_description:
9
9
  type: RSPrimary
10
10
  avg_rtt_ms: 5
11
11
  lastUpdateTime: 0
12
- maxWireVersion: 5
12
+ maxWireVersion: 6
13
13
  lastWrite: {lastWriteDate: {$numberLong: "1"}}
14
14
  - &2
15
15
  address: b:27017
16
16
  type: RSSecondary
17
17
  avg_rtt_ms: 5
18
18
  lastUpdateTime: 0
19
- maxWireVersion: 5
19
+ maxWireVersion: 6
20
20
  lastWrite: {lastWriteDate: {$numberLong: "1"}}
21
21
  read_preference:
22
22
  mode: PrimaryPreferred
@@ -8,14 +8,14 @@ topology_description:
8
8
  type: RSPrimary
9
9
  avg_rtt_ms: 5
10
10
  lastUpdateTime: 0
11
- maxWireVersion: 5
11
+ maxWireVersion: 6
12
12
  lastWrite: {lastWriteDate: {$numberLong: "1000001"}}
13
13
  - &2
14
14
  address: b:27017
15
15
  type: RSSecondary
16
16
  avg_rtt_ms: 5
17
17
  lastUpdateTime: 0
18
- maxWireVersion: 5
18
+ maxWireVersion: 6
19
19
  lastWrite: {lastWriteDate: {$numberLong: "1"}} # Very stale.
20
20
  read_preference:
21
21
  mode: SecondaryPreferred
@@ -9,14 +9,14 @@ topology_description:
9
9
  type: RSPrimary
10
10
  avg_rtt_ms: 5
11
11
  lastUpdateTime: 0
12
- maxWireVersion: 5
12
+ maxWireVersion: 6
13
13
  lastWrite: {lastWriteDate: {$numberLong: "125002"}}
14
14
  - &2
15
15
  address: b:27017
16
16
  type: RSSecondary
17
17
  avg_rtt_ms: 5
18
18
  lastUpdateTime: 0
19
- maxWireVersion: 5
19
+ maxWireVersion: 6
20
20
  lastWrite: {lastWriteDate: {$numberLong: "2"}} # 125 sec stale + 25 sec heartbeat <= 150 sec maxStaleness.
21
21
  tags:
22
22
  data_center: nyc
@@ -25,7 +25,7 @@ topology_description:
25
25
  type: RSSecondary
26
26
  avg_rtt_ms: 50 # Too far.
27
27
  lastUpdateTime: 1
28
- maxWireVersion: 5
28
+ maxWireVersion: 6
29
29
  lastWrite: {lastWriteDate: {$numberLong: "1000001"}} # Not used in estimate since we have a primary.
30
30
  tags:
31
31
  data_center: nyc
@@ -34,7 +34,7 @@ topology_description:
34
34
  type: RSSecondary
35
35
  avg_rtt_ms: 5
36
36
  lastUpdateTime: 0
37
- maxWireVersion: 5
37
+ maxWireVersion: 6
38
38
  lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale.
39
39
  tags:
40
40
  data_center: nyc
@@ -43,7 +43,7 @@ topology_description:
43
43
  type: RSSecondary
44
44
  avg_rtt_ms: 5
45
45
  lastUpdateTime: 0
46
- maxWireVersion: 5
46
+ maxWireVersion: 6
47
47
  lastWrite: {lastWriteDate: {$numberLong: "2"}}
48
48
  tags:
49
49
  data_center: tokyo # No match.
@@ -12,14 +12,14 @@ topology_description:
12
12
  avg_rtt_ms: 5
13
13
  lastUpdateTime: 0
14
14
  lastWrite: {lastWriteDate: {$numberLong: "125002"}}
15
- maxWireVersion: 5
15
+ maxWireVersion: 6
16
16
  - &2
17
17
  address: b:27017
18
18
  type: RSSecondary
19
19
  avg_rtt_ms: 5
20
20
  lastUpdateTime: 0
21
21
  lastWrite: {lastWriteDate: {$numberLong: "2"}}
22
- maxWireVersion: 5
22
+ maxWireVersion: 6
23
23
  tags:
24
24
  data_center: tokyo
25
25
  - &3
@@ -28,7 +28,7 @@ topology_description:
28
28
  avg_rtt_ms: 5
29
29
  lastUpdateTime: 0
30
30
  lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale.
31
- maxWireVersion: 5
31
+ maxWireVersion: 6
32
32
  tags:
33
33
  data_center: nyc
34
34
  read_preference:
@@ -9,14 +9,14 @@ topology_description:
9
9
  type: RSPrimary
10
10
  avg_rtt_ms: 5
11
11
  lastUpdateTime: 0
12
- maxWireVersion: 5
12
+ maxWireVersion: 6
13
13
  lastWrite: {lastWriteDate: {$numberLong: "125002"}}
14
14
  - &2
15
15
  address: b:27017
16
16
  type: RSSecondary
17
17
  avg_rtt_ms: 5
18
18
  lastUpdateTime: 0
19
- maxWireVersion: 5
19
+ maxWireVersion: 6
20
20
  lastWrite: {lastWriteDate: {$numberLong: "2"}} # 125 sec stale + 25 sec heartbeat <= 150 sec maxStaleness.
21
21
  tags:
22
22
  data_center: nyc
@@ -25,7 +25,7 @@ topology_description:
25
25
  type: RSSecondary
26
26
  avg_rtt_ms: 50 # Too far.
27
27
  lastUpdateTime: 1
28
- maxWireVersion: 5
28
+ maxWireVersion: 6
29
29
  lastWrite: {lastWriteDate: {$numberLong: "1000001"}} # Not used in estimate since we have a primary.
30
30
  tags:
31
31
  data_center: nyc
@@ -34,7 +34,7 @@ topology_description:
34
34
  type: RSSecondary
35
35
  avg_rtt_ms: 5
36
36
  lastUpdateTime: 0
37
- maxWireVersion: 5
37
+ maxWireVersion: 6
38
38
  lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale.
39
39
  tags:
40
40
  data_center: nyc
@@ -43,7 +43,7 @@ topology_description:
43
43
  type: RSSecondary
44
44
  avg_rtt_ms: 5
45
45
  lastUpdateTime: 0
46
- maxWireVersion: 5
46
+ maxWireVersion: 6
47
47
  lastWrite: {lastWriteDate: {$numberLong: "2"}}
48
48
  tags:
49
49
  data_center: tokyo # No match.