Questions tagged [replicaset]

This tag is used mostly for a MongoDB replica set (a group of "mongod" processes that maintain the same data set) and rarely for a Kubernetes ReplicaSet (the next-generation Replication Controller with set-based selector support).

583 questions
0
votes
1 answer

what happends to a write request to Mongo cluster, during Mongo primary stepdown and election

I have an application constantly writing to a MongoDB replica set (for example 1 primary, 2 secondary). I'm wondering: if I force current primary to step down, then an election for new primary could take a couple seconds to finish. But during this…
keypoint
  • 2,268
  • 4
  • 31
  • 59
0
votes
1 answer

Connecting to Mongo with replica set and mongo-hadoop connector for Spark

I have a Spark process that is currently using the mongo-hadoop bridge (from https://github.com/mongodb/mongo-hadoop/blob/master/spark/src/main/python/README.rst ) to access the mongo database: mongo_url =…
Eka
  • 63
  • 2
  • 10
0
votes
1 answer

Mongo "setShardVersion failed"

I had a mongodb with 4 shards, then I created another 4 sharded mongo instance in another server and configured replica sets, after that I got the bellow error when I want to query the first mongo (writing to db also fails!) Error: error: { "$err" :…
Adel
  • 3,542
  • 8
  • 30
  • 31
0
votes
0 answers

Mongo 2.6.12 secondaries not using index

We recently upgraded our mongo replica set from 2.4 to 2.6.12 and are having the strange behavior that the primary uses the indexes and the secondaries do not. for instance this query: query fitly_metrics_production.rank_ledger_entries query: {…
frausto
  • 51
  • 6
0
votes
0 answers

Mongoose Read Preference Tags Not Working

I have a Mongo replica set, with a master in the US, and a slave in Europe, as well as Node server instances in the same locations running Node with Mongoose. The Mongo instances have tags, the US one {"location":"us"} and the European one…
arik
  • 28,170
  • 36
  • 100
  • 156
0
votes
2 answers

how long will it cost when I convert a mongodb standalone node to replicaset?

There is running a single node mongodb server, and about 28,000,000 documents, now I want to convert it to replicaSet, but I am not sure if it will cost too much time? and also if the db will works during the initialize process?
Andy Cheung
  • 125
  • 6
0
votes
1 answer

Replication acknowledgement in PostgreSQL + BDR

I'm using libpq C Library for testing PG + BDR replica set. I'd like to get acknowledgement of the CRUD operations' replication. My purpose is to make my own log of the replication time in milliseconds or if possible in microseconds. The…
MagicDragon
  • 199
  • 1
  • 3
  • 18
0
votes
2 answers

Mongo replica set - does a client need to know about all of them?

We are using a mongo replica set of 4 members, and one arbiter. There are 3 physical sites, all mongo servers can talk to each other: Site 1 (west coast) site1-mg01 site1-mg02 Site 2 (east coast) site2-mg03 site2-mg04 Site 3 (cloud, arbiter only)…
javatestcase
  • 682
  • 1
  • 10
  • 25
0
votes
1 answer

MongoDB storageEngine from MMAPv1 to wiredTiger fassert() failure

I am upgrading my cluster to wiredTiger using this site: https://docs.mongodb.org/manual/tutorial/change-replica-set-wiredtiger/ I have been having the following issue: Environment details: MongoDB 3.0.9 in a sharded cluster on Red Hat Enterprise…
N.B.
  • 11
  • 2
0
votes
1 answer

MongoDB 3.0.4 Replica SET database level lock while inserting, not able to read other collection?

I am having a replica set includes (1 primary, 1 secondary and 1 recovering server), I am performing following on primary: All writes and reads are performing on and from primary. Let's say we have one database consisting of 5 collections A, B, C,…
Aayushi
  • 1
  • 1
0
votes
1 answer

Error: Cannot find specified path for mongodb /data/db/testReplSet-0 when replicaSet.startSet()

Trying to get the test setup locally for mongodb replication. Steps I followed are: $ mongo --nodb > replicaSet = new ReplSetTest({"nodes" : 3}) > // starts three mongod processes > replicaSet.startSet() The third step is throwing errors. I already…
0
votes
1 answer

Issues during repset members syncing

Yesterday i found out that secondary member in repset is out of sync with primary. Difference was too big to fit the oplog so i had to sync manually. According to the manual i stopped mongod, entirely deleted content of dbpath and started mongod…
user1700494
  • 211
  • 2
  • 15
0
votes
1 answer

mongoose automatically detect primary

Does mongoose automatically detects PRIMARY in a replica set even when it's changed? I'm pretty sure that's the case but I have to make sure b/c I can't find anything related to that in the docs. Thanks!
refaelos
  • 7,927
  • 7
  • 36
  • 55
0
votes
0 answers

How to make mongodb select the secondary mongo from the replication set if one db in the set fails

I am working on a java application which is trying to read from mongodb. I am using two secondary mongodbs and if one of the db fails, it has to automatically initiate read from the other one. While testing this code I ran into error…
0
votes
0 answers

mongodb operation very slow when using replica set

I'm running MongoDB 2.4.5 and recently I've started digging into Replica Set to get some kind of redundancy. I started same mongo instance with --replSet parameter and also added an Arbiter to running Replica Set. What happened was writing to mongo…
vivek tiwari
  • 645
  • 3
  • 10
  • 23