DEBIAN PRO

DEBIAN PRO
DEBIAN

viernes, 14 de diciembre de 2012

MongoDb DBA Exam


Ya tengo resuelto los primeros 5 puntos del exámen. Creo que en unos dias podré pedir mi certificado.


1.
Now, we want to see if any data that we attempted to insert isn't there. Go into the shell to any member of the set. Use rs.status() to check state. Be sure the member is "caught up" to the latest optime (if it's a secondary). Also on a secondary you might need to invoke rs.slaveOk() before doing a query.)

Now run:

> db.foo.find()

to see what data is there after the set recovered from the two outages. How many documents do you have?



2.
Question: which one of the following is the true statement about mongodb's operation in these scenarios?

a. Mongo preserves the order of writes in a collection in its consistency model. In this problem, 27003's oplog was effectively a "fork" and to preserve write ordering a rollback was necessary during 27003's recovery phase.

b. The MongoDB primary does not write to its datafiles until a majority acknowledgement comes back from the rest of the cluster.

c. When 27003 was primary, that was never received for writes 7,8,9.When 27003 came back up, it transmitted its write ops that the other members had not seen yet to those members so that they would have them also.


3.
Final: Final.3

In Final.2 the mongod on port 27003 does a rollback. Go to that mongod's data directory. Look for a rollback directory inside. Find the .bson file there. Run the bsondump utility on that file. What are its contents?
There is no such file.
The file exists but is 0 bytes long.

It contains 2 documents.
It contains 3 documents.
It contains 4 documents.
It contains 8 documents.



4.
Make that change to the set -- i.e. reconfig so that the third member can *never* be primary. Then run:

$ mongo --shell a.js --port 27003

And run

> part4()

And enter the result in the text box below (with no spaces or line feeds just the exact value returned).






5.
Final: Final.5

Suppose we have blog posts in a (not sharded*) postings collection, of the form:

{
_id : …,
author : 'joe',
title : 'Too big to fail',
text : …,
tags : [ 'business', 'finance' ],
when : ISODate("2008-11-03"),
views : 23002,
votes : 4,
voters : ['joe', 'jane', 'bob', 'somesh'],
comments : [
{ commenter : 'allan',
comment : 'Well, i don't think so…',
flagged:false, plus:2 },
...
]
}

Which of these statements is true? Note: to get a multiple answer question right in this final you must get all the components right, so even if some parts are simple, take your time.

*Certain restrictions apply to unique constraints on indexes when sharded, so I mentioned to be clear.






Gracias 10 GEN !!!!

No hay comentarios:

Publicar un comentario