diff options
author | Tim Beale <timbeale@catalyst.net.nz> | 2019-07-31 10:33:49 +1200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2019-08-26 07:06:18 +0000 |
commit | 18fb5fb911d098701e4af732977310e48ed403a9 (patch) | |
tree | 2c13979272950e50d25ac2a01fa2c27e71813c4d /lib | |
parent | 1c2f1bd04abbedb3cfb31bb4a0ee4292c21dacc4 (diff) | |
download | samba-18fb5fb911d098701e4af732977310e48ed403a9.tar.gz |
ldb: Log the partition we're repacking
Firstly, with Samba AD this looks a little weird because we log the same
message 5 times (once for every partition). If we log that we're doing
this to records in different partitions, hopefully someone with a little
Samba knowledge can figure out what's going on.
Secondly, the info about what partitions are actually changing might be
useful. E.g. if we hit a fatal error repacking the 3rd partition, and
the transaction doesn't abort properly, then it would be useful to know
what partitions were repacked and which ones weren't.
There doesn't appear to be a useful name for the partition
(ldb_kv->kv_ops->name() doesn't seem any more intelligible to a user),
so just log the first record that we update. We can use that to infer
the partition database).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059
Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
(cherry picked from commit ee6537c29e747206ee607493ce15d4532fb670c8)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ldb/ldb_key_value/ldb_kv_index.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ldb/ldb_key_value/ldb_kv_index.c b/lib/ldb/ldb_key_value/ldb_kv_index.c index 27454d3f734..d955517ea10 100644 --- a/lib/ldb/ldb_key_value/ldb_kv_index.c +++ b/lib/ldb/ldb_key_value/ldb_kv_index.c @@ -3584,9 +3584,11 @@ static int re_pack(struct ldb_kv_private *ldb_kv, */ if ((!ctx->normal_record_seen) && (!ldb_dn_is_special(msg->dn))) { ldb_debug(ldb, LDB_DEBUG_ALWAYS_LOG, - "Repacking database from v%u to v%u format", + "Repacking database from v%u to v%u format " + "(first record %s)", displayable_pack_version(ctx->old_version), - displayable_pack_version(ldb_kv->pack_format_version)); + displayable_pack_version(ldb_kv->pack_format_version), + ldb_dn_get_linearized(msg->dn)); ctx->normal_record_seen = true; } |