Should the statement cfif isDefined(session.sessionid)
be locked?
Yes. It's a variable read, according to the CF Server product development
team.
'Full Checking' in CF admin does not object.
This is more a flaw with the Full Checking option than anything else. As far
as I can tell, Full
Indeed it does. But in all the instances I just saw (quick
review), it was also doing a cfset, which absolutely MUST
be locked.
See, what I want to do is simply this:
cfif isDefined(Session.isLoggedIn)
cfset Request.isLoggedIn = y
cfelse
cfset Request.isLoggedIn = n
cfset
Lock all application, server, and session scope variables ANY time they are referenced
- any read, write, or existence-check.
It's not a big performance hit at all - you can do your own basic timing tests to see
this.
Not locking will kill your server. Period.
Chris Norloff
--
referencing the pointer
to, not the actual value of, the session variable.
Chuck McElwee
etech solutions inc
www.etechsolutions.com
-Original Message-
From: Dave Watts [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 6:47 PM
To: CF-Talk
Subject: RE: CFLOCK all the time?
Should we
read through the thread UDF Question. It is directly related (although,
kinda long winded) to this topic, and can offer some insights.
-Original Message-
From: John Kivus [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 4:29 PM
To: CF-Talk
Subject: CFLOCK all the time?
We're
Should we CFLOCK every session and application variable
or just application variables?
Yes, you should lock every Session, Application and Server variable, in
every case in which you reference them.
I know that using CFLOCK can cause some performance
issues.
Actually, it's not using
solutions inc
www.etechsolutions.com
-Original Message-
From: Dave Watts [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 6:47 PM
To: CF-Talk
Subject: RE: CFLOCK all the time?
Should we CFLOCK every session and application variable
or just application variables?
Yes, you should
Chuck wrote:
Should the statement cfif isDefined(session.sessionid)
be locked?
You have to lock *everywhere* including here. This is a hole in CF's CFLOCK
auto-handling, and one of many reasons to lock manually.
---
Matt Robertson[EMAIL PROTECTED]
PM
To: CF-Talk
Subject: RE: CFLOCK all the time?
Chuck wrote:
Should the statement cfif isDefined(session.sessionid)
be locked?
You have to lock *everywhere* including here. This is a hole in CF's CFLOCK
auto-handling, and one of many reasons to lock manually
Thanks for the feedback. I suspect you're right. Nice looking website!
Chuck McElwee
etech solutions inc
www.etechsolutions.com
-Original Message-
From: Matt Robertson [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 7:54 PM
To: CF-Talk
Subject: RE: CFLOCK all the time
Subject: RE: CFLOCK all the time?
I just took another look at this article myself and noticed the same thing.
While isdefined isn't covered expressly, the CF manual pages it references
at bottom both use examples that lock session and application isdefined
cfifs
Yes (sigh) - lock em all. And as far as performance, unlocked variables may
initially cause your ap to run faster, but the random deadlocks are going to
hang it periodically - which makes your Server a sprinter (and you want a
marathon runner - trust me).
-Original Message-
From: John
Subject: RE: CFLOCK all the time?
Should we CFLOCK every session and application variable
or just application variables?
Yes, you should lock every Session, Application and Server variable, in
every case in which you reference them.
I know that using CFLOCK can cause some performance
13 matches
Mail list logo