From 5ad91a0781a91bc097e6e1f1bd5a9de79625fa90 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Mon, 12 Oct 2009 13:54:08 -0400 Subject: Add a sleep() prior to calling tasks to ensure postop writes are done We were seeing a rare deadlock of DS when creating the memberOf task because one thread was adding memberOf in a postop while another was trying to create an index and this was causing a PRLock deadlock. --- ipaserver/install/ldapupdate.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ipaserver/install/ldapupdate.py') diff --git a/ipaserver/install/ldapupdate.py b/ipaserver/install/ldapupdate.py index 3d97f2222..c90f153db 100644 --- a/ipaserver/install/ldapupdate.py +++ b/ipaserver/install/ldapupdate.py @@ -265,6 +265,9 @@ class LDAPUpdate: def create_index_task(self, attribute): """Create a task to update an index for an attribute""" + # Sleep a bit to ensure previous operations are complete + time.sleep(5) + r = random.SystemRandom() # Refresh the time to make uniqueness more probable. Add on some -- cgit