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

Use new send_initial_query signature in Mongoid QueryCache

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

      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

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

              Created:
              Updated:
              Resolved: