The branch, master has been updated
via bf1b76955db6ba00ec64686b53084268573ba6a0 (commit)
via 72f1c696ee77899f7973878f2568a60d199d4fea (commit)
from 329df9e47e6ca8ab5143985a999e68f37c6d88a5 (commit)
http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit bf1b76955db6ba00ec64686b53084268573ba6a0
Author: root <[email protected]>
Date: Fri May 1 12:37:52 2009 +1000
new version 1.0.80
commit 72f1c696ee77899f7973878f2568a60d199d4fea
Author: root <[email protected]>
Date: Fri May 1 12:30:26 2009 +1000
when tracking the ctdb statistics, only decrement num_clients and
pending_calls IFF the counter is >0
Otherwise there is the chance that we will reset the statistics after the
counter has been incremented (client connects) to zero and when the client
disconnects we decrement it to a negative number.
this is a pure cosmetic patch with no operational impact to ctdb
-----------------------------------------------------------------------
Summary of changes:
packaging/RPM/ctdb.spec | 10 +++++++++-
server/ctdb_daemon.c | 44 +++++++++++++++++++++++++++++++++-----------
2 files changed, 42 insertions(+), 12 deletions(-)
Changeset truncated at 500 lines:
diff --git a/packaging/RPM/ctdb.spec b/packaging/RPM/ctdb.spec
index 77bb0ba..bbd467b 100644
--- a/packaging/RPM/ctdb.spec
+++ b/packaging/RPM/ctdb.spec
@@ -4,7 +4,7 @@ Summary: Clustered TDB
Vendor: Samba Team
Packager: Samba Team <[email protected]>
Name: ctdb
-Version: 1.0.79
+Version: 1.0.80
Release: 1
Epoch: 0
License: GNU GPL version 3
@@ -131,6 +131,14 @@ fi
%{_libdir}/pkgconfig/ctdb.pc
%changelog
+* Fri May 1 2009 : Version 1.0.80
+ - change init shutdown level to 01 for ctdb so it stops before any of the
other services
+ - if we can not pull a database from a remote node during recovery, mark that
node as a culprit so it becomes banned
+ - increase the loglevel when we volunteer to drop all ip addresses after
beeing in recovery mode for too long. Make this timeout tuneable with
"RecoveryDropAllIPs" and have it default to 60 seconds
+ - Add a new flag TDB_NO_NESTING to the tdb layer to prevent nested
transactions which ctdb does not use and does not expect. Have ctdb set this
flag to prevent nested transactions from occuring.
+ - dont unconditionally kill off ctdb and restrat it on "service ctdb start".
Fail "service ctdb start" with an error if ctdb is already running.
+ - Add a new tunable "VerifyRecoveryLock" that can be set to 0 to prevent the
main ctdb daemon to verify that the recovery master has locked the reclock file
correctly before allowing it to set the recovery mode to active.
+ - fix a cosmetic bug with ctdb statistics where certain counters could become
negative.
* Wed Apr 8 2009 : Version 1.0.79
- From Mathieu Parent: add a ctdb pkgconfig file
- Fix bug 6250
diff --git a/server/ctdb_daemon.c b/server/ctdb_daemon.c
index e730d76..8a3f564 100644
--- a/server/ctdb_daemon.c
+++ b/server/ctdb_daemon.c
@@ -178,7 +178,9 @@ static int ctdb_client_destructor(struct ctdb_client
*client)
{
ctdb_takeover_client_destructor_hook(client);
ctdb_reqid_remove(client->ctdb, client->client_id);
- client->ctdb->statistics.num_clients--;
+ if (client->ctdb->statistics.num_clients) {
+ client->ctdb->statistics.num_clients--;
+ }
if (client->num_persistent_updates != 0) {
DEBUG(DEBUG_ERR,(__location__ " Client disconnecting with %u
persistent updates in flight. Starting recovery\n",
client->num_persistent_updates));
@@ -243,7 +245,9 @@ static void daemon_call_from_client_callback(struct
ctdb_call_state *state)
res = ctdb_daemon_call_recv(state, dstate->call);
if (res != 0) {
DEBUG(DEBUG_ERR, (__location__ " ctdbd_call_recv() returned
error\n"));
- client->ctdb->statistics.pending_calls--;
+ if (client->ctdb->statistics.pending_calls > 0) {
+ client->ctdb->statistics.pending_calls--;
+ }
ctdb_latency(ctdb_db, "call_from_client_cb 1",
&client->ctdb->statistics.max_call_latency, dstate->start_time);
return;
}
@@ -253,7 +257,9 @@ static void daemon_call_from_client_callback(struct
ctdb_call_state *state)
length, struct ctdb_reply_call);
if (r == NULL) {
DEBUG(DEBUG_ERR, (__location__ " Failed to allocate reply_call
in ctdb daemon\n"));
- client->ctdb->statistics.pending_calls--;
+ if (client->ctdb->statistics.pending_calls > 0) {
+ client->ctdb->statistics.pending_calls--;
+ }
ctdb_latency(ctdb_db, "call_from_client_cb 2",
&client->ctdb->statistics.max_call_latency, dstate->start_time);
return;
}
@@ -267,7 +273,9 @@ static void daemon_call_from_client_callback(struct
ctdb_call_state *state)
}
ctdb_latency(ctdb_db, "call_from_client_cb 3",
&client->ctdb->statistics.max_call_latency, dstate->start_time);
talloc_free(dstate);
- client->ctdb->statistics.pending_calls--;
+ if (client->ctdb->statistics.pending_calls > 0) {
+ client->ctdb->statistics.pending_calls--;
+ }
}
struct ctdb_daemon_packet_wrap {
@@ -320,13 +328,17 @@ static void daemon_request_call_from_client(struct
ctdb_client *client,
struct ctdb_daemon_packet_wrap *w;
ctdb->statistics.total_calls++;
- ctdb->statistics.pending_calls++;
+ if (client->ctdb->statistics.pending_calls > 0) {
+ ctdb->statistics.pending_calls++;
+ }
ctdb_db = find_ctdb_db(client->ctdb, c->db_id);
if (!ctdb_db) {
DEBUG(DEBUG_ERR, (__location__ " Unknown database in request.
db_id==0x%08x",
c->db_id));
- ctdb->statistics.pending_calls--;
+ if (client->ctdb->statistics.pending_calls > 0) {
+ ctdb->statistics.pending_calls--;
+ }
return;
}
@@ -344,7 +356,9 @@ static void daemon_request_call_from_client(struct
ctdb_client *client,
daemon_incoming_packet_wrap, w,
True);
if (ret == -2) {
/* will retry later */
- ctdb->statistics.pending_calls--;
+ if (client->ctdb->statistics.pending_calls > 0) {
+ ctdb->statistics.pending_calls--;
+ }
return;
}
@@ -352,7 +366,9 @@ static void daemon_request_call_from_client(struct
ctdb_client *client,
if (ret != 0) {
DEBUG(DEBUG_ERR,(__location__ " Unable to fetch record\n"));
- ctdb->statistics.pending_calls--;
+ if (client->ctdb->statistics.pending_calls > 0) {
+ ctdb->statistics.pending_calls--;
+ }
return;
}
@@ -360,7 +376,9 @@ static void daemon_request_call_from_client(struct
ctdb_client *client,
if (dstate == NULL) {
ctdb_ltdb_unlock(ctdb_db, key);
DEBUG(DEBUG_ERR,(__location__ " Unable to allocate dstate\n"));
- ctdb->statistics.pending_calls--;
+ if (client->ctdb->statistics.pending_calls > 0) {
+ ctdb->statistics.pending_calls--;
+ }
return;
}
dstate->start_time = timeval_current();
@@ -372,7 +390,9 @@ static void daemon_request_call_from_client(struct
ctdb_client *client,
if (call == NULL) {
ctdb_ltdb_unlock(ctdb_db, key);
DEBUG(DEBUG_ERR,(__location__ " Unable to allocate call\n"));
- ctdb->statistics.pending_calls--;
+ if (client->ctdb->statistics.pending_calls > 0) {
+ ctdb->statistics.pending_calls--;
+ }
ctdb_latency(ctdb_db, "call_from_client 1",
&ctdb->statistics.max_call_latency, dstate->start_time);
return;
}
@@ -393,7 +413,9 @@ static void daemon_request_call_from_client(struct
ctdb_client *client,
if (state == NULL) {
DEBUG(DEBUG_ERR,(__location__ " Unable to setup call send\n"));
- ctdb->statistics.pending_calls--;
+ if (client->ctdb->statistics.pending_calls > 0) {
+ ctdb->statistics.pending_calls--;
+ }
ctdb_latency(ctdb_db, "call_from_client 2",
&ctdb->statistics.max_call_latency, dstate->start_time);
return;
}
--
CTDB repository