Skip to content
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

DRIVERS-2452 Add databaseName field to CommandFailedEvent #1434

Merged
merged 5 commits into from
Jun 21, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,11 @@ See the `Load Balancer Specification <../load-balancers/load-balancers.rst#event
*/
commandName: String;

/**
* Returns the database name.
*/
databaseName: String;

/**
* Returns the driver generated request id.
*/
Expand Down Expand Up @@ -317,6 +322,11 @@ See the `Load Balancer Specification <../load-balancers/load-balancers.rst#event
*/
commandName: String;

/**
* Returns the database name.
*/
databaseName: String;

/**
* Returns the failure. Based on the language, this SHOULD be a message string, exception
* object, or error document.
Expand Down Expand Up @@ -560,3 +570,4 @@ Changelog
default port 27017 when relevant. Updated suggested unstructured forms of log messages to more
clearly label connection IDs and use more readable server address representations.
:2023-03-23: Updated ``serverConnectionId`` field to be Int64 as long-running servers can return Int64.
:2023-06-13: Added ``databaseName`` field to ``CommandFailedEvent`` and ``CommandSucceededEvent``.
jmikola marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"description": "find",
"schemaVersion": "1.1",
"schemaVersion": "1.15",
"createEntities": [
{
"client": {
Expand Down Expand Up @@ -103,7 +103,8 @@
]
}
},
"commandName": "find"
"commandName": "find",
"databaseName": "command-monitoring-tests"
}
}
]
Expand Down Expand Up @@ -198,7 +199,8 @@
]
}
},
"commandName": "find"
"commandName": "find",
"databaseName": "command-monitoring-tests"
}
}
]
Expand Down Expand Up @@ -262,7 +264,8 @@
]
}
},
"commandName": "find"
"commandName": "find",
"databaseName": "command-monitoring-tests"
}
}
]
Expand Down Expand Up @@ -338,7 +341,8 @@
]
}
},
"commandName": "find"
"commandName": "find",
"databaseName": "command-monitoring-tests"
}
},
{
Expand Down Expand Up @@ -376,7 +380,8 @@
]
}
},
"commandName": "getMore"
"commandName": "getMore",
"databaseName": "command-monitoring-tests"
}
}
]
Expand Down Expand Up @@ -464,7 +469,8 @@
]
}
},
"commandName": "find"
"commandName": "find",
"databaseName": "command-monitoring-tests"
}
},
{
Expand Down Expand Up @@ -498,7 +504,8 @@
]
}
},
"commandName": "getMore"
"commandName": "getMore",
"databaseName": "command-monitoring-tests"
}
}
]
Expand Down Expand Up @@ -539,7 +546,8 @@
},
{
"commandFailedEvent": {
"commandName": "find"
"commandName": "find",
"databaseName": "command-monitoring-tests"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
description: "find"

schemaVersion: "1.1"
schemaVersion: "1.15"

createEntities:
- client:
Expand Down Expand Up @@ -56,6 +56,7 @@ tests:
firstBatch:
- { _id: 1, x: 11 }
commandName: find
databaseName: *databaseName

- description: "A successful find with options"
operations:
Expand Down Expand Up @@ -98,6 +99,7 @@ tests:
- { x: 33 }
- { x: 22 }
commandName: find
databaseName: *databaseName

- description: "A successful find with showRecordId and returnKey"
operations:
Expand Down Expand Up @@ -131,6 +133,7 @@ tests:
- { _id: 4 }
- { _id: 5 }
commandName: find
databaseName: *databaseName

- description: "A successful find with a getMore"
operations:
Expand Down Expand Up @@ -162,6 +165,7 @@ tests:
- { _id: 2, x: 22 }
- { _id: 3, x: 33 }
commandName: find
databaseName: *databaseName
- commandStartedEvent:
command:
getMore: { $$type: [ int, long ] }
Expand All @@ -179,6 +183,7 @@ tests:
- { _id: 4, x: 44 }
- { _id: 5, x: 55 }
commandName: getMore
databaseName: *databaseName

- description: "A successful find event with a getmore and the server kills the cursor (<= 4.4)"
runOnRequirements:
Expand Down Expand Up @@ -216,6 +221,7 @@ tests:
- { _id: 2, x: 22 }
- { _id: 3, x: 33 }
commandName: find
databaseName: *databaseName
- commandStartedEvent:
command:
getMore: { $$type: [ int, long ] }
Expand All @@ -232,6 +238,7 @@ tests:
nextBatch:
- { _id: 4, x: 44 }
commandName: getMore
databaseName: *databaseName

- description: "A failed find event"
operations:
Expand All @@ -252,3 +259,4 @@ tests:
databaseName: *databaseName
- commandFailedEvent:
commandName: find
databaseName: *databaseName
Loading
Loading