Hi Adam
On Mon, May 14, 2012 at 1:26 PM, Adam C <
ad...@10gen.com> wrote:
> If you run the compact command on a replica set secondary, the secondary
> will automatically demote itself to a "recovery" state until the compaction
> is complete. Since your compaction is failing, I think that is why it never
> comes back out of the state.
Yes, but it looks like a bug?
> Why are you running a compact on the secondary, is there something wrong?
I wanted to test the compact command on a test replica set of 3 nodes.
When i ran the command on the master i have this output:
PRIMARY> db.test.runCommand( "compact")
{
"errmsg" : "will not run compact on an active replica set primary as
this is a slow blocking operation. use force:true to force",
"ok" : 0
}
That's why i ran it on a secondary, as the error message suggest not
to run this command on a primary
>
> The assertion you are seeing suggests that it is expecting a particular
> namespace but failing to find it. If that's the case, then it sounds like
> this secondary might not be very healthy. Can you resync it from the
> master? That would actually defrag your data similar to a compaction
> anyway.
The secondary is healthy.
as i said, i only want to test the compact command, and noticed that
if by mistake i run it on a collection that doesn't exists (i
copy/paste the example in the doc without checking), then the entire
node will switch to recorery mode forever (until i restart the
process).
This is a simple bug to reproduce:
- create a replica set on 3 nodes
- log on the secondary with mongo cli
- execute db.mycollection.runCommand( "compact")
> --
> You received this message because you are subscribed to the Google Groups
> "mongodb-user" group.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/mongodb-user/-/uBlwJTlZP6oJ.
>
> To post to this group, send email to
mongod...@googlegroups.com.
> To unsubscribe from this group, send email to
>
mongodb-user...@googlegroups.com.
> For more options, visit this group at
>
http://groups.google.com/group/mongodb-user?hl=en.