1, This is a very sweet mistake which can only happen to a Spanish/Portoguese native speaker:
Response Time Degredation, Part 2:
Video “Queries taking longer has data set grows”
Norberto really pronounces it correctly as “as” since the “h” is silent.
18 # vi /shared/rtd.cfg
19 # ^ Instead of doing this and increasing the cache size to 2 gigs, you can
20 # get the same effect with the following:
cat /shared/rtd.cfg | sed 's/0.25/2/' > tmp; mv tmp /shared/rtd.cfg
This is godawful and also wrong, since the substitution wouldn’t work, if there was a “0foo25” line. Better:
sed -i "s/0\.25/2/g" /shared/rtd.cfg
16 # Now, it’s time to restart this server back into the replica set. Note that the “–replSet” option is back.
17 startRSMember3=$(ps -ef | grep mongo | grep rs2 | sed ‘s/rs2/rs3/g’ | sed ‘s /30001/30002/g’ | sed ‘s/^.*mongod --replSet m312RS/mongod --replSet m312RS/’)
31 # Restart the second secondary, go back to the primary, and confirm the repl ica set status.
32 startRSMember2=$(ps -ef | grep mongo | grep rs3 | sed ‘s/rs3/rs2/g’ | sed ‘s /30002/30001/g’ | sed ‘s/^.*mongod --replSet m312RS/mongod --replSet m312RS/’)
42 # Restart the old primary back into the replica set.
43 startRSMember1=$(ps -ef | grep mongo | grep rs3 | sed ‘s/rs3/rs1/g’ | sed ‘s /30002/30000/g’ | sed ‘s/^.*mongod --replSet m312RS/mongod --replSet m312RS/’)
The last substitution does nothing on all "back into the replica set situations: The old and new string is the same. Better
startRSMember3=$(ps -ef | grep mongo | grep rs2 | sed "s/rs2/rs3/g, s/30001/30002/g, s/^.*mongod/mongod --replSet m312RS/g")
4, Note that pip is nowadays pip3 and can cause trouble if used like that.