What does "replica set ghost target no good" mean?

956 views
Skip to first unread message

jdmerth

unread,
Aug 2, 2012, 10:45:53 AM8/2/12
to mongod...@googlegroups.com
I've got a replica set that is not syncing with the other members. In the logs I see "replica set ghost target no good". What does this mean and how do I trouble-shoot it?

Thanks!

Jeremy Mikola

unread,
Aug 3, 2012, 11:42:42 AM8/3/12
to mongod...@googlegroups.com
On Thursday, August 2, 2012 10:45:53 AM UTC-4, jdmerth wrote:
I've got a replica set that is not syncing with the other members. In the logs I see "replica set ghost target no good". What does this mean and how do I trouble-shoot it?

I traced the log message to https://github.com/mongodb/mongo/blob/master/src/mongo/db/repl/rs_sync.cpp#L724, which includes the following comment:

We are currently syncing from someone who's syncing from us. The target might end up with a new member, but s.slave never changes so we'll compare the names

The ghost sync is a special connection that a secondary (S1) would open on a primary (P) on behalf of another secondary (S2), which is currently sync from S1. This allows P to track how far behind S2 may be. What we're seeing here is an edge case where two secondaries end up syncing from each other. That may happen from time to time, although it should resolve itself naturally.

There was an obscure bug in 2.0 (since fixed for the upcoming 2.2 release), where the replica set could get stuck in that state; however, the only way to know for sure would be to examine logs from each node leading up to this point.

The easiest way to rectify this issue would be to simply restart one of the secondary nodes, which will reset the sync targets. 
Reply all
Reply to author
Forward
0 new messages