[CSHARP-4014] Remove code to run `getLastError` command once minimum supported server is 4.2 Created: 13/Jan/22 Updated: 16/Nov/22 |
|
| Status: | Backlog |
| Project: | C# Driver |
| Component/s: | Connectivity |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Dmitry Lukyanov (Inactive) | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Server Compat: | 4.1 | ||||||||
| Description |
|
In the scope of NOTE: currently, the spec tests don't expect that we call it that forced us to apply a workaround in UnifiedEventMatcher here |
| Comments |
| Comment by Robert Stam [ 18/Jan/22 ] |
|
Removing the link to
This ticket is about not running the `getLastError` command which is a different issue. While they do have in common that they both are efforts to remove code, they are different scenarios. |
| Comment by Robert Stam [ 18/Jan/22 ] |
|
As background: the reason we used to run the `getLastError` command is to get the `connectionId` value. This is the server's `connectionId`. We want to associate the server's `connectionId` with the client's connection to make it easier to correlate errors or events that are observed client-side with a corresponding server connection. That information is usually needed to correlate with events in the server log. Since at least server version 4.0 the `hello` comand has been including the `connectionId` in the response. When we are able to get the `connectionId` from the `hello` response we do not run the `getLastError` command. So use of this command has essentially gone away by itself due to the `connectionId` field being added to the `hello` response. We should leave this ticket open for now so that once 4.0 becomes the minimum supported server version we can physically remove the code that conditionally runs the `getLastError` command. |