You do still need to lock shared scope variables that would have a risk of
race conditions.  Why you don't run into problems with that on CF 4.5 is
beyond me, but a simple cflock should fix it right up.

Timothy Heald
Web Portfolio Manager
Overseas Security Advisory Council
U.S. Department of State
571.345.2319

The opinions expressed here do not necessarily reflect those of the U.S.
Department of State or any affiliated organization(s).  Nor have these
opinions been approved or sanctioned by these organizations. This e-mail is
unclassified based on the definitions in E.O. 12958.

-----Original Message-----
From: Reuter, Jason D (James Tower) [mailto:[EMAIL PROTECTED]
Sent: Friday, November 14, 2003 5:35 PM
To: CF-Talk
Subject: Cold Fusion MX - Looping over application Structure

Background:
I have been working with my QA group comparing performance running in a Cold
Fusion 4.5 environment verses a Cold Fusion MX environment.  The load test
of the application in CF 4.5 went through without a problem.  However, when
the application was migrated to CF MX 6.1, QA found that the sites started
to become unstable and strange errors occurred.  I have been able to isolate
the cause down to a specific discrepancy between how CF 4.5 handles looping
over an application structure verses CF MX.

Code Summary:
The page basically caches a query results by assigning it to an application
structure.  After assigning the application structure to a local variable
(qGetItems), the structure is looped over and the field is outputted to the
screen.

The results work great until two requests run the page at the exact same
time.  What appears to be happening is in Cold Fusion MX, the application
scope assigns a single Iterator across the application structure that is
shared to everyone.  So in the case of two requests hitting the loop at the
same time, the two (or more) simultaneous requesters only get a partial
results set.  Example, Requester A and Requester B hit the page that returns
a total of 300 records to the screen.  They hit the page at the same time
and Requester A sees 200 records and Requester B sees 100 records.  Other
times, all records are returned, but not in the correct sequence.

  _____  


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to