[SCM] CTDB repository - branch 1.0.69 updated - ctdb-1.0.69-14-ga63c793
The branch, 1.0.69 has been updated via a63c79318678abe99d2a36fe4465e63eafc008b7 (commit) via 8628402d4cad4b9ef580151b85e36b6a5909e56c (commit) via c61c4f7a7628232e9094d463275ba6abf7b79941 (commit) via 460e6b2402fc9bca9e9835e3a203278ac0bcaf8f (commit) from fb582515c674b76e06aed28d04f24ae3a849cfe2 (commit) http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.0.69 - Log - commit a63c79318678abe99d2a36fe4465e63eafc008b7 Author: Ronnie Sahlberg ronniesahlb...@gmail.com Date: Sun Apr 26 08:50:35 2009 +1000 new version 1.0.69-4 commit 8628402d4cad4b9ef580151b85e36b6a5909e56c Author: Ronnie Sahlberg ronniesahlb...@gmail.com Date: Sun Apr 26 08:47:38 2009 +1000 we only need to have transaction nesting disabled when we start the new transaction for the recovery commit c61c4f7a7628232e9094d463275ba6abf7b79941 Author: Ronnie Sahlberg ronniesahlb...@gmail.com Date: Sun Apr 26 08:42:54 2009 +1000 set the TDB_NO_NESTING flag for the tdb before we start a transaction from within recovery commit 460e6b2402fc9bca9e9835e3a203278ac0bcaf8f Author: Ronnie Sahlberg ronniesahlb...@gmail.com Date: Sun Apr 26 08:38:37 2009 +1000 add TDB_NO_NESTING. When this flag is set tdb will not allow any nested transactions and tdb_transaction_start() will implicitely _cancel() any pending transactions before starting any new ones. --- Summary of changes: lib/tdb/common/transaction.c | 18 ++ lib/tdb/include/tdb.h|1 + packaging/RPM/ctdb.spec |8 +++- server/ctdb_freeze.c |2 ++ 4 files changed, 24 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/tdb/common/transaction.c b/lib/tdb/common/transaction.c index 4e2127b..6a34c45 100644 --- a/lib/tdb/common/transaction.c +++ b/lib/tdb/common/transaction.c @@ -85,6 +85,11 @@ still available, but no transaction recovery area is used and no fsync/msync calls are made. + - if TDB_NO_NESTING is passed to flags in tdb open then transaction +nesting is disabled. tdb_transaction_start() will then implicitely +cancel any pending transactions and always start a new transaction +context instead of nesting. + */ @@ -409,10 +414,15 @@ int tdb_transaction_start(struct tdb_context *tdb) /* cope with nested tdb_transaction_start() calls */ if (tdb-transaction != NULL) { - tdb-transaction-nesting++; - TDB_LOG((tdb, TDB_DEBUG_TRACE, tdb_transaction_start: nesting %d\n, -tdb-transaction-nesting)); - return 0; + if (!tdb-flags TDB_NO_NESTING) { + tdb-transaction-nesting++; + TDB_LOG((tdb, TDB_DEBUG_TRACE, tdb_transaction_start: nesting %d\n, +tdb-transaction-nesting)); + return 0; + } else { + tdb_transaction_cancel(tdb); + TDB_LOG((tdb, TDB_DEBUG_TRACE, tdb_transaction_start: cancelling previous transaction\n)); + } } if (tdb-num_locks != 0 || tdb-global_lock.count) { diff --git a/lib/tdb/include/tdb.h b/lib/tdb/include/tdb.h index 0008085..6281181 100644 --- a/lib/tdb/include/tdb.h +++ b/lib/tdb/include/tdb.h @@ -47,6 +47,7 @@ extern C { #define TDB_NOSYNC 64 /* don't use synchronous transactions */ #define TDB_SEQNUM 128 /* maintain a sequence number */ #define TDB_VOLATILE 256 /* Activate the per-hashchain freelist, default 5 */ +#define TDB_NO_NESTING 512 /* Dont allow transaction nesting */ #define TDB_ERRCODE(code, ret) ((tdb-ecode = (code)), ret) diff --git a/packaging/RPM/ctdb.spec b/packaging/RPM/ctdb.spec index 8572ab0..01d09e0 100644 --- a/packaging/RPM/ctdb.spec +++ b/packaging/RPM/ctdb.spec @@ -5,7 +5,7 @@ Vendor: Samba Team Packager: Samba Team sa...@samba.org Name: ctdb Version: 1.0 -Release: 69_3 +Release: 69_4 Epoch: 0 License: GNU GPL version 3 Group: System Environment/Daemons @@ -121,6 +121,12 @@ fi %{_includedir}/ctdb_private.h %changelog +* Sun Apr 26 2009 : Version 1.0.69_4 + - Add TDB_NO_NESTING to the tdb layer to prevent transaction nesting. + - Make sure that when we start a recovery transaction that this is not a + nested transaction. + - Add a tuneable RecoveryDropAllIPs that specifies after how long being in + recovery mode a node will elect to drop all its public addresses. * Fri Apr 24 2009 : Version 1.0.69_3 - Make sure that if during recovery a node is stuck and does not reply to pull_db requests that we eventually ban this node from the recovery master. diff --git a/server/ctdb_freeze.c b/server/ctdb_freeze.c index e39332e..6f99f8b 100644 --- a/server/ctdb_freeze.c +++ b/server/ctdb_freeze.c @@ -345,7 +345,9 @@ int32_t
[SCM] CTDB repository - branch master updated - ctdb-1.0.79-12-gbf8dae6
The branch, master has been updated via bf8dae63d10498e6b6179bbacdd72f1ff0fc60be (commit) via 1b2029dbb055ff07367ebc1f307f5241320227b2 (commit) via 459e4ee135bd1cd24c15e5325906eb4ecfd550ec (commit) from 70f21428c9eec96bcc787be191e7478ad68956dc (commit) http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master - Log - commit bf8dae63d10498e6b6179bbacdd72f1ff0fc60be Author: Ronnie Sahlberg ronniesahlb...@gmail.com Date: Sun Apr 26 08:47:38 2009 +1000 we only need to have transaction nesting disabled when we start the new transaction for the recovery commit 1b2029dbb055ff07367ebc1f307f5241320227b2 Author: Ronnie Sahlberg ronniesahlb...@gmail.com Date: Sun Apr 26 08:42:54 2009 +1000 set the TDB_NO_NESTING flag for the tdb before we start a transaction from within recovery commit 459e4ee135bd1cd24c15e5325906eb4ecfd550ec Author: Ronnie Sahlberg ronniesahlb...@gmail.com Date: Sun Apr 26 08:38:37 2009 +1000 add TDB_NO_NESTING. When this flag is set tdb will not allow any nested transactions and tdb_transaction_start() will implicitely _cancel() any pending transactions before starting any new ones. --- Summary of changes: lib/tdb/common/transaction.c | 18 ++ lib/tdb/include/tdb.h|1 + server/ctdb_freeze.c |2 ++ 3 files changed, 17 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/tdb/common/transaction.c b/lib/tdb/common/transaction.c index 4e2127b..6a34c45 100644 --- a/lib/tdb/common/transaction.c +++ b/lib/tdb/common/transaction.c @@ -85,6 +85,11 @@ still available, but no transaction recovery area is used and no fsync/msync calls are made. + - if TDB_NO_NESTING is passed to flags in tdb open then transaction +nesting is disabled. tdb_transaction_start() will then implicitely +cancel any pending transactions and always start a new transaction +context instead of nesting. + */ @@ -409,10 +414,15 @@ int tdb_transaction_start(struct tdb_context *tdb) /* cope with nested tdb_transaction_start() calls */ if (tdb-transaction != NULL) { - tdb-transaction-nesting++; - TDB_LOG((tdb, TDB_DEBUG_TRACE, tdb_transaction_start: nesting %d\n, -tdb-transaction-nesting)); - return 0; + if (!tdb-flags TDB_NO_NESTING) { + tdb-transaction-nesting++; + TDB_LOG((tdb, TDB_DEBUG_TRACE, tdb_transaction_start: nesting %d\n, +tdb-transaction-nesting)); + return 0; + } else { + tdb_transaction_cancel(tdb); + TDB_LOG((tdb, TDB_DEBUG_TRACE, tdb_transaction_start: cancelling previous transaction\n)); + } } if (tdb-num_locks != 0 || tdb-global_lock.count) { diff --git a/lib/tdb/include/tdb.h b/lib/tdb/include/tdb.h index 0008085..6281181 100644 --- a/lib/tdb/include/tdb.h +++ b/lib/tdb/include/tdb.h @@ -47,6 +47,7 @@ extern C { #define TDB_NOSYNC 64 /* don't use synchronous transactions */ #define TDB_SEQNUM 128 /* maintain a sequence number */ #define TDB_VOLATILE 256 /* Activate the per-hashchain freelist, default 5 */ +#define TDB_NO_NESTING 512 /* Dont allow transaction nesting */ #define TDB_ERRCODE(code, ret) ((tdb-ecode = (code)), ret) diff --git a/server/ctdb_freeze.c b/server/ctdb_freeze.c index e39332e..6f99f8b 100644 --- a/server/ctdb_freeze.c +++ b/server/ctdb_freeze.c @@ -345,7 +345,9 @@ int32_t ctdb_control_transaction_start(struct ctdb_context *ctdb, uint32_t id) } } + tdb_add_flags(ctdb_db-ltdb-tdb, TDB_NO_NESTING); ret = tdb_transaction_start(ctdb_db-ltdb-tdb); + tdb_remove_flags(ctdb_db-ltdb-tdb, TDB_NO_NESTING); tdb_remove_flags(ctdb_db-ltdb-tdb, TDB_NOLOCK); -- CTDB repository
Build status as of Sun Apr 26 00:00:03 2009
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2009-04-25 00:00:31.0 + +++ /home/build/master/cache/broken_results.txt 2009-04-26 00:00:59.0 + @@ -1,22 +1,22 @@ -Build status as of Sat Apr 25 00:00:02 2009 +Build status as of Sun Apr 26 00:00:03 2009 Build counts: Tree Total Broken Panic build_farm 0 0 0 -ccache 31 6 0 +ccache 30 6 0 distcc 0 0 0 -ldb 31 31 0 -libreplace 31 12 0 +ldb 30 30 0 +libreplace 29 11 0 lorikeet 0 0 0 pidl 20 3 0 ppp 13 0 0 -rsync31 12 0 +rsync30 12 0 samba-docs 0 0 0 samba-web0 0 0 -samba_3_current 28 19 0 -samba_3_master 29 28 1 -samba_3_next 30 30 1 -samba_4_0_test 30 30 5 -talloc 30 31 0 -tdb 28 13 0 +samba_3_current 27 18 0 +samba_3_master 29 29 0 +samba_3_next 29 28 1 +samba_4_0_test 30 29 1 +talloc 30 30 0 +tdb 28 12 0