Closed Bug 619222 Opened 15 years ago Closed 12 years ago

Too many files in one folder - media/uploads/avatars

Categories

(support.mozilla.org :: Code Quality, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID
Future

People

(Reporter: paulc, Unassigned)

References

Details

We've got over 150,000 files in a single folder on Kitsune post-2.4. We should probably partition that somehow to avoid nightmare ls-es and other such pests :)
I don't want to move all the existing files, but we could partition new uploads based on username[0] or something.
Component: General → Users and Groups
QA Contact: general → users
Target Milestone: Future → 2011Q1
Target Milestone: 2011Q1 → 2011Q2
Target Milestone: 2011Q2 → 2011Q3
We should make the RenameFileStorage code partition all uploads based on the hash it creates, but do it in two levels, to make the avatars remotely manageable. E.g. 1) Upload a file 'foo.jpg' 2) It gets renamed to '2011-02-04-12-31-27-376b10.jpg' 3) Take the hash at the end and prepend '3/7/' to the file name. So, '2011-02-04-12-31-27-376b10.jpg' would get stored in '3/7/2011-02-04-12-31-27-376b10.jpg', within whatever folder it was originally going to. If it was avatars, it would be media/uploads/avatars/3/7/2011-02-04-12-31-27-376b10.jpg, if it was a gallery image, it would be media/uploads/gallery/images/3/7/2011-02-04-12-31-27-376b10.jpg.
Assignee: nobody → willkg
Target Milestone: 2011Q3 → 2012Q1
Moving all 2012Q1 bugs to Future.
Target Milestone: 2012Q1 → Future
paulc, is this still a problem? I'm afraid to look :)
Flags: needinfo?(paul+moz)
I'm pretty sure this is still a problem. We haven't changed anything on our end.
Flags: needinfo?(paul+moz)
Unassigning myself--this isn't something I'm working on.
Assignee: willkg → nobody
No longer blocks: 630698
We aren't handling avatars on our end anymore.
Status: NEW → RESOLVED
Closed: 12 years ago
Component: Users and Groups → Code Quality
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.