[CDRIVER-3780] Create public API to report whether a server session is dirty Created: 24/Aug/20  Updated: 28/Oct/23  Resolved: 25/Jan/21

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.18.0, 1.18.0-alpha

Type: New Feature Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by PHPLIB-528 Add more sessions tests with more rea... Closed
Duplicate
is duplicated by CDRIVER-3874 Add a getter to expose whether a clie... Closed
Related
related to PHPC-2003 Expose whether a client session is dirty Closed
is related to PHPC-1381 Discard ServerSessions involved in ne... Closed

 Description   

While investigating PHPLIB-528, I remembered that PHPC and PHPLIB cannot implement any of the session spec tests because libmongoc provides no API for discerning whether a session has been marked as dirty.

The Sessions spec doesn't talk about the relevance of this field for users, although I don't see any reason why it couldn't be exposed in a public API (at least in libmongoc for the benefit of other drivers).

Can we consider adding mongoc_client_session_is_dirty? I'm open to more contextual names (e.g. mongoc_client_session_will_be_discarded, mongoc_client_session_has_seen_error), but that's probably something better conveyed in documentation.



 Comments   
Comment by Githook User [ 23/Mar/21 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-3780 add client_session_get_dirty (#726)
Branch: csot
https://github.com/mongodb/mongo-c-driver/commit/387054e58ca7beff8e36ff7385f660afb5f4e549

Comment by Githook User [ 25/Jan/21 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-3780 add client_session_get_dirty (#726)
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/387054e58ca7beff8e36ff7385f660afb5f4e549

Comment by Kevin Albertson [ 25/Jan/21 ]

PR: https://github.com/mongodb/mongo-c-driver/pull/726

Generated at Wed Feb 07 21:19:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.