Relative Content

Tag Archive for mongodb

How to store multiple choice questions in MongoDB

I have several hundred multiple-choice questions and answers covering a wide range of technologies and competencies. And the number might reach thousands. The concept is that when a user selects a certain technology or ability, questions relevant to that skill should be displayed on the screen along with the user’s selections. Which is a better way to store the data, in MongoDB or an RDBMS?

How to remove a mongos router completely from a sharding cluster

After removing a mongos instance by force, I noticed that its information remains in the config.mongos collection. After a throughout search I found NO useful documentation explaining how to remove a mongos instance. The only option left is to manually remove that data like this:

When I execute mongod at datadb this happend i have already set –replSet rs0 just before it

{“t”:{“$date”:”2024-07-09T23:02:29.002+05:30″},”s”:”W”, “c”:”QUERY”, “id”:23799, “ctx”:”ftdc”,”msg”:”Aggregate command executor error”,”attr”:{“error”:{“code”:26,”codeName”:”NamespaceNotFound”,”errmsg”:”Unable to retrieve storageStats in $collStats stage :: caused by :: Collection [local.oplog.rs] not found.”},”stats”:{},”cmd”:{“aggregate”:”oplog.rs”,”cursor”:{},”pipeline”:[{“$collStats”:{“storageStats”:{“waitForLock”:false,”numericOnly”:true}}}],”$db”:”local”}}}
{“t”:{“$date”:”2024-07-09T23:02:30.003+05:30″},”s”:”W”, “c”:”QUERY”, “id”:23799, “ctx”:”ftdc”,”msg”:”Aggregate command executor error”,”attr”:{“error”:{“code”:26,”codeName”:”NamespaceNotFound”,”errmsg”:”Unable to retrieve storageStats in $collStats stage :: caused by :: Collection [local.oplog.rs] not found.”},”stats”:{},”cmd”:{“aggregate”:”oplog.rs”,”cursor”:{},”pipeline”:[{“$collStats”:{“storageStats”:{“waitForLock”:false,”numericOnly”:true}}}],”$db”:”local”}}}
{“t”:{“$date”:”2024-07-09T23:02:30.737+05:30″},”s”:”I”, “c”:”SHARDING”, “id”:7012500, “ctx”:”QueryAnalysisConfigurationsRefresher”,”msg”:”Failed to refresh query analysis configurations, will try again at the next interval”,”attr”:{“error”:”PrimarySteppedDown: No primary exists currently”}}
{“t”:{“$date”:”2024-07-09T23:02:31.003+05:30″},”s”:”W”, “c”:”QUERY”, “id”:23799, “ctx”:”ftdc”,”msg”:”Aggregate command executor error”,”attr”:{“error”:{“code”:26,”codeName”:”NamespaceNotFound”,”errmsg”:”Unable to retrieve storageStats in $collStats stage :: caused by :: Collection [local.oplog.rs] not found.”},”stats”:{},”cmd”:{“aggregate”:”oplog.rs”,”cursor”:{},”pipeline”:[{“$collStats”:{“storageStats”:{“waitForLock”:false,”numericOnly”:true}}}],”$db”:”local”}}}
{“t”:{“$date”:”2024-07-09T23:02:31.741+05:30″},”s”:”I”, “c”:”-“, “id”:4939300, “ctx”:”monitoring-keys-for-HMAC”,”msg”:”Failed to refresh key cache”,”attr”:{“error”:”ReadConcernMajorityNotAvailableYet: Read concern majority reads are currently not possible.”,”nextWakeupMillis”:3000}}