If a shard is inaccessible or unavailable, queries will return with an error. However, a client may set the partial query bit, which will then return results from all available shards, regardless of whether a given shard is unavailable. The…
We observed when any complete shard (all nodes in that replica set) got down, all the queries which involved data from that down shard are giving failures as below. Want to know whether it’s expected behavior ? mongos> db.shrcol.count() Thu…
To enable sharding :- ================== sh.addShard(“rs1/ip-10-0-0-197:27010,ec2-52-7-8-107.compute-1.amazonaws.com:27011”) sh.addShard(“rs2/ip-10-0-0-197:27020,ec2-52-7-8-107.compute-1.amazonaws.com:27021”) use shard_db db.shard_col.ensureIndex( { user_id : 1 }, { unique : true }) sh.enableSharding(“shard_db”) sh.shardCollection(“shard_db.shard_col”, {“user_id”:1}) sh.startBalancer() sh.getBalancerState() sh.isBalancerRunning() use shard_db for(var i = 1; i <= 100000 ; i++){db.shard_col.insert({“user_id” : i ,…
Using username “ec2-user”. Authenticating with public key “imported-openssh-key” Last login: Fri May 8 12:23:16 2015 from 49.205.126.24 __| __|_ ) _| ( / Amazon Linux AMI ___|\___|___| https://aws.amazon.com/amazon-linux-ami/2015.03-release-notes/ 11 package(s) needed for security, out of 36 available Run “sudo yum…
Choose the yum repo as per your linux flavour and place as below. [root@dbversityhost yum.repos.d]# pwd /etc/yum.repos.d [root@dbversityhost yum.repos.d]# [root@dbversityhost yum.repos.d]# [root@dbversityhost yum.repos.d]# cat /proc/version Linux version 3.14.35-28.38.amzn1.x86_64 (mockbuild@gobi-build-64012) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP…
[root@ip-10-0-0-14 ec2-user]# sudo yum install postgresql-server postgresql-* Loaded plugins: priorities, update-motd, upgrade-helper amzn-main/latest | 2.1 kB 00:00 amzn-updates/latest | 2.3 kB 00:00 4 packages excluded due to repository priority protections Resolving Dependencies –> Running transaction check —> Package postgresql-jdbc.noarch 0:8.4.701-8.11.amzn1…
[root@ip-10-0-0-228 ec2-user]# service postgresql initdb Data directory is not empty! [FAILED] [root@ip-10-0-0-228 ec2-user]# Clean-up the data files & restart [root@ip-10-0-0-228 ec2-user]# ll -lhtr /var/lib/pgsql9/data/ total 88K -rw——- 1 postgres postgres 4 May 5 09:32 PG_VERSION drwx—— 2 postgres postgres 4.0K…
Question : – ============================================ I’ve a quick question on Covered/IndexOnly Index – it’s saying query goes to index collection – not to actual collection; but I don’t see any entries in system.indexes collections except 2 – I’m little confused here….
By default MongoDB displays 20 records in the results for any DB query (which results more than 20 records ) & you can see the next set of result by pressing ‘it’ (iteration) in the prompt. However, you can change the default…