Skip to content

GODRIVER-2152: Update max staleness tests to report a 3.6+ wire version #774

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions data/max-staleness/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ Each test specifies that it expects an error, or specifies two sets of servers:
tests pass or fail deterministically.

If the file contains ``error: true``, drivers MUST test that they throw an
error during server selection, due to an invalid read preference or
incompatible wire versions. For other files, drivers MUST test that they
correctly select the set of servers in ``in_latency_window``.
error during server selection due to an invalid read preference. For other
files, drivers MUST test that they correctly select the set of servers in
``in_latency_window``.

Drivers MAY also test that before filtration by latency, they select the
specified set of "suitable" servers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "RSSecondary",
"avg_rtt_ms": 50,
"lastUpdateTime": 0,
"maxWireVersion": 5,
"maxWireVersion": 6,
"lastWrite": {
"lastWriteDate": {
"$numberLong": "1000001"
Expand All @@ -19,7 +19,7 @@
"type": "RSSecondary",
"avg_rtt_ms": 5,
"lastUpdateTime": 0,
"maxWireVersion": 5,
"maxWireVersion": 6,
"lastWrite": {
"lastWriteDate": {
"$numberLong": "1"
Expand All @@ -37,7 +37,7 @@
"type": "RSSecondary",
"avg_rtt_ms": 50,
"lastUpdateTime": 0,
"maxWireVersion": 5,
"maxWireVersion": 6,
"lastWrite": {
"lastWriteDate": {
"$numberLong": "1000001"
Expand All @@ -49,7 +49,7 @@
"type": "RSSecondary",
"avg_rtt_ms": 5,
"lastUpdateTime": 0,
"maxWireVersion": 5,
"maxWireVersion": 6,
"lastWrite": {
"lastWriteDate": {
"$numberLong": "1"
Expand All @@ -63,7 +63,7 @@
"type": "RSSecondary",
"avg_rtt_ms": 5,
"lastUpdateTime": 0,
"maxWireVersion": 5,
"maxWireVersion": 6,
"lastWrite": {
"lastWriteDate": {
"$numberLong": "1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ topology_description:
type: RSSecondary
avg_rtt_ms: 50 # Too far.
lastUpdateTime: 0
maxWireVersion: 5
maxWireVersion: 6
lastWrite: {lastWriteDate: {$numberLong: "1000001"}}
- &2
address: b:27017
type: RSSecondary
avg_rtt_ms: 5
lastUpdateTime: 0
maxWireVersion: 5
maxWireVersion: 6
lastWrite: {lastWriteDate: {$numberLong: "1"}} # Very stale.
read_preference:
mode: Nearest
Expand Down
36 changes: 0 additions & 36 deletions data/max-staleness/ReplicaSetNoPrimary/Incompatible.json

This file was deleted.

25 changes: 0 additions & 25 deletions data/max-staleness/ReplicaSetNoPrimary/Incompatible.yml

This file was deleted.

12 changes: 6 additions & 6 deletions data/max-staleness/ReplicaSetNoPrimary/LastUpdateTime.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"$numberLong": "125002"
}
},
"maxWireVersion": 5
"maxWireVersion": 6
},
{
"address": "b:27017",
Expand All @@ -25,7 +25,7 @@
"$numberLong": "2"
}
},
"maxWireVersion": 5
"maxWireVersion": 6
},
{
"address": "c:27017",
Expand All @@ -37,7 +37,7 @@
"$numberLong": "1"
}
},
"maxWireVersion": 5
"maxWireVersion": 6
}
]
},
Expand All @@ -56,7 +56,7 @@
"$numberLong": "125002"
}
},
"maxWireVersion": 5
"maxWireVersion": 6
},
{
"address": "b:27017",
Expand All @@ -68,7 +68,7 @@
"$numberLong": "2"
}
},
"maxWireVersion": 5
"maxWireVersion": 6
}
],
"in_latency_window": [
Expand All @@ -82,7 +82,7 @@
"$numberLong": "125002"
}
},
"maxWireVersion": 5
"maxWireVersion": 6
}
]
}
6 changes: 3 additions & 3 deletions data/max-staleness/ReplicaSetNoPrimary/LastUpdateTime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ topology_description:
avg_rtt_ms: 5
lastUpdateTime: 1
lastWrite: {lastWriteDate: {$numberLong: "125002"}}
maxWireVersion: 5
maxWireVersion: 6
- &2
address: b:27017
type: RSSecondary
avg_rtt_ms: 50 # Too far.
lastUpdateTime: 25002 # Not used when there's no primary.
lastWrite: {lastWriteDate: {$numberLong: "2"}} # 125 sec stale + 25 sec heartbeat <= 150 sec maxStaleness.
maxWireVersion: 5
maxWireVersion: 6
- &3
address: c:27017
type: RSSecondary
avg_rtt_ms: 5
lastUpdateTime: 25001
lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale.
maxWireVersion: 5
maxWireVersion: 6
read_preference:
mode: Nearest
maxStalenessSeconds: 150
Expand Down
12 changes: 6 additions & 6 deletions data/max-staleness/ReplicaSetNoPrimary/Nearest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"$numberLong": "125002"
}
},
"maxWireVersion": 5
"maxWireVersion": 6
},
{
"address": "b:27017",
Expand All @@ -25,7 +25,7 @@
"$numberLong": "2"
}
},
"maxWireVersion": 5
"maxWireVersion": 6
},
{
"address": "c:27017",
Expand All @@ -37,7 +37,7 @@
"$numberLong": "1"
}
},
"maxWireVersion": 5
"maxWireVersion": 6
}
]
},
Expand All @@ -56,7 +56,7 @@
"$numberLong": "125002"
}
},
"maxWireVersion": 5
"maxWireVersion": 6
},
{
"address": "b:27017",
Expand All @@ -68,7 +68,7 @@
"$numberLong": "2"
}
},
"maxWireVersion": 5
"maxWireVersion": 6
}
],
"in_latency_window": [
Expand All @@ -82,7 +82,7 @@
"$numberLong": "125002"
}
},
"maxWireVersion": 5
"maxWireVersion": 6
}
]
}
6 changes: 3 additions & 3 deletions data/max-staleness/ReplicaSetNoPrimary/Nearest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ topology_description:
avg_rtt_ms: 5
lastUpdateTime: 0
lastWrite: {lastWriteDate: {$numberLong: "125002"}}
maxWireVersion: 5
maxWireVersion: 6
- &2
address: b:27017
type: RSSecondary
avg_rtt_ms: 50 # Too far.
lastUpdateTime: 0
lastWrite: {lastWriteDate: {$numberLong: "2"}} # 125 sec stale + 25 sec heartbeat <= 150 sec maxStaleness.
maxWireVersion: 5
maxWireVersion: 6
- &3
address: c:27017
avg_rtt_ms: 5
lastUpdateTime: 0
type: RSSecondary
lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale.
maxWireVersion: 5
maxWireVersion: 6
read_preference:
mode: Nearest
maxStalenessSeconds: 150
Expand Down
12 changes: 6 additions & 6 deletions data/max-staleness/ReplicaSetNoPrimary/Nearest2.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"$numberLong": "125002"
}
},
"maxWireVersion": 5
"maxWireVersion": 6
},
{
"address": "b:27017",
Expand All @@ -25,7 +25,7 @@
"$numberLong": "2"
}
},
"maxWireVersion": 5
"maxWireVersion": 6
},
{
"address": "c:27017",
Expand All @@ -37,7 +37,7 @@
"$numberLong": "1"
}
},
"maxWireVersion": 5
"maxWireVersion": 6
}
]
},
Expand All @@ -56,7 +56,7 @@
"$numberLong": "125002"
}
},
"maxWireVersion": 5
"maxWireVersion": 6
},
{
"address": "b:27017",
Expand All @@ -68,7 +68,7 @@
"$numberLong": "2"
}
},
"maxWireVersion": 5
"maxWireVersion": 6
}
],
"in_latency_window": [
Expand All @@ -82,7 +82,7 @@
"$numberLong": "2"
}
},
"maxWireVersion": 5
"maxWireVersion": 6
}
]
}
6 changes: 3 additions & 3 deletions data/max-staleness/ReplicaSetNoPrimary/Nearest2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ topology_description:
avg_rtt_ms: 50 # Too far.
lastUpdateTime: 0
lastWrite: {lastWriteDate: {$numberLong: "125002"}}
maxWireVersion: 5
maxWireVersion: 6
- &2
address: b:27017
type: RSSecondary
avg_rtt_ms: 5
lastUpdateTime: 0
lastWrite: {lastWriteDate: {$numberLong: "2"}} # 125 sec stale + 25 sec heartbeat <= 150 sec maxStaleness.
maxWireVersion: 5
maxWireVersion: 6
- &3
address: c:27017
avg_rtt_ms: 5
lastUpdateTime: 0
type: RSSecondary
lastWrite: {lastWriteDate: {$numberLong: "1"}} # Too stale.
maxWireVersion: 5
maxWireVersion: 6
read_preference:
mode: Nearest
maxStalenessSeconds: 150
Expand Down
Loading