Track progress of mongodb index build progress

826 views
Skip to first unread message

VISHAL KUMAWAT

unread,
Oct 27, 2016, 8:47:36 AM10/27/16
to mongodb-user
Hi, 

I am creating an index on large data set. In UI, I want to show the overall  progress of this operation. But the progress field in db.currentOP() shows its internal step progress rather than overall progress. 
I see following progress field for my operation in sequence

1)
"msg" : "Index Build Index Build: 9532511/10000711 95%",
 "progress" : {
         "done" : 9532511,
         "total" : 10000711
 },


2) 
   "waitingForLock" : false,
"msg" : "Index Bulk Build: (2/3) btree bottom up Index: (2/3) BTree Bottom Up Progress: 3040657/10000711 30%",
"progress" : {
        "done" : 3040657,
        "total" : 10000711
}


Progress was first 90% then it changes to 30%. The message field is different now which correspond to its internal step.
 Can I get overall progress of build index operation rather than its particular internal step ? 

Regards,
Vishal

Kevin Adistambha

unread,
Nov 7, 2016, 10:30:59 PM11/7/16
to mongodb-user

Hi Vishal

Can I get overall progress of build index operation rather than its particular internal step ?

You are correct that the db.currentOp() command will show the two steps during an index build. However, currently there is no method that overrides this behaviour and present a single number. My quick testing shows, however, that the second step you saw (btree building) is relatively quicker compared to the first step. Is there any reason why you don’t want to see the second index build step?

Best regards,
Kevin

Reply all
Reply to author
Forward
0 new messages