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

addTagRange doesn't work with embedded shard key

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • 2.2.0
    • None
    • Sharding
    • None
    • ALL

    Description

      If the shard key is defined on an embedded field there is no way to call
      sh.addTagRange on that shard key.

      My example was tweets sharded on "user.screen_name", created_at:
      twitter.tweets2 chunks:
      shard0001 1
      { "user.screen_name" :

      { $minKey : 1 }

      , "created_at" :

      { $minKey : 1 }

      } -->> { "user.screen_name" :

      { $maxKey : 1 }

      , "created_at" :

      { $maxKey : 1 }

      } on : shard0001 Timestamp(1000, 0)

      Trying to addTagRange basically always gave:

      sh.addTagRange("twitter.tweets2",

      {"user.screen_name":"A"}

      ,

      {"user.screen_name":"z"}

      , "data")
      Mon Sep 10 14:30:38 uncaught exception: can't have . in field names [user.screen_name]

      Trying to specify it as {"user":{screen_name:value}} is accepted but it doesn't have any effect (presumably it doesn't match the actual shard key).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              asya.kamsky@mongodb.com Asya Kamsky
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: