Defect #1627
closed
database not cleaned when removing a repository
Added by Thomas Capricelli over 16 years ago.
Updated over 16 years ago.
Description
If i add a (big) repository to a project, the db table 'changes' is filled with lot of stuff.
Too much in my case. I've removed the repository from the project by unselecting 'repository' in the module list from the configuration.
After this the database is still very large. I've looked in the table 'changes' and all changes related to this repository is still there.
if that matters, the scm used is mercurial (1.0.1) and the database is sqlite3 (3.5.6)
looking on internet, i managed to do it this way:
sqlite3 mydb.sqlite3
delete from changes where changes.changeset_id in (select changesets.id from changesets where changesets.repository_id=12);
delete from changesets where changesets.repository_id=12;
Though i dont know if this is the right way of doing it.
(and still, i would prefer redmien to handle this for me)
I'm not able to reproduce. changes and changesets tables should be cleaned up by the application.
Did you get a timeout when removing the repository from the application ?
timeout : i can't remember, but it could be. I'm trying to reproduce it and will report.
- Status changed from New to Closed
- Target version set to 0.8
- Resolution set to Fixed
Removing a big repository could take a lot of time indeed.
Anyway, r1666 should fix it. Deletion is now done using 2 raw sql queries. Before that, one query was done for each changeset.
Thanks.
- Target version deleted (
0.8)
Hi Jean-Philippe. I updated to "Revision: 1666", did the rake thinguy and tested my website : everything works as expected.
I did the same manipulation as previously :
- add the huge repository (db size goes from 4mb to 63mb)
- remove the huge repository (db size unchanged)
To reduce the size, i had to manually edit the db ("sqlite3 production.db") and type "VACUUM;" which is the command for sqlite to clean up its data. I thought maybe you would want to issue this from redmine too. I understand this is highly dependant on the db and maybe this is difficult and/or not something you would want.
greatings.
- Target version set to 0.8
(i didn't mean to remove the target version, i think redmine did it, maybe some unitialized stuff somewhere?)
Also available in: Atom
PDF