ldb: Log the partition we're repacking
authorTim Beale <timbeale@catalyst.net.nz>
Tue, 30 Jul 2019 22:33:49 +0000 (10:33 +1200)
committerTim Beale <timbeale@catalyst.net.nz>
Mon, 19 Aug 2019 22:04:33 +0000 (10:04 +1200)
commit0c0418037f206fa544435576451f6009f4595387
treebcb453ec04776e7005dcd6a0d3c36733189e8104
parentd14eb4226cdf99217ae13ca0c4aaa7607c58daf5
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>
lib/ldb/ldb_key_value/ldb_kv_index.c