Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-3705

ReadPreference.fromOptions ignores hedge and maxStalenessSeconds options when readPreference is a string

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.2.2
    • Affects Version/s: None
    • Component/s: None
    • Not Needed

      > ReadPreference.fromOptions({readPreference: 'nearest', readPreferenceTags: [], hedge: {enabled: false}})
      ReadPreference {
        mode: 'nearest',
        tags: [],
        hedge: undefined,
        maxStalenessSeconds: undefined,
        minWireVersion: undefined
      }
      

      This seems like something that should be allowed according to the typescript definitions, and was reported as a bug to us because it breaks hedged read settings in mongosh.

            Assignee:
            bailey.pearson@mongodb.com Bailey Pearson
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: