diff roundup/hyperdb.py @ 690:509a101305da

node ids are now generated from a lockable store - no more race conditions We're using the portalocker code by Jonathan Feinberg that was contributed to the ASPN Python cookbook. This gives us locking across Unix and Windows.
author Richard Jones <richard@users.sourceforge.net>
date Mon, 15 Apr 2002 23:25:15 +0000
parents 5a4dd342d827
children fed4c363a7f3
line wrap: on
line diff
--- a/roundup/hyperdb.py	Mon Apr 15 06:37:31 2002 +0000
+++ b/roundup/hyperdb.py	Mon Apr 15 23:25:15 2002 +0000
@@ -15,7 +15,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 # 
-# $Id: hyperdb.py,v 1.62 2002-04-03 07:05:50 richard Exp $
+# $Id: hyperdb.py,v 1.63 2002-04-15 23:25:15 richard Exp $
 
 __doc__ = """
 Hyperdatabase implementation, especially field types.
@@ -353,7 +353,7 @@
             raise DatabaseError, 'Database open read-only'
 
         # new node's id
-        newid = str(self.count() + 1)
+        newid = self.db.newid(self.classname)
 
         # validate propvalues
         num_re = re.compile('^\d+$')
@@ -1127,6 +1127,10 @@
 
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.62  2002/04/03 07:05:50  richard
+# d'oh! killed retirement of nodes :(
+# all better now...
+#
 # Revision 1.61  2002/04/03 06:11:51  richard
 # Fix for old databases that contain properties that don't exist any more.
 #

Roundup Issue Tracker: http://roundup-tracker.org/