Question : I have a database db on mongodb server s0 with collection coll which is not sharded. To shard […]
Category: MongoDB
What is a good practice for storing unstructured tables as a field in mongodb
Question : Context: I am developing an application that requires handling tables that do not necessarily have an uniform structure […]
Is it possible to restore mongodb after db.dropDatabase() by replacing the contents of folder /data/db with older backup?
Question : In order to reset replication, I did drop the local mongo database using the following commands: use local; […]
MongoDB in ReplicaSet databases showing different sizes and objects
Question : I have a MongoDB in a ReplicaSet with 3 members, and last week the primary node got corrupted […]
Stale monitoring errors?
Question : After setting a cluster with 3 shards, 3 config server with 2 mongos. I see these errors in […]
Unable to add collumn in mongo
Question : Something strange in this neighbourhood. Calling DBA’s and ! GB db.getCollection(‘contacts’).update({}, {$set: {“source”: “domain.txt”}},false,true); It failed with: admin> […]
getIndexes is not a function on mongo shell
Question : I’m trying to get the index of a collection. > db.version() 3.2.6 > db.getCollectionNames() [ “last_aggregated_stat_ids”, “mapps”, “stats”, […]
Mongo large chunks will not split
Question : I had a 3 shard set up, and ran out of capacity, so I added 3 more shards. […]
Must data be evenly distributed among Mongo shards?
Question : According to this article: https://www.mongodb.com/blog/post/on-selecting-a-shard-key-for-mongodb. Assuming I have my schema as: { time_posted: …, userid: …, content: … […]
Start mongod instance on replica set as background job
Question : I have setup a Mongodb replica set with 1 secondary node. When i execute on secondary sudo mongod […]