Rev 612: merged debug patch from volker in
http://samba.org/~tridge/3_0-ctdb
tridge at samba.org
tridge at samba.org
Fri Aug 31 04:08:31 GMT 2007
------------------------------------------------------------
revno: 612
revision-id: tridge at samba.org-20070831040830-1y73u929n415jo2o
parent: tridge at samba.org-20070831040053-4pmk9tddhgkgdafj
parent: vl at samba.org-20070830123350-suiuveayvu3jifn1
committer: Andrew Tridgell <tridge at samba.org>
branch nick: s3-ctdb-tridge
timestamp: Fri 2007-08-31 14:08:30 +1000
message:
merged debug patch from volker
modified:
source/lib/dbwrap_ctdb.c dbwrap_ctdb.c-20070415131935-89u7zduywa3g216g-1
------------------------------------------------------------
revno: 609.1.1
merged: vl at samba.org-20070830123350-suiuveayvu3jifn1
parent: tridge at samba.org-20070828045310-67kldqcfrp4pmi0c
committer: Volker Lendecke <vl at samba.org>
branch nick: samba_3_0_ctdb
timestamp: Thu 2007-08-30 14:33:50 +0200
message:
Log at debug level 0 if smbd fails to lock a migrated record more
than 10 times for a single fetch_lock call
=== modified file 'source/lib/dbwrap_ctdb.c'
--- a/source/lib/dbwrap_ctdb.c 2007-06-03 03:51:12 +0000
+++ b/source/lib/dbwrap_ctdb.c 2007-08-30 12:33:50 +0000
@@ -102,6 +102,7 @@
struct db_ctdb_rec *crec;
NTSTATUS status;
TDB_DATA ctdb_data;
+ int migrate_attempts = 0;
if (!(result = talloc(mem_ctx, struct db_record))) {
DEBUG(0, ("talloc failed\n"));
@@ -162,6 +163,8 @@
tdb_chainunlock(ctx->wtdb->tdb, key);
talloc_set_destructor(result, NULL);
+ migrate_attempts += 1;
+
DEBUG(10, ("ctdb_data.dptr = %p, dmaster = %u (%u)\n",
ctdb_data.dptr, ctdb_data.dptr ?
((struct ctdb_ltdb_header *)ctdb_data.dptr)->dmaster : -1,
@@ -178,6 +181,11 @@
goto again;
}
+ if (migrate_attempts > 10) {
+ DEBUG(0, ("db_ctdb_fetch_locked needed %d attempts\n",
+ migrate_attempts));
+ }
+
memcpy(&crec->header, ctdb_data.dptr, sizeof(crec->header));
result->value.dsize = ctdb_data.dsize - sizeof(crec->header);
More information about the samba-cvs
mailing list