changing the selected release while an ajax request is running in the background does not cancel the pending requests

Bug #1057591 reported by Steve Langasek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Errors
Triaged
High
Brian Murray

Bug Description

Launchpad querying being done asynchronously on errors.u.c means that the table of frequent crashes is updated in the background after the page loads. If you select a different release to view errors for while this thread is still running in the background, the thread is not cancelled. As a result, two different threads will be running to query launchpad data, for two different sets of crashes, and there's a race to see which one completes first. (And even if the race finishes in the right order, this results in excessive wibbling of the table since it will refresh twice, once with wrong data and once with the data you asked for.)

We somehow need these asynchronous lp queries to be cancelled when they are no longer relevant to what the user has requested.

It may save time to fix bug 1040140 at the same time as this bug.

Related branches

description: updated
Evan (ev)
Changed in errors:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Brian Murray (brian-murray) wrote :

I happened to run into this problem today when I was working on some rootfs build selection issues and found a solution in the YUI gallery, which I'll include in the error tracker.

https://yuilibrary.com/gallery-archive/gallery/show/datasource-manage-stale.html

Changed in errors:
assignee: nobody → Brian Murray (brian-murray)
status: Triaged → In Progress
summary: - changing the selected release while a launchpad ajax request is running
- in the background does not cancel the pending requests
+ changing the selected release while a ajax request is running in the
+ background does not cancel the pending requests
Revision history for this message
Brian Murray (brian-murray) wrote : Re: changing the selected release while a ajax request is running in the background does not cancel the pending requests

revno: 498
fixes bug: https://launchpad.net/bugs/1057591
committer: Brian Murray <email address hidden>
branch nick: trunk
timestamp: Tue 2014-08-12 17:02:20 -0700
message:
  most_common_problems.js: ensure that rootfs_build_version or device_image_version passed in the url options are used on the main page, additionally utilize a yui gallery module to ignore any stale requests when changing parameters

Revision history for this message
Brian Murray (brian-murray) wrote :

Well this worked in my testing environment but doesn't seem to be working after building the javascript and putting it on assets. It is there though:

https://assets.ubuntu.com/sites/errors/499/js/yui/build/gallery-datasource-manage-stale/manage-stale-min.js

Changed in errors:
status: In Progress → Triaged
Revision history for this message
Brian Murray (brian-murray) wrote :

This can be found in errors/static/js/most_common_problems.js, look for StaleRequests, and may actually work if we stop using assets.ubuntu.com.

summary: - changing the selected release while a ajax request is running in the
+ changing the selected release while an ajax request is running in the
background does not cancel the pending requests
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.