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

Query cache: "Cannot restart iteration of a cursor which issued a getMore"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 7.0.5
    • Fix Version/s: 7.2.0.rc1, 7.1.4, 7.0.10, 6.4.7
    • Component/s: Query
    • Labels:
      None

      Description

      Version: Mongoid 7.0.5

      I enabled the query cache middleware in production and I'm seeing:

      Mongo::Error::InvalidCursorOperation
      Cannot restart iteration of a cursor which issued a getMore
      vendor/bundle/ruby/2.6.0/gems/mongo-2.13.0/lib/mongo/cursor.rb:152
       
      It appears that any attempt to use "getMore" fails with the query cache.
       
      Is this known behavior? Is it fixed in a newer version (7.1?)

      According to the docs:
       
      > Note that if the number of results is too large to be returned in a single batch, the QueryCache will not be used, even if Mongoid::QueryCache.enabled is true.
       
      This would imply to me that the query should still succeed, just without being cached...

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              emily.giurleo Emily Giurleo (Inactive)
              Reporter:
              shields@tablecheck.com Johnny Shields
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: