Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2724

clarify CSOT behavior for gridfs streams

    • Type: Icon: Spec Change Spec Change
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Component/s: CSOT
    • None
    • Needed

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            bailey.pearson@mongodb.com Bailey Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: