Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-4977

Use new send_initial_query signature in Mongoid QueryCache

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.2.0.rc1, 7.1.5, 7.0.11, 6.4.8
    • Component/s: Query
    • Labels:
      None

      Description

      Since the minimum driver version for Mongoid 7.2 was increased to 2.10.5, Mongoid can utilize the two-parameter send_initial_query signature that was added to the driver in 2.9.0. This would make Mongoid use sessions and retryable reads when used with 2.10-2.13 drivers.

      With this change made, the existing tests in Mongoid that assert that modern read retries are used should pass on all supported driver versions (i.e. remove the conditions on those tests limiting them to 2.14+ drivers).

      It would be a good idea also to have a test that asserts that find queries have lsids on them when query cache is used, in all supported driver configurations.

      There is a partial proposed fix for this at https://github.com/mongodb/mongoid/pull/4865

        Attachments

          Activity

            People

            Assignee:
            emily.giurleo Emily Giurleo (Inactive)
            Reporter:
            alex.bevilacqua Alex Bevilacqua
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: