|
|
Log in / Subscribe / Register

Changing Fedora's shutdown timeouts

Changing Fedora's shutdown timeouts

Posted Jan 19, 2023 13:46 UTC (Thu) by dskoll (subscriber, #1630)
In reply to: Changing Fedora's shutdown timeouts by NYKevin
Parent article: Changing Fedora's shutdown timeouts

How can you implement something that keeps the ACID guarantee in the face of SIGKILL? I believe it's impossible.


to post comments

Changing Fedora's shutdown timeouts

Posted Jan 19, 2023 13:48 UTC (Thu) by dskoll (subscriber, #1630) [Link] (1 responses)

Ugh, never mind. It has to be possible or else you couldn't have ACID guarantees in the case of sudden loss of power, I guess.

Changing Fedora's shutdown timeouts

Posted Jan 19, 2023 14:58 UTC (Thu) by madscientist (subscriber, #16861) [Link]

Yes. It's a matter of whether you want to spend time at shutdown, or time at startup. On the product I worked on we used to drain our journal at shutdown but customers hated that. They wanted the thing to go down when they told it to: draining the journal can take many minutes, sometimes, depending on the situation.

Since we have to support ACID / poweroff / kill -9 / etc. anyway, we changed our shutdown to basically call _exit() and now it's very fast :). But it does mean that when they next start the service it may take longer to start up because all that work of reconciling the journal has to be done then.

For people who are concerned about it there is a standalone tool that can be used to reconcile the journal in the background while the service is offline, rather than doing it at startup.

ACID guarantees in the face of SIGKILL

Posted Jan 19, 2023 14:10 UTC (Thu) by matthias (subscriber, #94967) [Link] (1 responses)

In the same way as journaling filesystem work. First write the transaction into a journal (usually called log for databases) and after the transaction is confirmed to be written, the actual database can be changed.

Usually you want to keep the log with all transactions even after they have been written to the database. Using the log, you can recreate the current database state from a backup. So your backup scheme is as follows: do a full backup once in a while and keep a backup of all log files since the last full backup.

ACID guarantees in the face of SIGKILL

Posted Jan 19, 2023 14:26 UTC (Thu) by Wol (subscriber, #4433) [Link]

And try (not always possible) to make sure the log is on different hardware, even if only a different disk ...

Cheers,
Wol

Changing Fedora's shutdown timeouts

Posted Jan 19, 2023 19:21 UTC (Thu) by kreijack (guest, #43513) [Link]

> How can you implement something that keeps the ACID guarantee in the face of SIGKILL? I believe it's impossible.

The ACID guarantee have to be keep even in case of a power failure.

I remember that in the past I read that because the software have to be secure against a power failure, we could switch off the kernel without worrying about a clean shutdown or sync/flush....


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds