|
|
a2f18f |
From 0ad9acb61f83244af02081ffd79c350af831f21c Mon Sep 17 00:00:00 2001
|
|
|
b161c9 |
From: Ludwig Krispenz <lkrispen@redhat.com>
|
|
|
b161c9 |
Date: Thu, 18 Jun 2015 15:22:54 +0200
|
|
|
a2f18f |
Subject: [PATCH 2/2] Ticket 48195 - Slow replication when deleting large
|
|
|
b161c9 |
quantities of multi-valued attributes
|
|
|
b161c9 |
|
|
|
b161c9 |
https://fedorahosted.org/389/ticket/48195
|
|
|
b161c9 |
|
|
|
b161c9 |
In update resoultion for entry deletion, there is still use of valuearray_find() to find an existingvalue to update its csn.
|
|
|
b161c9 |
with the fix for ticket #346 there exists slapi_valueset_find() which uses the possibility to do a binary search on the
|
|
|
b161c9 |
values.
|
|
|
b161c9 |
Fix: do not use valuearray_find
|
|
|
b161c9 |
|
|
|
b161c9 |
Review: Rich, Thanks
|
|
|
b161c9 |
(cherry picked from commit 09ab8c799fc3d87db7a5b3aa07eccf9b41ea43d5)
|
|
|
b161c9 |
(cherry picked from commit a980b795ac03200fd01a2d05ce568691681d50ef)
|
|
|
b161c9 |
---
|
|
|
b161c9 |
ldap/servers/slapd/valueset.c | 8 ++++----
|
|
|
b161c9 |
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
b161c9 |
|
|
|
b161c9 |
diff --git a/ldap/servers/slapd/valueset.c b/ldap/servers/slapd/valueset.c
|
|
|
a2f18f |
index 73208f5..0cf3ded 100644
|
|
|
b161c9 |
--- a/ldap/servers/slapd/valueset.c
|
|
|
b161c9 |
+++ b/ldap/servers/slapd/valueset.c
|
|
|
a2f18f |
@@ -1411,12 +1411,12 @@ valueset_update_csn_for_valuearray_ext(Slapi_ValueSet *vs, const Slapi_Attr *a,
|
|
|
b161c9 |
int del_index = -1, del_count = 0;
|
|
|
b161c9 |
for (i=0;valuestoupdate[i]!=NULL;++i)
|
|
|
b161c9 |
{
|
|
|
b161c9 |
- int index= valuearray_find(a, vs->va, valuestoupdate[i]);
|
|
|
b161c9 |
- if(index!=-1)
|
|
|
b161c9 |
+ Slapi_Value *v = slapi_valueset_find(a, vs, valuestoupdate[i]);
|
|
|
b161c9 |
+ if(v)
|
|
|
b161c9 |
{
|
|
|
b161c9 |
- value_update_csn(vs->va[index],t,csn);
|
|
|
b161c9 |
+ value_update_csn(v,t,csn);
|
|
|
b161c9 |
if (csnref_updated)
|
|
|
b161c9 |
- valuestoupdate[i]->v_csnset = (CSNSet *)value_get_csnset(vs->va[index]);
|
|
|
b161c9 |
+ valuestoupdate[i]->v_csnset = (CSNSet *)value_get_csnset(v);
|
|
|
b161c9 |
valuearrayfast_add_value_passin(&vaf_valuesupdated,valuestoupdate[i]);
|
|
|
b161c9 |
valuestoupdate[i]= NULL;
|
|
|
b161c9 |
del_count++;
|
|
|
b161c9 |
--
|
|
|
b161c9 |
1.9.3
|
|
|
b161c9 |
|