Exercises
Exercise 1
$ mongo --port 30000
rs1:PRIMARY> use repl
rs1:PRIMARY> for (var n=1; n<=10000; n++) db.repl_test.insertOne({index: n, content: "hello world"})
rs1:PRIMARY> db.repl_test.count()
10000$ mongo --port 30001
rs1:SECONDARY> use repl
rs1:SECONDARY> db.repl_test.count()
10000Last updated
Was this helpful?