[DRIVERS-427] endSessions command no longer takes `ids` parameter Created: 20/Nov/17  Updated: 28/Oct/23  Resolved: 05/Jun/18

Status: Closed
Project: Drivers
Component/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Matt Broadstone Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: newdriver
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on CXX-1482 endSessions command no longer takes `... Closed
depends on GODRIVER-148 endSessions command no longer takes `... Closed
depends on PHPC-1061 endSessions command no longer takes `... Closed
depends on RUBY-1268 endSessions command no longer takes `... Closed
depends on RUST-157 endSessions command no longer takes `... Closed
Related
is related to PYTHON-1419 Call endSessions Closed
Driver Compliance:
Key Status/Resolution FixVersion
PERL-837 Won't Fix
RUBY-1268 Works as Designed
CXX-1482 Fixed
PHPC-1061 Works as Designed
GODRIVER-148 Won't Fix
SWIFT-468 Done
RUST-157 Won't Fix

 Description   

This is something I missed that changed in the spec recently. The problem here is that the advice in the spec is to explicitly ignore all responses to the endSessions command, so I never saw that my code was broken until I was looking at verbose server logs. We should probably make sure all drivers caught this so we're not leaking sessions.



 Comments   
Comment by Rathi Gnanasekaran [ 05/Jun/18 ]

Closed via automated process.

Comment by A. Jesse Jiryu Davis [ 20/Nov/17 ]

Right, the session ids are an array, the value of the "endSessions" field:

{ endSessions: [ 1, 2, 3 ] }

The C Driver tests endSessions thus:

  1. Create a client
  2. Register an APM command-started and command-succeeded handler
  3. Start a couple client sessions and copy their lsids
  4. Destroy the client
  5. Assert that the command-started handler receives "endSessions" with the two lsids
  6. Assert that the command-succeeded handler received "ok: 1" from the server for an event with command name "endSessions"

Checking the server reply in this test will catch a command syntax error like this.

Generated at Thu Feb 08 08:21:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.