Hot answers tagged

2

You can group several privileges into one Role. It is simpler to grant roles rather than dealing with a bunch of privileges. In a multi-tier architecture this might be no so important. You may have a user admin, backup, http - that's it. However, when your database is used by many (human) users distributed over several departments with different ...


2

Arbiter nodes don't "replicate" data... The problem with your setup is that, that you can "lose" two of your three data-bearing nodes and your setup has still "majority" in votes. Meaning that replica set still keeps "serving" clients, but all data is only at the one node without replication. Then comes that "majority RC", with that setup, even you lose ...


1

In MongoDB 3.6 and newer, shards must be deployed as a replica set. Replication provides data redundancy and high availability for each shard; sharding enables a collection to be distributed across multiple shards. For more information see Sharded Cluster Components and the Deploy a Sharded Cluster tutorial in the MongoDB documentation.


1

Seems like the point of checkpoints was to move fast, but at the risk of losing a minute of data at a time. Whereas the journal is all about accounting for everything. So why have both? Seems like having the Journal kind of overrides any gains that Checkpoints were supposed to give. Although journal and checkpoint processes both write data to disk, they ...


1

I think you need to use project(). See the example here - Projections


1

Reference on how shard chunks work: https://docs.mongodb.com/v4.0/core/sharding-data-partitioning/ MongoDB uses the shard key associated to the collection to partition the data into chunks. A chunk consists of a subset of sharded data. Each chunk has a inclusive lower and exclusive upper range based on the shard key. The mongos routes writes to ...


1

Index creation will be show in the mongo error logs. You can monitor the progress of the index creation. 52 hours is very slow. Can you post the masked error log here?


1

Aggregation sorts the documents based on the inputs INPUT_EXPRESSION and SORT_ORDER. The input expression is matched with the customFieldArray's custom_field_id value and the documents are sorted based on the corresponding field_value. var INPUT_EXPRESSION = "fname"; // values can be "fname", "city" or "lname" var SORT_ORDER = 1; // values can be 1 (...


Only top voted, non community-wiki answers of a minimum length are eligible