[PATCH] dbwrap_ctdb: Treat empty records as non-existing

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Sep 3 20:22:43 CEST 2013

On Fri, Aug 30, 2013 at 09:24:03PM +0200, Christian Ambach wrote:
> I still feel that we should add the attached patch.
> The absence of level 0 logs does not mean that everything is correct now :)
> Imagine the following flow:
> 1. File gets opened first time => TDB entry gets created
> 2. File gets closed => destructor will delete the record,
> db_ctdb_delete() will simply store it as empty and send deletion request
> to CTDB
> 3. Before vacuuming kicks in, file gets re-opened
> 4. fetch_share_mode_locked (and also fetch_share_mode_unlocked) will
> call parse_share_modes on empty record, leading the code into
> parse_share_modes while it should have gone into fresh_share_mode_lock.
> I verified that this happens, however I am not sure about the results
> and side-effects. The fresh marker will definitely be set to the wrong

Can you show me the callstack where it happens? We should
prevent it within dbwrap_ctdb.c.


SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de

visit us on it-sa:IT security exhibitions in Nürnberg, Germany
October 8th - 10th 2013, hall 12, booth 333
free tickets available via code 270691 on: www.it-sa.de/gutschein

More information about the samba-technical mailing list