ctdb and tombstones in persistent dbs

Amitay Isaacs amitay at gmail.com
Tue May 22 02:08:52 UTC 2018


On Mon, May 21, 2018 at 9:02 PM, Ralph Böhme <slow at samba.org> wrote:
> On Mon, May 21, 2018 at 12:44:21PM +1000, Amitay Isaacs wrote:
>> 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.
>
> ok, glad to hear that. :)
>
>> 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. :-)
>
> I tried it myself, cf the attached patch but that ended up in a disaster. :)
> Somehow the deletion triggered a ctdb recovery, so I gave up on it for now.

I can imagine why.  That's the wrong place for the fix! :-)

If it's not urgent I can do the patch around SambaXP time.

Amitay.



More information about the samba-technical mailing list