[DRIVERS-2724] clarify CSOT behavior for gridfs streams Created: 14/Sep/23  Updated: 26/Sep/23

Status: Needs Triage
Project: Drivers
Component/s: CSOT
Fix Version/s: None

Type: Spec Change Priority: Unknown
Reporter: Bailey Pearson Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Driver Changes: Needed

 Description   

Summary

This ticket came out of a slack thread in the CSOT channel.  The CSOT specification states that `timeoutMS` must apply to the lifetime of any streams returned by gridfs APIs.

This doesn't make sense in some drivers like Node, where the gridfs implementation returns an object that needs to be consumed by the user.  In the extreme case, a gridfs stream may time out before the user starts to consume it. 

The Design Rationale section of the specification provides context on this decision and suggests an iteration mode was considered as an alternative.  Cursors support two modes (CURSOR_LIFETIME and ITERATION) to provide flexibility for users.

The specification should be updated to provide guidance for drivers similar to Node.  Two options outlined in the slack thread are:

  • allow drivers like Node to exempt their gridfs streams from CSOT
  • Allow drivers like Node to apply timeoutMS to each operation the stream performs internally (basically the equivalent of ITERATION mode that cursors provide)

Motivation

Who is the affected end user?

drivers engineers implementing CSOT.

How does this affect the end user?

drivers might be blocked implementing CSOT for gridfs streams.

How likely is it that this problem or use case will occur?

n/a

If the problem does occur, what are the consequences and how severe are they?

n/a

Is this issue urgent?

Sooner is better, as Node is implementing CSOT this quarter.  I've deferred the gridfs implementation until we clarify this point in the specification.

Is this ticket required by a downstream team?

no

Is this ticket only for tests?

no

Acceptance Criteria

  • Determine the best path forward for drivers such as Node where gridfs streams are lazy and must be consumed by the user.

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