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

Document in the wrong shard.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 2.0.6
    • Fix Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Environment:
      Linux Ubuntu x86_64 GNU/Linux connected to from Perl code

    • Operating System:
      Linux

      Description

      documents getting put in the wrong chunk/shards.

      example.

      mongos> db.chunks.find(

      {"_id" :/listing_fields217_559606/}

      ,

      {"shard" :1,"max" :1,"min" :1}

      );
      { "id" : "homes_didx.listing_fields217_559606-hash_fk_id\"9c715a8c\"", "min" :

      { "hash_fk_id" : "9c715a8c" }

      , "max" : { "hash_fk_id" :

      { $maxKey : 1 }

      }, "shard" : "shard0000" }
      { "_id" : "homes_didx.listing_fields217_559606-hash_fk_id_MinKey", "min" : { "hash_fk_id" :

      { $minKey : 1 }

      }, "max" :

      { "hash_fk_id" : "9c715a8c" }

      , "shard" : "shard0001" }

      connecting directly to shard "shard0000"
      > db.listing_fields217_559606.find({},

      {fk_listing_id:1,hash_fk_id:1}

      );

      { "_id" : ObjectId("502cf2eb4a2ec3a9630004ef"), "hash_fk_id" : "df82643a", "fk_listing_id" : "57558495" } { "_id" : ObjectId("502cf2eb9b14704161000b07"), "hash_fk_id" : "d0a7226e", "fk_listing_id" : "49808274" } { "_id" : ObjectId("502cf2ec9e27f6c451000a21"), "hash_fk_id" : "9c715a8c", "fk_listing_id" : "50225871" } { "_id" : ObjectId("502cf2ecc8e9f12752000a5b"), "hash_fk_id" : "cba357e7", "fk_listing_id" : "60142564" } { "_id" : ObjectId("502cf2ec72c5698975000b7c"), "hash_fk_id" : "aee39eaf", "fk_listing_id" : "60229041" } { "_id" : ObjectId("502cf2ed9cbffc6562000731"), "hash_fk_id" : "b1ff0637", "fk_listing_id" : "60115293" } { "_id" : ObjectId("502cf2ed47202c0a620007fa"), "hash_fk_id" : "c92a3f44", "fk_listing_id" : "60115290" } { "_id" : ObjectId("502cf2ee4e1e7558750007b9"), "hash_fk_id" : "09fefa68", "fk_listing_id" : "60156237" } { "_id" : ObjectId("502cf2effbb5c34a52000883"), "hash_fk_id" : "e56dadbb", "fk_listing_id" : "60227778" } { "_id" : ObjectId("502cf2f116641ca851000af0"), "hash_fk_id" : "dece11d2", "fk_listing_id" : "60245783" } { "_id" : ObjectId("502cf2f124860e6652000923"), "hash_fk_id" : "ab485082", "fk_listing_id" : "60245784" } { "_id" : ObjectId("502cf2f4f1d370f150000cfa"), "hash_fk_id" : "da66478e", "fk_listing_id" : "60249679" }

      document

      { "_id" : ObjectId("502cf2ee4e1e7558750007b9"), "hash_fk_id" : "09fefa68", "fk_listing_id" : "60156237" }

      will not be returned by the router and is effectively lost.

      another example

      mongos> db.chunks.find(

      {"_id" :/listing_fields2002_558075/}

      ,

      {"shard" :1,"max" :1,"min" :1}

      );
      { "id" : "homes_didx.listing_fields2002_558075-hash_fk_id\"79aae84e\"", "min" :

      { "hash_fk_id" : "79aae84e" }

      , "max" : { "hash_fk_id" :

      { $maxKey : 1 }

      }, "shard" : "shard0000" }
      { "_id" : "homes_didx.listing_fields2002_558075-hash_fk_id_MinKey", "min" : { "hash_fk_id" :

      { $minKey : 1 }

      }, "max" :

      { "hash_fk_id" : "79aae84e" }

      , "shard" : "shard0001" }

      again on shard0000
      > db.listing_fields2002_558075.find({},

      {hash_fk_id:1}

      );

      { "_id" : ObjectId("502c25a6b0e521034400182c"), "hash_fk_id" : "a644d3b6" } { "_id" : ObjectId("502c25a69dac33355300192e"), "hash_fk_id" : "da0b5d5f" } { "_id" : ObjectId("502c25a74a52eb911a001904"), "hash_fk_id" : "8e99b228" } { "_id" : ObjectId("502c25a7060c531e52001d54"), "hash_fk_id" : "79aae84e" } { "_id" : ObjectId("502c25a87100fffd52001729"), "hash_fk_id" : "426a4c58" } { "_id" : ObjectId("502c25a966efa23943001f88"), "hash_fk_id" : "fdfd2540" } { "_id" : ObjectId("502c25aa81b3e55e19001c3d"), "hash_fk_id" : "8e2a987c" } { "_id" : ObjectId("502c25aab39a049b52001ca9"), "hash_fk_id" : "7b8cfd62" } { "_id" : ObjectId("502c25aa350b025a43001b0f"), "hash_fk_id" : "bbbb5771" } { "_id" : ObjectId("502c25aaa2b66cfb19001951"), "hash_fk_id" : "9fbf4b04" } { "_id" : ObjectId("502c25aa7c1d19001e00056d"), "hash_fk_id" : "966bb669" } { "_id" : ObjectId("502c25abfee20d0919001aeb"), "hash_fk_id" : "97ea1fa9" }

      document

      { "_id" : ObjectId("502c25a87100fffd52001729"), "hash_fk_id" : "426a4c58" }

      will not be returned by the router and is effectively lost.

      Let me know what additional information I can provide.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              spencer Spencer Brody (Inactive)
              Reporter:
              robert.jobson@dominionenterprises.com Robert Jobson
              Participants:
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: