Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6970931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:46:23+00:00 2026-05-27T16:46:23+00:00

MongoDB’s db.printShardingStatus command, when run from a mongos process, prints some json corresponding to

  • 0

MongoDB’s db.printShardingStatus command, when run from a mongos process, prints some json corresponding to the current state of accessible partitioned databases.

e.g.

--- Sharding Status --- 
  sharding version: { "_id" : 1, "version" : 3 }

  shards:
{  "_id" : "rs_a",  "host" : "rs_a/host1:27018,host2:27018" }
{  "_id" : "rs_b",  "host" : "rs_b/host3:27018,host4:27018" }
  databases:
{  "_id" : "admin",  "partitioned" : false,  "primary" : "config" }
{  "_id" : "test",  "partitioned" : false,  "primary" : "rs_a" }
{  "_id" : "users",  "partitioned" : true,  "primary" : "rs_a" }
        database.Coll chunks:
                        rs_b    4
                        rs_a    6
                    { "scope" : { $minKey : 1 } } -->> { "scope" : "0014669e-d4b0-45e8-b4ee-0f5de07f86d5" } on : rs_b { "t" : 2000, "i" : 0 }
                    { "scope" : "0014669e-d4b0-45e8-b4ee-0f5de07f86d5" } -->> { "scope" : "02726c5a-5f2c-4d6e-b124-b258aabcd3a0" } on : rs_b { "t" : 3000, "i" : 0 }
                    { "scope" : "02726c5a-5f2c-4d6e-b124-b258aabcd3a0" } -->> { "scope" : "0275fb19-7cec-4dfc-9150-97ceab4f23b5" } on : rs_b { "t" : 4000, "i" : 0 }
                    { "scope" : "0275fb19-7cec-4dfc-9150-97ceab4f23b5" } -->> { "scope" : "0847aae5-c41b-4470-8a9f-de90f2cb2c1e" } on : rs_b { "t" : 5000, "i" : 0 }
                    { "scope" : "0847aae5-c41b-4470-8a9f-de90f2cb2c1e" } -->> { "scope" : "084e756f-c4b0-4569-bb1e-37d7220b30c9" } on : rs_a { "t" : 5000, "i" : 1 }
                    { "scope" : "084e756f-c4b0-4569-bb1e-37d7220b30c9" } -->> { "scope" : "0894dd26-6b6f-4382-bdbd-d05199e913b9" } on : rs_a { "t" : 1000, "i" : 13 }
                    { "scope" : "0894dd26-6b6f-4382-bdbd-d05199e913b9" } -->> { "scope" : "08d0ffcb-c273-4bb7-8951-5f19e95b2fe4" } on : rs_a { "t" : 5000, "i" : 2 }
                    { "scope" : "08d0ffcb-c273-4bb7-8951-5f19e95b2fe4" } -->> { "scope" : "102282f1-9049-4a47-ac06-07d62399dd60" } on : rs_a { "t" : 5000, "i" : 4 }
                    { "scope" : "102282f1-9049-4a47-ac06-07d62399dd60" } -->> { "scope" : "ffe9ada1-367d-4358-ac98-d21a7194ee5f" } on : rs_a { "t" : 5000, "i" : 5 }
                    { "scope" : "ffe9ada1-367d-4358-ac98-d21a7194ee5f" } -->> { "scope" : { $maxKey : 1 } } on : rs_a { "t" : 1000, "i" : 4 }

I’m specifically curious about what the { "t" : 5000, "i" : 4 } values mean for each chunk. I cannot find any official documentation.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:46:23+00:00Added an answer on May 27, 2026 at 4:46 pm

    The “t” and “i” values are the major and minor version of the chunk. “t” gets increased if the chunk is moved manually or by the balancer. At that point “i” will be reset to “0”. “i” will be increased if the chunk is split.

    The fact that your “t” is a timestamp like value is probably MongoDB trying to give it a value that it knows is functionally correct (max across cluster). I’ve never seen such a value for “t” in production environments. (EDIT <– speculation)

    By popular request the relevant bits of code in the server and complete explanation of why it looks the way it looks :

    https://github.com/mongodb/mongo/blob/master/s/util.h (ShardChunkVersion)
    https://github.com/mongodb/mongo/blob/master/s/d_split.cpp (line 709 onwards)
    https://github.com/mongodb/mongo/blob/master/s/d_migrate.cpp (line 963 onwards)

    Major and minor versions are integers. “t” looks like it’s converted to/pushed in as a timestamp on output hence the multiplication by 1000 (https://github.com/mongodb/mongo/blob/master/bson/bsonelement.h line 357)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I set up MongoDB so it can run as a Windows service?
MongoDB's shell extends SpiderMonkey. Is there a way to hook into some of SpiderMonkey's
mongodb version v1.8.0 on Mac 10.6.8. I'm trying to run a mongoimport on a
MongoDB does provide a compact command to free deleted space on a single collection,
The MongoDB shell prints binary data as a Base64-encoded string wrapped in what looks
This is from MongoDB docs : db.factories.insert( { name: xyz, metro: { city: New
Simple mongodb collection which stores sent emails: { msgid: objectid senderid: <some objectid>, sendername:
From MongoDB The Definitive Guide: Documents larger than 4MB (when converted to BSON) cannot
I have a MongoDB query that's taking an unreasonably long time to run, but
Using MongoDB I'm trying to copy a database from one server to another. My

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.