Re: Journaling: Surviving or allowing unclean shutdown?

egger
2001-01-04T20:35:01Z

On 4 Jan, Richard B. Johnson wrote:

> A mobile-phone that runs out of battery power will also lose all the
> phone numbers you have stored, etc. The same is true for most all
> embedded systems that save data.

In your world maybe. I would be quite pissed if my mobile phones lost
the stored numbers every time they run out of power. Nearly all embedded
devices nowadays keep their settings without power; be it a satellite
receiver, a PBX, a fax machine or a coffee brewer.

> This means that the data-base
> software has to roll-back and redo the temporarily-lost updates
> when it restarts. It uses the journal to accomplish this. As
> N-seconds gets smaller, the overhead necessary to maintain data
> consistency gets greater, so there are trade-offs.

And depending on the application they may really be worth it.

> A journaling file-system also needs some number to show the
> order of operations so that roll-backs and restarts work.
> Unfortunately, the systems that I have seen all use time for
> the number! You don't want time to reconstruct 'order'. You
> need a number that represents 'order'. Time is not your friend.

Since the metadata has to be sync anyway what about using a
normal transaction counter?

--

Servus,
Daniel