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

Data loss possibly related to composite-compound index invalid for splitting chunks when used for sharding.... new feature 2.2.0

    • Type: Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.2.0
    • Component/s: Index Maintenance
    • Labels:
    • ALL
    • Hide

      manual test logged directly to shard.

      > db.listing_fields209_763293.getIndexes();
      [
      {
      "v" : 1,
      "key" :

      { "_id" : 1 }

      ,
      "ns" : "homes_didx.listing_fields209_763293",
      "name" : "id"
      },
      {
      "v" : 1,
      "key" :

      { "hash_fk_id" : NumberLong(1), "fk_listing_id" : NumberLong(1) }

      ,
      "unique" : true,
      "ns" : "homes_didx.listing_fields209_763293",
      "name" : "hash_fk_id_1_fk_listing_id_1"
      }
      ]

      > db.listing_fields209_763293.find().min(

      {hash_fk_id: "753af0f2"}

      ).max(

      {hash_fk_ id: MaxKey}

      );
      error: {
      "$err" : "no index found for specified keyPattern: {} min:

      { hash_fk_id: \"753af0f2\" }

      max:

      { hash_fk_id: MaxKey }

      ",
      "code" : 10367

      executed on router..

      mongos> db.listing_fields209_763293.ensureIndex(

      {hash_fk_id:1}

      );

      db.listing_fields209_763293.find().min(

      {hash_fk_id: "753af0f2"}

      ).max(

      {hash_fk_id: MaxKey}

      );

      query completes successfully after index added.

      This collection is created, composite index added to hash_fk_id,fk_type_id then sharded on the leading edge hash_fk_id. Let me know if you need more information.

      Show
      manual test logged directly to shard. > db.listing_fields209_763293.getIndexes(); [ { "v" : 1, "key" : { "_id" : 1 } , "ns" : "homes_didx.listing_fields209_763293", "name" : " id " }, { "v" : 1, "key" : { "hash_fk_id" : NumberLong(1), "fk_listing_id" : NumberLong(1) } , "unique" : true, "ns" : "homes_didx.listing_fields209_763293", "name" : "hash_fk_id_1_fk_listing_id_1" } ] > db.listing_fields209_763293.find().min( {hash_fk_id: "753af0f2"} ).max( {hash_fk_ id: MaxKey} ); error: { "$err" : "no index found for specified keyPattern: {} min: { hash_fk_id: \"753af0f2\" } max: { hash_fk_id: MaxKey } ", "code" : 10367 executed on router.. mongos> db.listing_fields209_763293.ensureIndex( {hash_fk_id:1} ); db.listing_fields209_763293.find().min( {hash_fk_id: "753af0f2"} ).max( {hash_fk_id: MaxKey} ); query completes successfully after index added. This collection is created, composite index added to hash_fk_id,fk_type_id then sharded on the leading edge hash_fk_id. Let me know if you need more information.

      found a problem where the leading edge of a compound key will not su

      error from log

      Thu Nov 15 18:16:12 [conn126507] problem detected during query over homes_didx.listing_fields209_763293 : { $err: "no index found for specified keyPattern: {} min:

      { hash_fk_id: "753af0f2" }

      max:

      { hash_fk_id: MaxKey }

      ", code: 10367 }

      As a work around we are removing the compound index.

            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: