diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-03-22 21:47:03 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-03-22 21:47:03 -0400 |
commit | 19658410941569bb9df4407d136d556ea2f8e908 (patch) | |
tree | df8ee0d97074691a62acd7968f792d04599581ae | |
parent | f6ea3d75f4576c007553d53f5bb9496e6b0c6f19 (diff) | |
download | mongo-19658410941569bb9df4407d136d556ea2f8e908.tar.gz |
bg index progress meter SERVER-809
-rw-r--r-- | db/pdfile.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/db/pdfile.cpp b/db/pdfile.cpp index d2ecd91ef31..e77caa3dd0f 100644 --- a/db/pdfile.cpp +++ b/db/pdfile.cpp @@ -1093,6 +1093,8 @@ namespace mongo { bool dupsAllowed = !idx.unique(); bool dropDups = idx.dropDups(); + ProgressMeter& progress = cc().curop()->setMessage( "bg index build" , d->nrecords ); + unsigned long long n = 0; auto_ptr<ClientCursor> cc; { @@ -1131,13 +1133,15 @@ namespace mongo { } } n++; + progress.hit(); if ( n % 128 == 0 && !cc->yield() ) { cc.release(); uasserted(12584, "cursor gone during bg index"); break; } - }; + } + progress.done(); return n; } |