Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-2706

Find options are not correctly propagated in a number of cases

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 2.18.3
    • Affects Version/s: None
    • Component/s: Operations
    • None

      While working on RUBY-2220 I noticed that in a number of cases various find-related options aren't correctly propagated.

      The options can generally be set:

      • for an individual operation
      • on the collection
      • on the database (? perhaps only some)
      • on the client

      The find-related operations are:

      • find
      • getMore
      • aggregate
      • mapReduce
      • explain
      • ParallelScan (there isn't a server command for this, the driver scans in parallel)

      The options are numerous, probably the best reference for them is server command documentation for each of the commands above.

      Note that some commands do not accept some of the options, e.g. explain does not accept readConcern.

      Note that some options are non-trivial to override, for example :oplog_replay is a boolean and a false value for an operation should override a true value set on the collection, so a simple || wouldn't work there.

      This ticket is laborious due to the multitude of the combinations that need to be tested. Perhaps some thought could go into how the respective tests can be designed in a table-driven manner to make them more concise, and therefore more readable.

      The changes under RUBY-2220 may add to the list of omissions, it's hard to verify correctness with the existing driver code.

            Assignee:
            dmitry.rybakov@mongodb.com Dmitry Rybakov
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: