Commits

Anonymous committed 26a4682

Should fix serialization of parallel request on dog pile lock.

Comments (0)

Files changed (3)

beaker/container.py

 
     def get_creation_lock(self, key):
         return file_synchronizer(
-                    identifier = "dbmcontainer/funclock/%s" % self.namespace, 
+                    identifier = "dbmcontainer/funclock/%s/%s" % (
+                        self.namespace, key
+                    ),
                     lock_dir=self.lock_dir
                 )
 
 
     def get_creation_lock(self, key):
         return file_synchronizer(
-                identifier = "filecontainer/funclock/%s" % self.namespace, 
+                identifier = "dbmcontainer/funclock/%s/%s" % (
+                    self.namespace, key
+                ),
                 lock_dir = self.lock_dir
                 )
 

beaker/ext/database.py

 
     def get_creation_lock(self, key):
         return file_synchronizer(
-            identifier ="databasecontainer/funclock/%s" % self.namespace,
+            identifier ="databasecontainer/funclock/%s/%s" % (
+                self.namespace, key
+            ),
             lock_dir = self.lock_dir)
 
     def do_open(self, flags, replace):

beaker/ext/memcached.py

 
     def get_creation_lock(self, key):
         return file_synchronizer(
-            identifier="memcachedcontainer/funclock/%s" %
-                    self.namespace, lock_dir=self.lock_dir)
+            identifier="memcachedcontainer/funclock/%s/%s" %
+                    (self.namespace, key), lock_dir=self.lock_dir)
 
     def _format_key(self, key):
         return self.namespace + '_' + key.replace(' ', '\302\267')
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.