ctdb and tombstones in persistent dbs

Amitay Isaacs amitay at gmail.com
Mon May 21 02:44:21 UTC 2018


On Mon, May 21, 2018 at 3:16 AM, Ralph Böhme via samba-technical
<samba-technical at lists.samba.org> wrote:
> Hi folks,
>
> I just noticed that we don't delete records in the *persistent* dbs, but instead
> store tombstones (empty records). Is there any reason for this?

Yes, for historic reasons we did not delete empty records from
persistent db.  Nowadays there is no real need to keep empty records
in persistent databases.

Currently those records get removed only during recovery (commit
6ebcba49d049fccd1b33b35c8802ec3cf80264ac).

> When using persistent dbs for persistent handles, I get lots of tombstones in
> the persistent locking and smbXsrv_open_global dbs quite fast.

We can definitely remove the empty records as part of the transaction.
Since we didn't collect too many empty records in persistent databases
till now, there hasn't been any need for deleting those records at
transaction time.  The empty records would get purged at database
recovery and that was sufficient.  Also, the code where this change is
required is hairy and unless there was a need for it, I didn't want to
touch that code. :-)

Amitay.



More information about the samba-technical mailing list