Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 371499

Summary: Allow to cancel tasks when leaving a page
Product: [ECD] Orion Reporter: Tomasz Zarna <tomasz.zarna>
Component: ServerAssignee: Anthony Hunter <ahunter.eclipse>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P4 CC: ahunter.eclipse
Version: 0.4Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Tomasz Zarna CLA 2012-02-14 09:59:14 EST
I wanted to examine remote branches of a repo. Went to the Repos page, branches section and clicked See More. The same page opened with a different resources ie branches, so far so good. It rendered quite fast, but to my surprise there was still a task running. It turned out to be a "Git Log" task from the previous page. Shoudn't there be a way to kill it when leaving a page. I'm no longer interested in its result.
Comment 1 Szymon Brandys CLA 2012-02-14 10:07:55 EST
I think it depends on what the task is. If it is just the one that populates the page, we should probably dismiss it. If it is Git clone started on the page, leave it.
Comment 2 Tomasz Zarna CLA 2012-02-14 10:17:48 EST
I don't think this is an enhancement request, having a bunch of these tasks running, could be a performance issue.
Comment 3 Malgorzata Janczarska CLA 2012-02-14 10:31:30 EST
(In reply to comment #2)
> I don't think this is an enhancement request, having a bunch of these tasks
> running, could be a performance issue.

OK, but this is for sure not for 0.4.
How do you see it? It's user that cancels the tasks, or are they cancelled by default on leaving the page?

(In reply to comment #1)
> I think it depends on what the task is. If it is just the one that populates
> the page, we should probably dismiss it. If it is Git clone started on the
> page, leave it.

We have some tasks marked as idempotent that are removed from the task list when data is loaded. I think we could use this information to cancel and remove them.
Comment 4 Tomasz Zarna CLA 2012-02-15 06:18:06 EST
(In reply to comment #3)
> How do you see it? It's user that cancels the tasks, or are they cancelled by
> default on leaving the page?

A task should be marked for cancel when there is no open page waiting for its result. On the other hand, once ETags[1] are implemented we could let the task finish, save the result and use it in the future.

[1] bug 339846, bug 338121, bug 338122
Comment 5 Malgorzata Janczarska CLA 2012-02-15 08:56:10 EST
(In reply to comment #4)
> A task should be marked for cancel when there is no open page waiting for its
> result.
I can agree on that for git log, bug what about Git Clone, Git Fetch? User may schedule operation that is long running (I believe clone operation can take and hour or more for very large repositories and bad connection), close the page and then return the next day to check the operation status.
Comment 6 Michael Rennie CLA 2017-01-10 15:46:35 EST
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:

https://dev.eclipse.org/mhonarc/lists/orion-dev/msg04002.html