Skip to content

Commit

Permalink
GODRIVER-41 implement sdam monitoring (#479)
Browse files Browse the repository at this point in the history
Co-authored-by: iwysiu <[email protected]>
Co-authored-by: Alice Thum <[email protected]>
  • Loading branch information
3 people authored Sep 18, 2020
1 parent 51e3de6 commit 2ad7e54
Show file tree
Hide file tree
Showing 24 changed files with 1,190 additions and 107 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,7 @@
"uri": "mongodb://a,b/",
"phases": [
{
"responses": [
[
"a:27017",
{
"ok": 1,
"ismaster": true,
"setName": "rs",
"setVersion": 1,
"primary": "a:27017",
"hosts": [
"a:27017"
],
"minWireVersion": 0,
"maxWireVersion": 4
}
],
[
"b:27017",
{
"ok": 1,
"ismaster": true
}
]
],
"responses": [],
"outcome": {
"events": [
{
Expand Down Expand Up @@ -73,7 +50,37 @@
"topologyId": "42",
"address": "b:27017"
}
},
}
]
}
},
{
"responses": [
[
"a:27017",
{
"ok": 1,
"ismaster": true,
"setName": "rs",
"setVersion": 1,
"primary": "a:27017",
"hosts": [
"a:27017"
],
"minWireVersion": 0,
"maxWireVersion": 4
}
],
[
"b:27017",
{
"ok": 1,
"ismaster": true
}
]
],
"outcome": {
"events": [
{
"server_description_changed_event": {
"topologyId": "42",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,7 @@ description: "Monitoring a replica set with non member"
uri: "mongodb://a,b/"
phases:
-
responses:
-
- "a:27017"
- {
ok: 1,
ismaster: true,
setName: "rs",
setVersion: 1.0,
primary: "a:27017",
hosts: [ "a:27017" ],
minWireVersion: 0,
maxWireVersion: 4
}
-
- "b:27017"
- { ok: 1, ismaster: true }
responses: []
outcome:
events:
-
Expand Down Expand Up @@ -52,6 +37,25 @@ phases:
server_opening_event:
topologyId: "42"
address: "b:27017"
-
responses:
-
- "a:27017"
- {
ok: 1,
ismaster: true,
setName: "rs",
setVersion: 1.0,
primary: "a:27017",
hosts: [ "a:27017" ],
minWireVersion: 0,
maxWireVersion: 4
}
-
- "b:27017"
- { ok: 1, ismaster: true }
outcome:
events:
-
server_description_changed_event:
topologyId: "42"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"description": "Monitoring a standalone connection",
"uri": "mongodb://a:27017",
"uri": "mongodb://a:27017/?directConnection=true",
"phases": [
{
"responses": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
description: "Monitoring a standalone connection"
uri: "mongodb://a:27017"
uri: "mongodb://a:27017/?directConnection=true"
phases:
-
responses:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
"description": "Monitoring a standalone connection - suppress update events for equal server descriptions",
"uri": "mongodb://a:27017/?directConnection=true",
"phases": [
{
"responses": [
[
"a:27017",
{
"ok": 1,
"ismaster": true,
"minWireVersion": 0,
"maxWireVersion": 4
}
],
[
"a:27017",
{
"ok": 1,
"ismaster": true,
"minWireVersion": 0,
"maxWireVersion": 4
}
]
],
"outcome": {
"events": [
{
"topology_opening_event": {
"topologyId": "42"
}
},
{
"topology_description_changed_event": {
"topologyId": "42",
"previousDescription": {
"topologyType": "Unknown",
"servers": []
},
"newDescription": {
"topologyType": "Single",
"servers": [
{
"address": "a:27017",
"arbiters": [],
"hosts": [],
"passives": [],
"type": "Unknown"
}
]
}
}
},
{
"server_opening_event": {
"topologyId": "42",
"address": "a:27017"
}
},
{
"server_description_changed_event": {
"topologyId": "42",
"address": "a:27017",
"previousDescription": {
"address": "a:27017",
"arbiters": [],
"hosts": [],
"passives": [],
"type": "Unknown"
},
"newDescription": {
"address": "a:27017",
"arbiters": [],
"hosts": [],
"passives": [],
"type": "Standalone"
}
}
},
{
"topology_description_changed_event": {
"topologyId": "42",
"previousDescription": {
"topologyType": "Single",
"servers": [
{
"address": "a:27017",
"arbiters": [],
"hosts": [],
"passives": [],
"type": "Unknown"
}
]
},
"newDescription": {
"topologyType": "Single",
"servers": [
{
"address": "a:27017",
"arbiters": [],
"hosts": [],
"passives": [],
"type": "Standalone"
}
]
}
}
}
]
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
description: "Monitoring a standalone connection - suppress update events for equal server descriptions"
uri: "mongodb://a:27017/?directConnection=true"
phases:
-
responses:
-
- "a:27017"
- { ok: 1, ismaster: true, minWireVersion: 0, maxWireVersion: 4 }
-
- "a:27017"
- { ok: 1, ismaster: true, minWireVersion: 0, maxWireVersion: 4 }

outcome:
events:
-
topology_opening_event:
topologyId: "42"
-
topology_description_changed_event:
topologyId: "42"
previousDescription:
topologyType: "Unknown"
servers: []
newDescription:
topologyType: "Single"
servers:
-
address: "a:27017"
arbiters: []
hosts: []
passives: []
type: "Unknown"
-
server_opening_event:
topologyId: "42"
address: "a:27017"
-
server_description_changed_event:
topologyId: "42"
address: "a:27017"
previousDescription:
address: "a:27017"
arbiters: []
hosts: []
passives: []
type: "Unknown"
newDescription:
address: "a:27017"
arbiters: []
hosts: []
passives: []
type: "Standalone"
-
topology_description_changed_event:
topologyId: "42"
previousDescription:
topologyType: "Single"
servers:
-
address: "a:27017"
arbiters: []
hosts: []
passives: []
type: "Unknown"
newDescription:
topologyType: "Single"
servers:
-
address: "a:27017"
arbiters: []
hosts: []
passives: []
type: "Standalone"
Loading

0 comments on commit 2ad7e54

Please sign in to comment.