プロジェクト

全般

プロフィール

Vote #63600

完了

database not cleaned when removing a repository

Admin Redmine さんがほぼ2年前に追加. ほぼ2年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
SCM_3
対象バージョン:
開始日:
2008/07/12
期日:
進捗率:

0%

予定工数:
category_id:
3
version_id:
2
issue_org_id:
1627
author_id:
1096
assigned_to_id:
0
comments:
7
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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.


journals

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:

<pre>
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;
</pre>

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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
(i didn't mean to remove the target version, i think redmine did it, maybe some unitialized stuff somewhere?)
--------------------------------------------------------------------------------

Admin Redmine さんがほぼ2年前に更新

  • カテゴリSCM_3 にセット
  • 対象バージョン0.8_2 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0