Hi Scott,
Thanks for reply. Yes, Disk is very active.
That collection has around 220 million documents. I want to maintain
20 million documents after conversion to capped one.
Is it better to use "remove" command to remove remaining documents and
then using "convertToCapped" command?
I am worrying about replication errors (RS102 stale error) at
secondary node when we use remove command to remove lot of documents
at primary node.
-Kumar
On May 10, 10:50 pm, Scott Hernandez <
scotthernan...@gmail.com> wrote:
> The command has to allocate and then copy all of the documents so you
> are probably just seeing that behavior.
>
> Is the disk very active also?
>
>
>
>
>
>
>
> On Thu, May 10, 2012 at 10:07 AM, kumar <
kumar.a...@gmail.com> wrote:
>
> > Hi All,
>
> > I prepare a replica set. In our mongo database, onecollectionis
> > available that has around 39GB storage space.
>
> > I executed "convertToCapped" command at primary node to covert that
> >collectionascappedone of 3.61GB size.
>
> > That command has takenmorethan 28 hours. Still, it is getting
> > executed. Primary node istakingaround 100% CPU spike due to that
> > command.
>
> > Is there anyway to convert tocappedcollectionwith in less execution