6.0.0-beta1
10/16/25

[#7478] adding contact to chained ldap slave server causes error message
Summary adding contact to chained ldap slave server causes error message
Queue Turba
Queue Version 2.3
Type Bug
State Resolved
Priority 1. Low
Owners chuck (at) horde (dot) org
Requester robb (at) wtg (dot) cw (dot) com
Created 10/11/2008 (6214 days ago)
Due
Updated 10/25/2008 (6200 days ago)
Assigned 10/25/2008 (6200 days ago)
Resolved 10/25/2008 (6200 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
10/25/2008 01:32:03 AM Chuck Hagenbuch Comment #14
State ⇒ Resolved
Reply to this comment
Done for 2.3.1.
10/25/2008 12:33:11 AM Chuck Hagenbuch Comment #12
Assigned to Chuck Hagenbuch
State ⇒ Assigned
Reply to this comment
I'm okay with that if it works for you.
10/24/2008 09:54:50 AM robb (at) wtg (dot) cw (dot) com Comment #11 Reply to this comment
I'm not happy about adding a delay for all backends that in most
cases will just slow users down pointlessly. I could see getting rid
of the read, I guess, but then you're likely to get this error when
redirecting to the new contact.

I don't know enough about LDAP to know how common this is and how
much it's worth compromising everyone else's experience because of it.
Sure, I can see that.



How about searching immediately, then try again one second later if 
you fail, with one further retry. That should avoid a delay for those 
that don't need it, but allow some leeway for those that do.



Probably not hugely common setup, but hopefully this suggestion can 
avoid that.
10/24/2008 01:09:56 AM Chuck Hagenbuch Comment #10
Taken from Chuck Hagenbuch
State ⇒ Feedback
Reply to this comment
I'm not happy about adding a delay for all backends that in most cases 
will just slow users down pointlessly. I could see getting rid of the 
read, I guess, but then you're likely to get this error when 
redirecting to the new contact.



I don't know enough about LDAP to know how common this is and how much 
it's worth compromising everyone else's experience because of it.
10/23/2008 11:31:11 PM Jan Schneider Assigned to Chuck Hagenbuch
State ⇒ Assigned
 
10/16/2008 09:36:26 AM Matt Selsky Comment #9 Reply to this comment
The IMAP ACL code has a sleep() between setting and getting to get 
around a similar propagation delay in older versions of Cyrus IMAP 
when using a Murder environment.



http://cvs.horde.org/annotate.php/framework/IMAP/IMAP/ACL/rfc2086.php?rev=1.32#l175
10/16/2008 08:54:00 AM robb (at) wtg (dot) cw (dot) com Comment #8 Reply to this comment
I'm seeing a replication delay of around 1 sec.
10/15/2008 01:42:46 PM tolan (at) bgz-consultants (dot) com Comment #7 Reply to this comment
Mmm, true; but, if we remove that, then you still might hit an error
on the display page after the redirect. So just removing that check
doesn't seem like it'll really solve the problem.
I'd suggest that the add function isn't the right place to make the 
check though. If ldap confirms it was added successfully then the add 
function should be happy.



Perhaps the code that displays an entry could retry a few times with a 
short sleep in-between if it fails to find an object? For example 
four, quarter second, sleeps would minimise wait time, and still give 
up to a second for replication. Obviously those particular values 
might not be appropriate, I don't know how long the sync might take, 
but something along those lines?
10/15/2008 03:01:25 AM Chuck Hagenbuch Comment #6 Reply to this comment
Mmm, true; but, if we remove that, then you still might hit an error 
on the display page after the redirect. So just removing that check 
doesn't seem like it'll really solve the problem.
10/13/2008 02:33:53 PM robb (at) wtg (dot) cw (dot) com Comment #5 Reply to this comment
But the problem happens when displaying the contact, not adding it, right?
nope, problem comes during adding the contact, it will be displayed 
because syncrepl delay is very small



from my reading of the code (./turba/lib/Forms/AddContact.php)



the record is added (line 82)



         $key = $driver->add($contact);



then the same record is searched for (line 86)



             $ob = $driver->getObject($key);





this is what is causing the error
10/13/2008 02:21:25 PM Chuck Hagenbuch Comment #4 Reply to this comment
But the problem happens when displaying the contact, not adding it, right?
10/13/2008 08:59:44 AM robb (at) wtg (dot) cw (dot) com Comment #3 Reply to this comment
Any suggestions how to work around this?
I'd guess the ldap driver provides a success/failure code at the point 
the write request is made, I'd take this as success.
10/11/2008 04:40:16 PM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
Any suggestions how to work around this?
10/11/2008 02:48:42 PM robb (at) wtg (dot) cw (dot) com Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Summary ⇒ adding contact to chained ldap slave server causes error message
Type ⇒ Bug
Queue ⇒ Turba
Reply to this comment
when a contact is added to turba, it would appear a search is made to 
confirm the record has been added



however if the server that receives the update uses chaining and 
syncrepl the update may not have made it back to the slave slave in 
time for the search to find it, this causes an error message "There 
was an error adding the new contact. Contact your system administrator 
for further help."

Saved Queries