summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristina <kristina@10gen.com>2011-09-19 13:29:37 -0400
committerEliot Horowitz <eliot@10gen.com>2011-09-29 23:18:35 -0400
commitfec06cfe915a53e5e53cd2b8e114c99814fbe436 (patch)
tree57b2f4caf33a52308f7ffb889ca698bfcc4bc45c
parent47360db9e89f2b80a2da904181e1397e3033e4ab (diff)
downloadmongo-fec06cfe915a53e5e53cd2b8e114c99814fbe436.tar.gz
upgrade indexes on resync SERVER-3900
-rw-r--r--db/cloner.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/db/cloner.cpp b/db/cloner.cpp
index 8956133daa3..f13ea528c05 100644
--- a/db/cloner.cpp
+++ b/db/cloner.cpp
@@ -83,6 +83,12 @@ namespace mongo {
BSONElement e = i.next();
if ( e.eoo() )
break;
+
+ // for now, skip the "v" field so that v:0 indexes will be upgraded to v:1
+ if ( string("v") == e.fieldName() ) {
+ continue;
+ }
+
if ( string("ns") == e.fieldName() ) {
uassert( 10024 , "bad ns field for index during dbcopy", e.type() == String);
const char *p = strchr(e.valuestr(), '.');