Possible to Ignore "Repaired" Mark on Shard Instance?

Greetings!

I’ve run into an issue where a tiny bit of data got corrupted on a shard and I had to repair it with mongod --repair. When starting the instance, it gives this error:

2020-08-10T14:33:31.890+0000 F  REPL     [initandlisten] This instance has been repaired and may contain modified replicated data that would not match other replica set members. To see your repaired data, start mongod without the --replSet option. When you are finished recovering your data and would like to perform a complete re-sync, please refer to the documentation here: https://docs.mongodb.com/manual/tutorial/resync-replica-set-member/
2020-08-10T14:33:31.890+0000 F  -        [initandlisten] Fatal Assertion 50923 at src/mongo/db/repl/replication_coordinator_impl.cpp 529
2020-08-10T14:33:31.890+0000 F  -        [initandlisten] 

***aborting after fassert() failure

Is there any way I can remove this “mark of uncleanliness” or somehow skip this check?

Unfortunately, I’m unable to go about this the correct way by resyncing a replica set member, because the replica set only consists of this single server. (Please don’t crucify me, I know this is not recommended, but the hardware/storage in our dev environment just can’t handle the doubling of I/O throughput from additional replicas.)

The possibility of small amounts of missing/changed data is of little concern to me since this isn’t production data, and there are tens of billions of documents in the cluster. I’d just like to get this one back to it’s friends so it can be happy again. :slight_smile:

Thanks!!

Coming back to answer this one myself. :slight_smile: The attribute in question is stored inside the local database under the system.replset collection.

  1. Start mongod on the sick shard without the --shardsvr and --replSet arguments
  2. Launch mongo and verify the name of the shard
> use local
> db.system.replset.find({}, {_id: true})
{ "_id" : "shard18"}
  1. Modify the repaired property to false
> db.system.replset.update({_id: "shard18"}, {$set: {repaired: false}})
WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })
  1. Restart mongod normally

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.