Sanados,

I have been considering a similar situation for my work.  
The only time I want mogilefs to delete a fid is if there is a
replacement file.  Even then, I would appreciate some revision history
of the replacement in case I need to back trace an unknown issue arising
in the future.

I tried running mogilefsd with 'delete_jobs = 0' and this did the trick.
The table of file_to_delete spools up and nothing seemed to delete the
files.  

This was fine except that, since the row from 'file' was removed, There
was nothing left to describe the item queued for deletion.  All that was
left was a fid and some devices.  

I like the new domain idea.  This would probably be best for recording
cmd_delete records only.  But, you may not have a dupe dmid/dkey so this
does not allow the revision history that I am looking for.

The tact that I chose was to patch FID Store and Work/* to record
history.  I opted out of using a plugin because I wanted to record a
reason for the deletion with the fid history.  E.g. cmd_delete vs. dupe
dkey etc.   A plugin didn't provide a big enough hook.  

I then intend to put together an offline process to perform deletions
for items that were marked for deletion with timestamps significantly in
the past and with deletion reasons that make me feel comfortable.

A plugin sample that addresses the situation, similar to the manner that
I chose, is attached.  I should note, that I only wrote the plugin; I
did not test it.  So, if asked about it later, I may choose to deny any
participation to save myself from embarrassment.  Treat it as reference
only.






-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of sanados
Sent: Sunday, February 03, 2008 11:20 PM
To: Mark Smith
Cc: [email protected]
Subject: Re: delete_later (backup purpose)

Mark Smith wrote:
>> It should be pretty easy to add a plugin hook to mogilefs to allow 
>> delete's to move files into either a separate mogilefs domain (hidden

>> from the app! Still controlled by mogilefs!), or journaled to another

>> storage device. I think that's more along the lines of what you'd
want.
>>     
>
> Yeah, if anything this could be a plugin, I don't think "delete later"
> really has much use in the core.  The delete operation is async 
> anyway, so you won't gain any speed, and depending on MogileFS to 
> delete your file later doesn't feel right to me, FWIW.
>
> But if you put together a plugin, I don't see why this couldn't be 
> distributed with the base distribution.  (I'm a big fan of plugins, as

> you can tell...)
>   
When you can give me a documentation for the api i would write a plug
in.
(or just an example plug-in?)
>
>   

Attachment: OrphanDeletions.pm
Description: OrphanDeletions.pm

Reply via email to