[Samba] CTDB and locking issues in 4.4.6 (Classic domain)
Ralph Böhme
slow at samba.org
Fri Oct 21 09:52:32 UTC 2016
On Fri, Oct 21, 2016 at 10:30:46AM +0100, Alex Crow via samba wrote:
> Interestingly I have a setup here for testing for rollout of S4 AD. The file
> servers are in an AD domain and are running Sernet 4.4.5, so one version
> older than production.
maybe it's related to bug 12005 that was fixed in 4.4.6? Can you test
with attached patch that reverts the change?
Cheerio!
-slow
-------------- next part --------------
From 13f8c39a46d525c10251800445b41eea88c8f2a9 Mon Sep 17 00:00:00 2001
From: Ralph Boehme <slow at samba.org>
Date: Fri, 21 Oct 2016 11:46:51 +0200
Subject: [PATCH] Revert "dbwrap_ctdb: treat empty records in ltdb as
non-existing"
This reverts commit 8620c56e3d8df5412aa63ce391b61ec5de2964dd.
---
source3/lib/dbwrap/dbwrap_ctdb.c | 27 +--------------------------
1 file changed, 1 insertion(+), 26 deletions(-)
diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c
index 5915444..d5b8f45 100644
--- a/source3/lib/dbwrap/dbwrap_ctdb.c
+++ b/source3/lib/dbwrap/dbwrap_ctdb.c
@@ -1216,7 +1216,6 @@ struct db_ctdb_parse_record_state {
void *private_data;
bool ask_for_readonly_copy;
bool done;
- bool empty_record;
};
static void db_ctdb_parse_record_parser(
@@ -1236,16 +1235,7 @@ static void db_ctdb_parse_record_parser_nonpersistent(
(struct db_ctdb_parse_record_state *)private_data;
if (db_ctdb_can_use_local_hdr(header, true)) {
- /*
- * A record consisting only of the ctdb header can be
- * a validly created empty record or a tombstone
- * record of a deleted record (not vacuumed yet). Mark
- * it accordingly.
- */
- state->empty_record = (data.dsize == 0);
- if (!state->empty_record) {
- state->parser(key, data, state->private_data);
- }
+ state->parser(key, data, state->private_data);
state->done = true;
} else {
/*
@@ -1271,7 +1261,6 @@ static NTSTATUS db_ctdb_parse_record(struct db_context *db, TDB_DATA key,
state.parser = parser;
state.private_data = private_data;
- state.empty_record = false;
if (ctx->transaction != NULL) {
struct db_ctdb_transaction_handle *h = ctx->transaction;
@@ -1303,20 +1292,6 @@ static NTSTATUS db_ctdb_parse_record(struct db_context *db, TDB_DATA key,
status = db_ctdb_ltdb_parse(
ctx, key, db_ctdb_parse_record_parser_nonpersistent, &state);
if (NT_STATUS_IS_OK(status) && state.done) {
- if (state.empty_record) {
- /*
- * We know authoritatively, that this is an empty
- * record. Since ctdb does not distinguish between empty
- * and deleted records, this can be a record stored as
- * empty or a not-yet-vacuumed tombstone record of a
- * deleted record. Now Samba right now can live without
- * empty records, so we can safely report this record
- * as non-existing.
- *
- * See bugs 10008 and 12005.
- */
- return NT_STATUS_NOT_FOUND;
- }
return NT_STATUS_OK;
}
--
2.7.4
More information about the samba
mailing list