[PATCH] ctdb: show lmaster in ctdb cat[t]db
amitay at gmail.com
Wed Sep 12 00:56:06 UTC 2018
On Tue, Sep 11, 2018 at 4:24 PM, Ralph Böhme <slow at samba.org> wrote:
> A few times when trying to understand how a record was bouncing around
> between nodes, I found it helpful to have a patched ctdb catdb that show the
> lmaster of a record.
> # ctdb catdb test_per_rec_persistency.tdb
> key(3) = "foo"
> dmaster: 0
> lmaster: 1
> rsn: 2
> flags: 0x00000000
> data(3) = "bar"
> Dumped 1 records
> Would this be useful upstream?
It's a good idea in general.
> Patch attached, please review & push if happy.
The logic for calculation of lmaster is a bit more involved than using
the number of nodes in the cluster.
The nodes can be inactive, in which case they have be ignored from the
Also, nodes can be deleted so, nodemap might have holes.
As a first approximation the patch will produce the correct output in
most scenarios, but I would prefer it not generate wrong output at any
More information about the samba-technical