[SERVER-7000] addTagRange doesn't work with embedded shard key Created: 10/Sep/12  Updated: 15/Feb/13  Resolved: 10/Sep/12

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 2.2.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Asya Kamsky Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-6999 Embedded "dot-notation" fields broken... Closed
Operating System: ALL
Participants:

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



 Comments   
Comment by Scott Hernandez (Inactive) [ 10/Sep/12 ]

dups SERVER-6999

Generated at Thu Feb 08 03:13:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.