summaryrefslogtreecommitdiffstats
path: root/ipaserver
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2009-10-12 13:54:08 -0400
committerRob Crittenden <rcritten@redhat.com>2009-10-16 14:57:53 -0400
commit5ad91a0781a91bc097e6e1f1bd5a9de79625fa90 (patch)
tree241aea0b7e758e46e716906bd16bcec49b1a5c1e /ipaserver
parentcc23838db298b763a56ce971916c29ed4ab91611 (diff)
downloadfreeipa-5ad91a0781a91bc097e6e1f1bd5a9de79625fa90.tar.gz
freeipa-5ad91a0781a91bc097e6e1f1bd5a9de79625fa90.tar.xz
freeipa-5ad91a0781a91bc097e6e1f1bd5a9de79625fa90.zip
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.
Diffstat (limited to 'ipaserver')
-rw-r--r--ipaserver/install/ldapupdate.py3
1 files changed, 3 insertions, 0 deletions
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