[elephant-devel] Postmodern backend; are values ever removed from the blob table
Robert Synnott
rsynnott at gmail.com
Thu Dec 11 17:09:53 UTC 2008
2008/12/11 Henrik Hjelte <henrik at evahjelte.com>:
> I agree with Alex, just one perhaps obvious comment: I would have one
> transaction around cleaning up one blob-id, not a big transaction
> around cleaning up the whole blob table. If you do several
> transactions it doesn't lock up much, so it
> should be able to execute at the same time as a database is in production.
>
> I hope your code can be added to the postmodern backend.
>
> Thanks,
> Henrik
>
> ________
I can certainly provide it as a contrib, but as it stands, it is not
useful in all circumstances; it keeps track of the live bids using a
huge array of booleans, and for a sufficiently big database memory
would become a problem. It suits my database, however.
I have two other minor worries about this technique. First, it would
seem possible that if, say, we have slot1 in object1 which was set to
:some-opt at some time in the past, but is now totally unused by any
object, the blob row containing that would be considered dead; if
someone comes along while the cleanup is running and sets some slot to
:some-opt, then it will be in use again, but potentially get deleted
anyway, because it will have already been deemed dead. This isn't
really a problem for me; due to the nature of my dataset the chances
of this happening are remote, but I can imagine it'd be an issue for
some people.
Secondly, there's the possibility that somebody could put a bid in,
say, a serialized list. This would NOT be detected by the procedure
I've outlined, and the thing with that bid would be deleted if not
referred to elsewhere. Again, this isn't a problem for me, but
somebody else might potentially be doing it.
Beyond those, though, in the normal case I am correct to assume that a
blob entry can be considered totally unused if not referred to in
either slots or any tree?
Thanks
Rob
More information about the elephant-devel
mailing list