Tag Info

New answers tagged

0

No, MongoDB does not support two-way synchronization. It has master-slave replication, where all writes must occur on the master node before being replicated to the slave nodes. You can read about all the replication capabilities of MongoDB in their documentation.


0

At present ( meaning as of writing ) there really isn't an actual "official release date" for MongoDB 3.0 or is there "really" an official source for the repository of binary builds for any platform. Results vary for each distribution, but in this case you are probably best following the official documentation links and changing the version in the required ...


2

Since there is already and answer submitted, and a useful and valid one at that, I do not want to distract from it's own usefulness but there are indeed points to raise that go way beyond just a short comment. So consider this "augmentation", which is hopefully valid but primarily in addition to what has already been said. The truth is to really consider ...


2

Since best practice also suggest that "The appropriate number of mongos processes will depend on the nature of the application and deployment" I started to wonder whether our usage of mongos actually appropriate I think this is a question that ultimately only you can answer, as the documentation refers to. One of the recommended strategies is to ...


0

Not until Mongo releases a query language, like Cassandra has, no, there will not be such a role. Until then all access will have to be via API calls from within an existing language such as Java. There will be Mongo adminsitrator roles, of course, but that's a little different.


1

Compound indexes are great for static values Flip the WHERE components so that static values are first db.data.find( { c:"test", d:"yes", a: {$gte:1,$lt:2}, b: {$gt: 3} }).sort( { b: 1 } ) Create a different compound index db.data.ensureIndex({c:1},{d:1},{b:1},{a:1}) How does it help ? Static c value Static d value Sorted Range on b One more thing ...


1

First question: You can't if you are not running on a replica set. On a replica set you may follow that guide http://docs.mongodb.org/manual/tutorial/build-indexes-on-replica-sets/. Indexes are persistent, upon an index is created it doesn't rebuild on start-up unless something trigger it (maybe your application?) Second question: I don't see any index ...


1

One reason could be that your oplog is too small. On the master: db.getReplicationInfo() If timeDiffHours is shorter than the time that your initial sync takes, then the initial sync will fail and start again... Resizing the oplog is quite easy, if this is indeed your problem. The documentation is here: ...


0

If you run query and columns in filter/group are not presented in index than data will be retreived from the table itself. Running query with columns included into the index will use index data only and in this case query will be executed much faster.


0

Why not shard on a custom _id value since it's guaranteed to be unique? With the size around 1,000 an index on playerId should allow for good performance as well. Still do some testing of course because it can still vary based on number of shards and overall size of the collection. Found a video I was looking for at the time from the Mongo University ...


1

It just means that this is a sharded cluster and the aggregation is happening via a mongos (also known as a query router). This is important for aggregations internally because it means that the output from multiple shards may need to be merged but it's not really relevant for most end users (you usually already know you are running in a sharded ...


2

Config servers are a special case, you can use one (for testing), or three and that's it. They are not a replica set, at least not yet, that might change in the future, see SERVER-1448. Go and (re)read the first two paragraphs here - note the piece about them not being a replica set is explicitly mentioned. I will pick out some other relevant points: ...


0

The document does not say why we need 3 config servers. But it is recommended to use odd number of mongods in each shard, maybe for quick elect? I think it is the same reason why we need odd number of config servers. I am not sure. Each config server can handle lots of shards. config server does not consume too much resource, such as disk. Because config ...


0

the problem seems to be the version of mongodb. Somehow for mongodb < 2.6 socket problem will intermittently occurs. When it occurs, you have to restart your mongos node.


1

You have basically allocated space by defining two capped collections, the oplog and the second capped collection in MyDatabase. Unless you specify the oplogSize, the oplog will be allocated at 5% of free space on the volume containing the MongoDB data (so I am guessing you had ~170GB free). The second capped collection size would have been defined by you, ...


0

Important thing to consider before a shrink: MongoDB grows it's data files by doubling so the dfs may be 64MB,128MB,256 [...] up to 2GB. (then it spawns multiple files) You can use a server side Javascript to do shrinking and run that JS via Mongo's shell from time to time via a job. The function that does the shrink is db.repairDatabase(). Use the db. ...


2

The default balancing window is 24x7x365, which means balancer will always move chunks if its on



Top 50 recent answers are included