Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Fix sprint overviews for large projects #154

Merged
merged 20 commits into from Sep 16, 2015
Merged

Fix sprint overviews for large projects #154

merged 20 commits into from Sep 16, 2015

Conversation

jakobw
Copy link
Member

@jakobw jakobw commented Aug 31, 2015

Task on Phab: https://phabricator.wikimedia.org/T110330

There were two different problems with large projects.

  1. Timeouts on task transaction requests
    It is not possible to load all task transactions of large projects at once through Conduit (Phabricator's API). This was solved by fetching transactions in batches of 200. More details: https://phabricator.wikimedia.org/T109036
  2. Memory issues when processing/storing the transactions
    Loading all transactions is solved by loading them in batches, however, processing all the transactions consumes a lot of memory. This can be improved by filtering out irrelevant transactions. For snapshots it'll store all transactions regarding workboard and status changes so that switching between workboard and status mode still works. Unfortunately this still exceeded the memory limit for sprint overviews but can be that has been fixed by also removing status transactions in workboard mode and workboard transactions in status mode.

I deployed the changes to a test instance and you can check it out here: http://phragile-test.wmflabs.org/sprints/483

Snapshots are still somewhat broken for large projects unfortunately. For some reason they can be created but not read.
Snapshots are fixed in #155

Doing this would probably reduce memory consumption by a factor of 2 but
also break snapshots when switching between status and workboard mode.
In order to have working sprint snapshots while also avoiding
memory issues this will filter out all transactions except the ones that
are relevant for status and workboard changes when creating snapshots. Additionally a settings
aware filter was added to filter out even more transactions for live sprint
overviews according to the workboardMode settings to reduce memory
usage.
@jakobw jakobw changed the title Fix large sprint overviews for large projects Fix sprint overviews for large projects Aug 31, 2015
@Benestar
Copy link
Contributor

Benestar commented Sep 4, 2015

Would you mind splitting this into several small pull requests or at least re-submit #155 against master. That would make reviewing this stuff a lot easier. ;-)

@jakobw jakobw mentioned this pull request Sep 9, 2015
Benestar and others added 8 commits September 9, 2015 16:40
Doing this would probably reduce memory consumption by a factor of 2 but
also break snapshots when switching between status and workboard mode.
In order to have working sprint snapshots while also avoiding
memory issues this will filter out all transactions except the ones that
are relevant for status and workboard changes when creating snapshots. Additionally a settings
aware filter was added to filter out even more transactions for live sprint
overviews according to the workboardMode settings to reduce memory
usage.
@Benestar
Copy link
Contributor

Rebased to get the changes of #160 in here.

<?php
namespace Phragile;

/***
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we use only two starts in this project? Or is this inconsistent anyways?

@Benestar
Copy link
Contributor

This still does two things in a row that could possibly be split but I think if the mentioned comments get resolved/answered we can merge this :-)

@Benestar
Copy link
Contributor

For snapshots it'll store all transactions regarding workboard and status changes so that switching between workboard and status mode still works. Unfortunately this still exceeded the memory limit for sprint overviews but can be fixed by also removing status transactions in workboard mode and workboard transactions in status mode.

Does that mean that with this patch it is still impossible to view a sprint? Or to view a snapshot? Do we need to disable switching the mode for snapshots?

@jakobw
Copy link
Member Author

jakobw commented Sep 11, 2015

@Benestar It's possible to view sprints and snapshots with this patch :)
Wording was a bit off there. It is actually removing all irrelevant transactions now for live sprint overviews and only keeping the ones for status and workboard transactions on snapshots.

@jakobw
Copy link
Member Author

jakobw commented Sep 16, 2015

@Benestar It would be awesome if you could have another look at this :)

Benestar added a commit that referenced this pull request Sep 16, 2015
Fix sprint overviews for large projects
@Benestar Benestar merged commit 0b4e9d8 into master Sep 16, 2015
@Benestar Benestar deleted the large_projects_fix branch September 16, 2015 10:45
@Benestar
Copy link
Contributor

I just noticed that http://phragile-test.wmflabs.org/sprints/782 looks very strange. But at least it loads something!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants