Skip to content

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

Merged
merged 8 commits into from
Dec 19, 2012
Merged

DOCS-814 journaling #470

merged 8 commits into from
Dec 19, 2012

Conversation

bgrabar
Copy link

@bgrabar bgrabar commented Dec 13, 2012

Ready to Merge.

: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.

Copy link
Contributor

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.

Copy link
Author

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?

Copy link
Contributor

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?
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c/resistent/resistant

@tychoish tychoish merged commit 84c28dc into mongodb:master Dec 19, 2012
mongo-cr-bot pushed a commit that referenced this pull request Jan 31, 2022
* 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]>
mongodb-server-docs-sync-bot bot pushed a commit that referenced this pull request May 22, 2025
* DOCSP-43570-mongosync-1.9.0

* remove in-dev

* JC feedback

* *

* *

* external feedback

* *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants