Project

General

Profile

Actions

Defect #1627

closed

database not cleaned when removing a repository

Added by Thomas Capricelli almost 16 years ago. Updated almost 16 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
Start date:
2008-07-12
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

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.

Actions #1

Updated by Thomas Capricelli almost 16 years ago

if that matters, the scm used is mercurial (1.0.1) and the database is sqlite3 (3.5.6)

Actions #2

Updated by Thomas Capricelli almost 16 years ago

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)

Actions #3

Updated by Jean-Philippe Lang almost 16 years ago

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 ?

Actions #4

Updated by Thomas Capricelli almost 16 years ago

timeout : i can't remember, but it could be. I'm trying to reproduce it and will report.

Actions #5

Updated by Jean-Philippe Lang almost 16 years ago

  • 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.

Actions #6

Updated by Thomas Capricelli almost 16 years ago

  • 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 :
  1. add the huge repository (db size goes from 4mb to 63mb)
  2. 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.

Actions #7

Updated by Thomas Capricelli almost 16 years ago

  • 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?)

Actions

Also available in: Atom PDF