On Tue, 2007-09-18 at 17:30 +0200, Leszek Matok wrote:
Dnia 2007-09-17, o godz. 15:31:17 Simo Sorce
<ssorce(a)redhat.com> napisaĆ(a):
> > - kill -TERM $everything
> > - wait a second
> > - kill -KILL $everything
>
> Do it with your services, don't try on mine :-)
If your service is going to break whenever it gets killed, it's also going to
break whenever the power is lost, whenever the kernel panics and whenever I
accidentaly push the button. I don't believe Fedora ships such broken
software :)
There are many simple DBs that may break in such situations, and we have
them in Fedora. Usually there are tools to recover them but they are not
always 100% successful. And even if the state of the DB is consistent at
the end of the process you may lose data.
If you are trying to flush something to a file and you get killed you
can't expect to be sure what's in the file when you are done.
A good example is samba. By protocol, clients can and do use oplocks,
which means they don't write data back to the server immediately but
they are allowed to keep everything local and just flush down the data
when requested or when they decide it is time to.
When samba receive a shutdown request, it asks all client to please
flush the data, it may take some time, as the size can be considerable.
So if you kill samba while it is writing data received from clients, as
a consequence you may corrupt files.
A simple recycle may be easier to deal with as clients usually reconnect
and flush data on simple disconnections.
Same is for some tdb files we use or for BDB databases that use big
write caches.
Simo.