[SERVER-1755] reIndex doesn't propogate correctly on replica sets Created: 08/Sep/10  Updated: 12/Jul/16  Resolved: 08/Sep/10

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 1.6.0, 1.6.1, 1.6.2
Fix Version/s: 1.6.3, 1.7.0

Type: Bug Priority: Major - P3
Reporter: Swen Thümmler Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Comments   
Comment by auto [ 15/Sep/10 ]

Author:

{'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: test for SERVER-1755
http://github.com/mongodb/mongo/commit/53c38f0c8ccadae8c8612baf792f4ebea3b435f8

Comment by auto [ 08/Sep/10 ]

Author:

{'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: test for SERVER-1755
http://github.com/mongodb/mongo/commit/81ea67e1fd67559f95ad7808f8434448a11acaa2

Comment by Eliot Horowitz (Inactive) [ 08/Sep/10 ]

this is already fixed in 1.7.0
Will see if the fix can get backported.

Comment by Swen Thümmler [ 08/Sep/10 ]

db version v1.6.2, pdfile version 4.5
git hash: aef371ecf5d2a824f16ccdc3b745f3702165602f
sys info: Linux domU-12-31-39-06-79-A1 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_41

master:
> db.foo.save({_id:1, _o:2})
> db.foo.ensureIndex({_o:1})
slave:
> db.foo.getIndexes()
[
{
"name" : "id",
"ns" : "test.foo",
"key" :

{ "_id" : 1 }


},
{
"_id" : ObjectId("4c8790ce2ee529bbe28fbe59"),
"ns" : "test.foo",
"key" :

{ "_o" : 1 }

,
"name" : "_o_1"
}
]
master:
> db.foo.reIndex()
{
"nIndexesWas" : 2,
"msg" : "indexes dropped for collection",
"ok" : 1,
"nIndexes" : 2,
"indexes" : [
{
"name" : "id",
"ns" : "test.foo",
"key" :

{ "_id" : 1 }


},
{
"_id" : ObjectId("4c8790ce2ee529bbe28fbe59"),
"ns" : "test.foo",
"key" :

{ "_o" : 1 }

,
"name" : "_o_1"
}
],
"ok" : 1
}
slave:
> db.foo.getIndexes()
[ ]

master log:
Wed Sep 8 15:33:55 [conn4410] building new index on

{ _id: 1 }

for test.foo
Wed Sep 8 15:33:55 [conn4410] Buildindex test.foo idxNo:0 { name: "id", ns: "test.foo", key:

{ _id: 1 }

}
Wed Sep 8 15:33:55 [conn4410] done for 0 records 0secs
Wed Sep 8 15:34:06 [conn4410] building new index on

{ _o: 1.0 }

for test.foo
Wed Sep 8 15:34:06 [conn4410] Buildindex test.foo idxNo:1 { _id: ObjectId('4c8790ce2ee529bbe28fbe59'), ns: "test.foo", key:

{ _o: 1.0 }

, name: "_o_1" }
Wed Sep 8 15:34:06 [conn4410] done for 1 records 0.024secs
Wed Sep 8 15:35:19 [conn4410] CMD: reIndex test.foo
Wed Sep 8 15:35:19 [conn4410] building new index on

{ _id: 1 }

for test.foo
Wed Sep 8 15:35:19 [conn4410] Buildindex test.foo idxNo:0 { name: "id", ns: "test.foo", key:

{ _id: 1 }

}
Wed Sep 8 15:35:19 [conn4410] done for 1 records 0secs
Wed Sep 8 15:35:19 [conn4410] building new index on

{ _o: 1.0 }

for test.foo
Wed Sep 8 15:35:19 [conn4410] Buildindex test.foo idxNo:1 { _id: ObjectId('4c8790ce2ee529bbe28fbe59'), ns: "test.foo", key:

{ _o: 1.0 }

, name: "_o_1" }
Wed Sep 8 15:35:19 [conn4410] done for 1 records 0secs

slave log:
Wed Sep 8 15:33:55 [rs_sync] building new index on

{ _id: 1 }

for test.foo
Wed Sep 8 15:33:55 [rs_sync] Buildindex test.foo idxNo:0 { name: "id", ns: "test.foo", key:

{ _id: 1 }

}
Wed Sep 8 15:33:55 [rs_sync] done for 0 records 0secs
Wed Sep 8 15:34:06 [rs_sync] building new index on

{ _o: 1.0 }

for test.foo
Wed Sep 8 15:34:06 [rs_sync] Buildindex test.foo idxNo:1 { _id: ObjectId('4c8790ce2ee529bbe28fbe59'), ns: "test.foo", key:

{ _o: 1.0 }

, name: "_o_1" }
Wed Sep 8 15:34:06 [rs_sync] done for 1 records 0secs
Wed Sep 8 15:34:22 [initandlisten] connection accepted from 10.228.113.45:38438 #3330
Wed Sep 8 15:35:19 [rs_sync] CMD: reIndex test.foo

Generated at Thu Feb 08 02:57:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.