Well, you can get where the chunks are and the ranges for the keys from the config servers directly, however I guess you've seen this already. I would think you can do this with mongosniff for each of the shards, however it's a little hacky.
However, if your queries modify data, if would suggest reading it back directly from each replica set looking for a match - this would be really easy. Once you know which shard it hit you can work out the exact chunk from the config server data.
Russ
Rainforest |
+1-650-919-3216 |
rainforestqa.com
On Oct 4, 2012, at 11:04 PM, Mainak Ghosh <
famous...@gmail.com> wrote:
> Hi,
>
> I am currently working on a problem in MongoDB for which I need to identify, for a set of automatically generated queries, which shard, chunk is getting hit (or the mongos is fetching the data from which of them). I have deployed MongoDB with 3 replica sets. I checked the log files but could not find any relevant information. It is possible I have not looked at all the files though. Is there some strategy that anybody can help me with which does not require a change in source code? In case there is none, then can you suggest me some code changes that may help.
>
> Thanks and Regards,
> Mainak.
>
> --
> You received this message because you are subscribed to the Google
> Groups "mongodb-user" group.
> To post to this group, send email to
mongod...@googlegroups.com
> To unsubscribe from this group, send email to
>
mongodb-user...@googlegroups.com
> See also the IRC channel --
freenode.net#mongodb