Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-9388

Creating large arrays of embedded documents causes blocking on secondaries.

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.2.3
    • Component/s: Replication
    • Labels:
      None
    • Environment:
      linux
    • ALL
    • Hide

      use test;
      for(t = 0; t < 10000; t++){
      db.embedded_doc.insert({_id :t});
      for(i = 0; i < 10000; i++){
      db.embedded_doc.update({_id : t}, { $push : { test_array :

      { field1 : "VALUE", field2 : i }

      } });
      }
      }

      Show
      use test; for(t = 0; t < 10000; t++){ db.embedded_doc.insert({_id :t}); for(i = 0; i < 10000; i++){ db.embedded_doc.update({_id : t}, { $push : { test_array : { field1 : "VALUE", field2 : i } } }); } }

      When adding large arrays of embedded documents replication becomes blocked on secondaries. This is causing queues on the slave and timouts to slaveOk() queries comming from a php driver.

      I am wondering if this could be related to SERVER-2771 as I read somewhere that indexes are created on arrays. I could not find any corroborating information.

            Assignee:
            stephen.steneker@mongodb.com Stennie Steneker (Inactive)
            Reporter:
            robert.jobson@dominionenterprises.com Robert Jobson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: