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 7398451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T03:52:16+00:00 2026-05-29T03:52:16+00:00

This question has two aspects, both related to indices. I have a dataset with

  • 0

This question has two aspects, both related to indices.

I have a dataset with 530 million entries, each entry has an array of 10 elements. I am using a single mongod. I am constructing an index on the array post-bulk-insert. The array has two key-value pairs of type string – int.

I have already deduced/researched that putting up the index before construction is what mongodb is designed for and such large datasets cannot be (post-insert) indexed without a massive amount of ram/swappable-virtual-memory.

one: phases of index construction

What are the phases of index construction, I was looking at the log and saw it go up once from 0 to 100%, only to begin counting once it reached 100% (something to do with sorting ? ?). The second phase was MUCH slower then the first. Are there any more passes that need to be done ?

two: Index state

I wasn’t going to watch the index construction at this rate, and I have an indexed dataset as a backup(which I can’t trust anymore, keep reading). So, I kill -9'd the process. I started the process again, and the logs show the database acknowledging that a index build operation was in progress and ended incorrectly, but nothing beyond this. The index shows up in the db.<db-name>.getIndexes() list.

I find this VERY odd especially the getIndexes bit, I know for a fact that index construction in this case never ended, and now I can’t trust the backups I have in which I believe indexing ended ok.

I at least expect a database platform to be in a consistent state, or to get to one before it passes me control. So, either rollback the index construction,finish it, or refuse to start without a recovery operation.

So how do I find out if my database is in a consistant state, specifically the indices ?

  • 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-29T03:52:17+00:00Added an answer on May 29, 2026 at 3:52 am

    So how do I find out if my database is in a consistant state, specifically the indices ?

    For this, there is a validate command. The command is a blocking command, like repair, but it looks like it has a few options.

    So, either rollback the index construction,finish it, or refuse to start without a recovery operation.

    Agreed. And the logs should be crystal clear about the state when the DB when it is restarted. However, MongoDB is definitely not “there” yet.

    The second phase was MUCH slower then the first. Are there any more passes that need to be done ?

    Indeed, once it is done the second phase, the DB then locks and performs a giant fsync as it flushes the newly created index to the disk. It was probably here when you killed it.

    The last time I watched this process happen, there was no log message during the fsync. Given the size of your data, this will represent gigs and gigs of data flushing to the disk. Run some math on the speed of your drives vs. the index, but this phase could definitely represent a lot of waiting time.

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

Sidebar

Related Questions

This question has two parts: #1 I have a functions.php that is filled with
my question has two parts, but they are related. Firstly - I have Contenteditable
This question has been discussed in two blog posts ( http://dow.ngra.de/2008/10/27/when-systemcurrenttimemillis-is-too-slow/ , http://dow.ngra.de/2008/10/28/what-do-we-really-know-about-non-blocking-concurrency-in-java/ ),
This question has been asked before ( link ) but I have slightly different
This question actually has two parts. The first part: I've been developing my first
I know this question has been asked many times and we have gotten this
This question has two parts. First, I need to isolate two strings of text
Has anyone used JustCode from Telerik lately? This question has been asked about two
I know this question has been asked multiple number of times and i have
Okay, two admissions here, one is I'm sure this question has been answered and

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.