]> git.sur5r.net Git - openldap/commitdiff
ITS#8063 don't block our own thread
authorHoward Chu <hyc@openldap.org>
Wed, 25 Feb 2015 05:44:07 +0000 (05:44 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 25 Feb 2015 05:44:07 +0000 (05:44 +0000)
servers/slapd/overlays/syncprov.c

index 9535d333c0b9e9b938e94ef756aea5004e844817..47a5ae9141d41ca9e7a4d19565b2bed7c4bfc01a 100644 (file)
@@ -2120,6 +2120,10 @@ syncprov_op_mod( Operation *op, SlapReply *rs )
                        mt->mt_tail = mi;
                        /* wait for this op to get to head of list */
                        while ( mt->mt_mods != mi ) {
+                               /* don't wait on other mods from the same thread */
+                               if ( mt->mt_mods->mi_op->o_threadctx == op->o_threadctx )
+                                       break;
+
                                ldap_pvt_thread_mutex_unlock( &mt->mt_mutex );
                                /* FIXME: if dynamic config can delete overlays or
                                 * databases we'll have to check for cleanup here.