Create Attachments on the local filesystem
Mike Wille
kmw at phatness.com
Wed Oct 22 20:07:52 UTC 2003
On Oct 22, 2003, at 2:21 PM, David Miller wrote:
> On 10/22/2003 10:41 AM -0700, Myk Melez wrote:
>
>> Joel Peshkin wrote:
>>
>>> Implementing this is a completely seperate matter. Perhaps the right
>>> thing to do is to ....
>>> a) add a mechanism to permit large attachments to span many database
>>> records,
>>> b) permit a retention policy to be used for large attachments (e.g.
>>> Delete if obsolete > 6 months and size > 10MB and undownloaded > 6
>>> months and bug unchanged > 6 months)
>>
>> Another option is to abstract out attachment storage to an interface
>> that handles access to attachment data with implementations for
>> database
>> and filesystem storage. All implementations should be able to store
>> and
>> retrieve attachment data. Anything else (f.e. searching) would be
>> optional.
>
> Another benefit of having the data in the database is if you have
> multiple
> Bugzilla web servers accessing the same database. Only way around
> that if
> the attachments are in the filesystem is an NFS mount, which is a
> little
> sloppier.
>
> There seems to be a lot of benefits to both methods, so maybe we need
> some
> kind of local configuration option and allow either. (Or maybe have a
> flag
> on the attachment record and allow both on a per-attachment basis?)
While I disagree that NFS is a sloppier than storing in a DB*, I agree
that there is benefits to both methods. There should be an option to
use either. However, I think it should be mutually exclusive. You
shouldn't be storing attachments in both the database and filesystem at
the same time.
*If you have multiple web servers, you still need to provide a shared
mount point between all web servers. Otherwise, you have to duplicate
things like templates and report data stored on disk (unless that's
changed in 2.17.*). Why would that be sloppy to do it for attachments
as well? Correct me if I'm wrong, of course :)
-----------------
Mike Wille Code Poet, Provider of 42's
phatness.com
Command like a king, work like a slave, create like a god.
-----------------
More information about the developers
mailing list