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

Failing specs on master: expect_query + sharded topology

    • Type: Icon: Build Failure Build Failure
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Tests
    • None
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      The expect_query helper function seems to be flakey when using sharded cluster topology. I'm not sure exactly why but my guess is that the driver is making multiple "child" queries to each shard, causing the expected query count to be off.

      The following specs are affected for example:

      • Mongoid::Association::Referenced::BelongsTo::Eager.includes when the association is polymorphic when eager loading multiple associations loads all associations eagerly
      • Mongoid::Contextual::Mongo#estimated_count when the query cache is enabled the results are not cached
      • Mongoid::Criteria::Includable When multiple associations reference the same class executes a query for the non-retrieved elements
      • Mongoid::Criteria::Includable When multiple parent_inclusions for the same association when including an association and using each twice on a criteria eager loads the criteria

            Assignee:
            dmitry.rybakov@mongodb.com Dmitry Rybakov
            Reporter:
            shields@tablecheck.com Johnny Shields
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: