Opened 12 years ago

Closed 12 years ago

#4541 closed defect (fixed)

dojox.data.FlickrRestStore breaks sometimes when multiple simultaneous requests are performed

Reported by: sos Owned by: Jared Jurkiewicz
Priority: high Milestone: 1.0
Component: DojoX Data Version: 0.9
Keywords: dojox.data.FlickrRestStore Cc:
Blocked By: Blocking:

Description

If the dojox.data.FlickrRestStore? receives multiple requests using the same request object for different pages, before the first request has completed, it incorrectly caches the image data. The solution is to make a copy each request object that comes in.

Attachments (2)

dojox.data.copy-request.patch (788 bytes) - added by sos 12 years ago.
Patch to make a copy of each request object
dojox.data.copy-request_2.patch (1.5 KB) - added by sos 12 years ago.
UPdated patch to fix unit test failures

Download all attachments as: .zip

Change History (9)

Changed 12 years ago by sos

Patch to make a copy of each request object

comment:1 Changed 12 years ago by Jared Jurkiewicz

Are you covered under the dojo CLA?

comment:2 Changed 12 years ago by Jared Jurkiewicz

Nevermind, you are. Sorry, didn't get Shane O'Sullivan == sos. :-)

comment:3 Changed 12 years ago by Jared Jurkiewicz

CLA verified. Will apply patch.

comment:4 Changed 12 years ago by Jared Jurkiewicz

Paging tests fail with patch. I believe it is because you aren't cloning the query as well. See exception:

PASSED test: ReadAPI: Fetch_20_Streamingbootstrap.js (line 258) Exception is not defined [Break on this error] throw Exception("dojox.data.FlickrRestStore?: An API key must be specified.");

Please revisit patch and try to fix...

comment:5 Changed 12 years ago by Jared Jurkiewicz

In fact, that patch exposed another error in the store. :-) It should be throw new Error(), not throw Exception().

Changed 12 years ago by sos

UPdated patch to fix unit test failures

comment:6 Changed 12 years ago by sos

I've attached a new patch to fix the issues you found. You were right, thte query was not being cached, and neither were the _realStart and _realCount variables.

Shane

comment:7 Changed 12 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed

(In [10708]) Minor patch to dojox.data.FlickrRestStore?. fixes #4541

Note: See TracTickets for help on using tickets.