Meaning of db.printShardingStatus()

106 views
Skip to first unread message

David M

unread,
Aug 28, 2010, 12:00:38 PM8/28/10
to mongodb-user
I'm running some shard tests and wondered what some of the output of
the printShardingStatus() command means. E.g.

sd.processes chunks:
{ "accId" : { $minKey : 1 }, "sId" : { $minKey : 1 } } -->>
{ "accId" : 1, "sId" : 1 } on : shard1 { "t" : 2000, "i" : 0 }
{ "accId" : 1, "sId" : 1 } -->> { "accId" : 1, "sId" : 4 } on :
shard1 { "t" : 3000, "i" : 0 }
{ "accId" : 1, "sId" : 4 } -->> { "accId" : 1, "sId" : 10 } on :
shard1 { "t" : 4000, "i" : 0 }
{ "accId" : 1, "sId" : 10 } -->> { "accId" : 1, "sId" : 14 } on :
shard1 { "t" : 5000, "i" : 0 }
{ "accId" : 1, "sId" : 14 } -->> { "accId" : 1, "sId" : 19 } on :
shard1 { "t" : 6000, "i" : 0 }
{ "accId" : 1, "sId" : 19 } -->> { "accId" : 1, "sId" : 23 } on :
shard2 { "t" : 2000, "i" : 34 }
{ "accId" : 1, "sId" : 23 } -->> { "accId" : 1, "sId" : 28 } on :
shard2 { "t" : 2000, "i" : 35 }
{ "accId" : 1, "sId" : 28 } -->> { "accId" : 1, "sId" : 34 } on :
shard2 { "t" : 2000, "i" : 36 }
{ "accId" : 1, "sId" : 34 } -->> { "accId" : 1, "sId" : 40 } on :
shard2 { "t" : 6000, "i" : 1 }
{ "accId" : 1, "sId" : 40 } -->> { "accId" : { $maxKey : 1 },
"sId" : { $maxKey : 1 } } on : shard2 { "t" : 2000, "i" : 10 }

1) What are 2 fields "t" and "i" in { "t" : 2000, "i" : 34 }

2) What does "accId" : { $maxKey : 1 } mean? The "highest" key will be
on shard2 ?

Thanks.

Eliot Horowitz

unread,
Aug 28, 2010, 12:09:07 PM8/28/10
to mongod...@googlegroups.com
1) t, i are just part of the version number. You can think of t as
the major number, i as the minor number. t gets incremented for
migrates (i goes to 0), i gets incremented for splits.

2) yes. $maxKey is basically infinity.

> --
> 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.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages