summaryrefslogtreecommitdiff
path: root/source3/lib/dbwrap_ctdb.c
AgeCommit message (Collapse)AuthorFilesLines
2008-08-13dbwrap ctdb: add db_ctdb_delete_persistent() and use it for persistent DBsMichael Adam1-1/+17
as delete_rec operation from fetch_locked() Michael (This used to be commit f4aab595a0219305fbedf8890e787b690660a55a)
2008-08-13dbwrap ctdb: call db_ctdb_store() in db_ctdb_delete().Michael Adam1-7/+2
to reduce code duplication. Michael (This used to be commit 09a197e756459877cab7b4d09f534c6a41cfdd71)
2008-08-13dbwrap ctdb: add a retry loop to the persistent store operation.Michael Adam1-51/+120
This is because ctdbd can fail in performing the persistent_store due to race conditions, and this does not mean it can't succeed the next time. To not loop infinitely, this makes use of a new parametric option: "dbwrap ctdb:max store retries" (integer) which defaults to 5 and sets the upper limit for the number or repeats of the fetch/store cycle. Michael (This used to be commit 2bcc9e6ecef876030e552a607d92597f60203db2)
2008-08-13dbwrap ctdb: release the lock before calling ctdbd_persistent_store()Michael Adam1-0/+26
in the persistent db_ctdb_store operation. This is to prevent deadlocks in db_ctdb_persistent_store(). There is a tradeoff: Usually, the record is still locked after db->store operation. This lock is usually released via the talloc destructor with the TALLOC_FREE to the record. So we have two choices: - Either re-lock the record after the call to persistent_store or cancel_persistent update and this way not changing any assumptions callers may have about the state, but possibly introducing new race conditions. - Or don't lock the record again but just remove the talloc_destructor. This is less racy but assumes that the lock is always released via TALLOC_FREE of the record. I choose the first variant for now since it seems less racy. We can't guarantee that we succeed in getting the lock anyways. The only real danger here is that a caller performs multiple store operations after a fetch_locked() which is currently not the case. Michael (This used to be commit d004c9a7281d2577c3ba2012c8f790cc198ea700)
2008-08-13dbwrap ctdb: remove erroneously duplicated comment.Michael Adam1-1/+0
Michael (This used to be commit c939c55e5182258092faceefa58a7f328f18619e)
2008-08-13Use transaction start/cancel for persistent writes to avoid leaving the ↵Ronnie Sahlberg1-2/+9
database in an inconsistent state if we crash during the operation Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> (This used to be commit 09329f1f9114af44fc4e5e4f29a7315912313125)
2008-08-06fixed permissions on ctdb databasesAndrew Tridgell1-0/+5
(This used to be commit 123fc3980a83d956bffaa689f3af81bbf81ce1c1)
2008-03-10Add transactions to the dbwrap APIVolker Lendecke1-0/+10
Only filled in for tdb so far, for rbt it's pointless, and ctdb itself needs to be extended (This used to be commit 0a55e018dd68af06d84332d54148bbfb0b510b22)
2008-01-16Merge CTDB-related fixes from samba-ctdb 3.0 branch ↵Alexander Bokovoy1-68/+110
(http://samba.org/~tridge/3_0-ctdb) Signed-off-by: Alexander Bokovoy <ab@samba.org>(This used to be commit 0c8e23afbbb2d081fc23908bafcad04650bfacea)
2007-11-09Fix dbwrap debug outputVolker Lendecke1-2/+3
(This used to be commit 9f9c933c16abacb2d0aa7bc7faa5b1ddac61b0e5)
2007-10-10r24773: Fix a ctdb connection lockupVolker Lendecke1-4/+11
The lockup could happen when packet_read_sync() gets two packets in a row, the first one being an async message, and the second one being the response to a ctdb request. Also add some debug msg to ctdb_conn.c, and cut off the "locking key" messages to only dump 20 hex chars at debug level 10. >10 will dump everything. (This used to be commit 0a55880a240b619810371a19144dd0a75208adfe)
2007-10-10r24113: some little fixes to get the correct error messageStefan Metzmacher1-1/+5
when using "clustering = yes" and ctdbd isn't running metze (This used to be commit c5f020ba1fdefe0422dd466b9c68ff67c74ceddd)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r23410: Merge the core of the cluster code.Volker Lendecke1-0/+451
I'm 100% certain I've forgotten to merge something, but the main code should be in. It's mainly in dbwrap_ctdb.c, ctdbd_conn.c and messages_ctdbd.c. There should be no changes to the non-cluster case, it does survive make test on my laptop. It survives some very basic tests with ctdbd enables, I did not do the full test suite for clusters yet. Phew... Volker (This used to be commit 15553d6327a3aecdd2b0b94a3656d04bf4106323)