• 
      

    Add a condensediffs management command for condensing stored diff data.

    Review Request #5138 — Created Dec. 18, 2013 and submitted — Latest diff uploaded

    Information

    Review Board
    master

    Reviewers

    Add a condensediffs management command for condensing stored diff data.

    Review Board 1.7 introduced deduping of new diffs, but older diffs
    remained duplicated in the database. This would add up, particularly
    when using parent diffs or when uploading multiple revisions of diffs
    containing many files unchanged between revisions.

    This introduces a condensediffs command that performs the deduping logic
    for all older diffs. This operation is safe to perform while the
    database is running, and should be safe to terminate if needed. The
    actual logic for all this is in the new FileDiffManager.

    Upon completion, the command will display the amount of bytes saved as a
    before/after comparison and as a percentage of reduction.

    rb-site upgrade will recommend that users run this if they have any
    unmigrated data as well.

    This will be backported to 1.7.x, after the migrate-on-access code is
    backported.

    Ran this against my test database and a copy of the reviews.reviewboard.org
    database. The migrations were successful and the review requests seemed fine.