cleanup of the previous patch.
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 22 May 2008 03:12:53 +0000 (13:12 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 22 May 2008 03:12:53 +0000 (13:12 +1000)
commitd895f43504f4d4871d003d377a39b9173fb321d6
tree4439e8007c2cdc737cc8f91a10acff818d1a41e0
parented2cf0291db65801993b171dd71fe077afa810c3
cleanup of the previous patch.

With these patches, ctdbd will enforce and (by default) always use
tdb_transactions when updating/writing records to a persistent database.

This might come with a small performance degratation  since transactions
are slower than no transactions at all.

If a client, such as samba wants to use a persistent database but does NOT
want to pay the performance penalty, it can specify TDB_NOSYNC  as the
srvid parameter in the ctdb_control() for CTDB_CONTROL_DB_ATTACH_PERSISTENT.

In this case CTDBD will remember that "this database is not that important"
so I can use unsafe (no transaction) tdb_stores to write the updates.
It will be faster than the default (always use transaction) but less crash safe.

(This used to be ctdb commit 3d85d2cf669686f89cacdc481eaa97aef1ba62c0)
ctdb/common/ctdb_ltdb.c
ctdb/server/ctdb_persistent.c