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

addTagRange doesn't work with embedded shard key

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.2.0
    • Component/s: Sharding
    • None
    • ALL

      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).

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

              Created:
              Updated:
              Resolved: