-
Notifications
You must be signed in to change notification settings - Fork 1.7k
DOCS-814 journaling #470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOCS-814 journaling #470
Conversation
:doc:`write operations </core/write-operations>` in an on-disk | ||
``journal`` prior to applying them to the database. The ``journal`` | ||
ensures write operations can be re-applied in the event of a crash. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
journal need not be literalized.
journaling also ensures that mongodb is crash resistent: without a journal, if mongodb exits unexpectedly, then operators must assume that the data are in an inconsistent state and should resync from a clean secondary.
If we don't make this clear, it's possible that people won't respect or value the importance of journaling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Crash resistent or crash resilient?
What operators?
Are you saying that if journaling is enabled and the primary in a replica set crashes, that the secondaries don't need to resync from a clean secondary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resilient.
operators = administrations/users (this is, admittedly a somewhat arcane and use of the term, sorry for the confusion)
the longer story is:
- without journaling, if you shutdown uncleanly (i.e. by sending kill -9 mongod, or if it encounters an error and bails out, or there's power loss) then the data is almost certainly corrupt in some way. So you either have to run repair (which just throws away invalid BSON in the database,) or you have to resync from a clean member of the set (copy the data or just use initial sync) to ensure that the data is coherent.
- with journaling, if mongod stops, it can recover everything that it wrote to the journal (which is everything less the last 100ms at most data (by default)) and the data files will be in a consistent state after it finishes playing back the journal, without need for resync (unless, of course, the secondary has fallen off the back edge of the oplog, which is an unrelated issue that doesn't need to be documented here...
|
||
Yes, see Backups with Journaling Enabled. | ||
|
||
32 bit nuances? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't a question frequent or otherwise?
journal prior to applying them to the data files. The journal | ||
ensures write operations can be re-applied in the event of a crash. | ||
|
||
Journaling ensures that :program:`mongodb` is crash resistent. Without a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c/resistent/resistant
* DOCS-13628 write concern and transactions * DOCS-13628 write concern and transactions * DOCS-13628 write concern and transactions * DOCS-13628 write concern and transactions * DOCS-13628 write concern and transactions * DOCS-13628 write concern and transactions * DOCS-13628-write-concern-and-transactions * DOCS-13628-write-concern-and-transactions * DOCS-13628-write-concern-and-transactions * DOCS-13628-write-concern-and-transactions Co-authored-by: jason-price-mongodb <[email protected]> Co-authored-by: jason-price-mongodb <[email protected]>
* DOCSP-43570-mongosync-1.9.0 * remove in-dev * JC feedback * * * * * external feedback * *
Ready to Merge.