> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> 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.
>
>
Thanks Kyle, our database is large, and repair will cost a lot of time.
What about dumping the data, and restore back?
1. dump data
2. drop collection
3. restore
4. create index
Will this solve the issue?
-- 8< --
--
Cheers
Feifei Jia
On Wed, Apr 27, 2011 at 10:34:15AM -0400, Kyle Banker wrote:Thanks Kyle, our database is large, and repair will cost a lot of time.
> Can you reproduce the error in the mongod log by querying the
> secondary? Or does this happen when querying the primary. If it's it
> secondary, then that's probably where the corruption lies. But if all
> of your nodes crashes, then you may have corruption on all of them. In
> that case, it may be best to run a database repair on the primary and
> then resync the secondaries. This will require downtime. Is that an
> option?
What about dumping the data, and restore back?
1. dump data
2. drop collection
3. restore
4. create index
Will this solve the issue?
Yes, it happened in all replicas.
> There is a mongodump repair option in recent versions but it locks, just
> like the global repair.
So we cannot use that feature now?
>
> On Wed, Apr 27, 2011 at 9:45 PM, Feifei Jia <feif...@gmail.com> wrote:
>
> > On Wed, Apr 27, 2011 at 10:34:15AM -0400, Kyle Banker wrote:
> > > Can you reproduce the error in the mongod log by querying the
> > > secondary? Or does this happen when querying the primary. If it's it
> > > secondary, then that's probably where the corruption lies. But if all
> > > of your nodes crashes, then you may have corruption on all of them. In
> > > that case, it may be best to run a database repair on the primary and
> > > then resync the secondaries. This will require downtime. Is that an
> > > option?
> >
> > Thanks Kyle, our database is large, and repair will cost a lot of time.
> > What about dumping the data, and restore back?
> >
> > 1. dump data
> > 2. drop collection
> > 3. restore
> > 4. create index
> >
>
> It depends on the scope of the corruption. Do you have a good idea of that?
We believe that only one collection corrupts.
>
> >
> > Will this solve the issue?
> >
>
> It is hard to say without the answers from the questions.
Do you think the problem is related to index? I'm not use remove() or
drop() to delete the collection.
Thanks in advance.
So reIndex() will not propagate to secondary nodes? Is it OK to run
reIndex() on secondary nodes (since primary has already re-create
index)?
On Thu, Apr 28, 2011 at 10:58:19AM -0400, Kyle Banker wrote:
> Yes. Drop and recreate is equivalent, and that will propagate to
> secondary nodes.
So reIndex() will not propagate to secondary nodes? Is it OK to run
reIndex() on secondary nodes (since primary has already re-create
index)?
First, we tried to run reIndex in secondary node, only to find the index was
dropped, but cannot be created again:
set1:SECONDARY> db.foo.reIndex()
{
"nIndexesWas" : 24,
"msg" : "indexes dropped for collection",
"errmsg" : "exception: no index name specified",
"code" : 12523,
"ok" : 0
}
-- 8< --
Does this indicate that user should not run reIndex on secondary nodes?
--
Cheers
Feifei Jia