[interchange-cvs] interchange - markj modified
lib/Vend/SessionFile.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Mon Dec 3 20:57:45 EST 2007
User: markj
Date: 2007-12-04 01:57:44 GMT
Modified: lib/Vend SessionFile.pm
Log:
* Unlinking the existing session file before re-writing it causes a race
condition in the FETCH method, where if it checks with a concurrent request
on the same session while the file is missing, the failure causes Interchange
to create a new session for the user. As long as the file exists continuously,
the lock kicks in and concurrent requests serialize appropriately.
Revision Changes Path
2.7 +2 -3 interchange/lib/Vend/SessionFile.pm
rev 2.7, prev_rev 2.6
Index: SessionFile.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/SessionFile.pm,v
retrieving revision 2.6
retrieving revision 2.7
diff -u -r2.6 -r2.7
--- SessionFile.pm 9 Aug 2007 13:40:54 -0000 2.6
+++ SessionFile.pm 4 Dec 2007 01:57:44 -0000 2.7
@@ -1,6 +1,6 @@
# Vend::SessionFile - Stores Interchange session information in files
#
-# $Id: SessionFile.pm,v 2.6 2007/08/09 13:40:54 pajamian Exp $
+# $Id: SessionFile.pm,v 2.7 2007/12/04 01:57:44 markj Exp $
#
# Copyright (C) 2002-2007 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -29,7 +29,7 @@
use Vend::Util;
use vars qw($VERSION);
-$VERSION = substr(q$Revision: 2.6 $, 10);
+$VERSION = substr(q$Revision: 2.7 $, 10);
my $SessionDir;
my $CommDir;
@@ -121,7 +121,6 @@
#::logDebug("store $key");
$SessionFile = keyname($key);
$SessionLock = $SessionFile . ".lock";
- unlink $SessionFile;
#::logDebug("store session=$key HaveLock=$HaveLock{$SessionFile}");
unless ($HaveLock{$SessionFile}) {
$Lh = gensym();
More information about the interchange-cvs
mailing list