#8168 Remove TreesDoc usage

v1.8.0
closed
indexless (10)
General
nobody
2018-02-05
2017-10-17
No

I think we can remove the TreesDoc model and its mongo collection which can be quite large. [#7828] did some prior analysis. My current analysis is that some tests & scripts will have to be updated, but generally everything should keep working. Proof of concept is in branch db/remove_treestuff.

The TreesDoc model is used in some LastCommitDoc "refresh" logic currently. Should be able to remove that and/or replace it with calls to the lazy computation of LastCommitDocs. The only sticking point, I think, is that TreesDoc provides a mapping of commit_id to tree_id so that some cleanup knows what TreeDoc records can be deleted. So those would likely never be able to be cleaned up properly. Maybe ok, removing them is very infrequent - only for doing full repo refreshes, not even done when projects are removed (esp. since tree info can be shared across repos/forks)

Related

Tickets: #7828

Discussion

  • Dave Brondsema

    Dave Brondsema - 2017-10-23
    • status: open --> review
    • assigned_to: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2017-10-23

    {allura,forgehg}:db/8168

    To test this, use Git, SVN and Hg. If you have existing test repos, rename the repo_trees collection so it isn't used at all. Then push commits, and browse through the repo - in different dirs and at different commits/branches. Commit views and history views should be unaffected, don't need to test those much really - just the file/folder listings. Forked repos, and also merge commits might be good situations to test too.

    Refresh a full repo like: paster script conf.ini allura/scripts/refreshrepo.py -- --nbhd /p/ --project test --clean --all --mount-point foobar

    And this script rebuilds the "last commit" docs, although it isn't really used for anything, so not too important. paster script conf.ini allura/scripts/refresh_last_commits.py -- --nbhd /p/ --project test --mount-point git2 --clean

     
  • Kenton Taylor

    Kenton Taylor - 2017-10-25
    • status: review --> closed
     
  • Dave Brondsema

    Dave Brondsema - 2018-02-05
    • Milestone: unreleased --> v1.8.0
     

Log in to post a comment.