Issue 5973 - Syncrepl can update more than one csn value
Summary: Syncrepl can update more than one csn value
Status: VERIFIED WONTFIX
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-24 18:56 UTC by Rein
Modified: 2021-01-15 21:06 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Rein 2009-02-24 18:56:15 UTC
Full_Name: Rein Tollevik
Version: CVS HEAD
OS: irrelevant
URL: 
Submission from: (NULL) (81.93.160.250)
Submitted by: rein


Syncrepl can update more than one csn value in one operation, but only one can
be passed to syncprov in the csn queue.  Syncprov should instead pick the
updated values from the modify operation.

A patch that fixes this is coming.  This patch depends on the ITS#5972 patch,
and is required for the new test058 to succeed.

Rein Tollevik
Basefarm AS
Comment 1 Rein 2009-02-24 18:56:25 UTC
moved from Incoming to Software Bugs
Comment 2 Rein 2009-02-24 19:15:49 UTC
changed notes
changed state Open to Test
Comment 3 Quanah Gibson-Mount 2009-03-05 20:23:20 UTC
changed notes
changed state Test to Release
Comment 4 Howard Chu 2009-03-12 13:14:42 UTC
rein@OpenLDAP.org wrote:
> Full_Name: Rein Tollevik
> Version: CVS HEAD
> OS: irrelevant
> URL:
> Submission from: (NULL) (81.93.160.250)
> Submitted by: rein
>
>
> Syncrepl can update more than one csn value in one operation, but only one can
> be passed to syncprov in the csn queue.  Syncprov should instead pick the
> updated values from the modify operation.

The syncrepl patch broke the CSN queue, which has caused out-of-order updates 
in test050. I have reverted it. Every write operation begins with a queued CSN 
and ends by graduating a CSN. You removed the enqueueing step, and so the 
queue contents were invalid.

> A patch that fixes this is coming.  This patch depends on the ITS#5972 patch,
> and is required for the new test058 to succeed.

test058 has the same number of errors with or without the syncrepl patch, so I 
don't think it was relevant to the issues you were addressing.

I'm still skeptical about the syncprov half of the patch. The two patches were 
actually unrelated, the syncprov patch takes effect regardless of the syncrepl 
patch.
-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 5 Howard Chu 2009-03-12 13:24:19 UTC
changed notes
changed state Release to Test
Comment 6 Howard Chu 2009-03-12 13:31:11 UTC
rein@OpenLDAP.org wrote:
> Full_Name: Rein Tollevik
> Version: CVS HEAD
> OS: irrelevant
> URL:
> Submission from: (NULL) (81.93.160.250)
> Submitted by: rein
>
>
> Syncrepl can update more than one csn value in one operation,

False. An operation can only affect one entry. An entry has only one CSN 
(entryCSN is single-valued). Multiple changes may have occurred to an entry 
before a consumer sees it, but the consumer will only see the final result and 
only the last entryCSN.

On the other hand, multiple CSNs may have changed in the cookie that is 
transmitted to the consumer. That's a separate issue...

> but only one can
> be passed to syncprov in the csn queue.

> Syncprov should instead pick the
> updated values from the modify operation.
>
> A patch that fixes this is coming.  This patch depends on the ITS#5972 patch,
> and is required for the new test058 to succeed.
>
> Rein Tollevik
> Basefarm AS
>
>


-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 7 Quanah Gibson-Mount 2009-03-12 23:33:25 UTC
changed notes
changed state Test to Open
Comment 8 Rein 2009-03-13 14:46:37 UTC
hyc@symas.com wrote:
> rein@OpenLDAP.org wrote:
>> Syncrepl can update more than one csn value in one operation, but only one can
>> be passed to syncprov in the csn queue.  Syncprov should instead pick the
>> updated values from the modify operation.

> The syncrepl patch broke the CSN queue, which has caused out-of-order updates 
> in test050. I have reverted it. Every write operation begins with a queued CSN 
> and ends by graduating a CSN. You removed the enqueueing step, and so the 
> queue contents were invalid.

I removed the queuing and graduating of the CSN syncrepl_updateCookie() 
would update, as that only sent one of the (possibly) many values that 
could be updated by that operation.  With the syncprov half of the patch 
the queued patch should never be looked at, meaning that this queuing 
should be unnecessary here.

The ordinary queue/graduation of the CSN received with an updated entry 
is still in place, and should continue to be so.

>> A patch that fixes this is coming.  This patch depends on the ITS#5972 patch,
>> and is required for the new test058 to succeed.
> 
> test058 has the same number of errors with or without the syncrepl patch, so I 
> don't think it was relevant to the issues you were addressing.

It was only the syncprov half of ITS#5793 patch that was relevant for 
test058.  The syncrepl half of the patch only removes code that should 
be unnecessary..

> I'm still skeptical about the syncprov half of the patch. The two patches were 
> actually unrelated, the syncprov patch takes effect regardless of the syncrepl 
> patch.

Yes, the syncprov part of the patch doesn't need the syncrepl half, but 
I found it correct to clean up code that should be made unnecessary by 
that patch.

All updates received during the persistent phase should include an 
updated CSN value, and should already have been transmitted to syncprov 
by the commit/graduate queue and have caused it to update its own csn 
set.  I.e, the syncrepl_updateCookie() replace operation should only 
have caused syncprov to updated its cookie and thereby send NEW_COOKIE 
messages when syncrepl updated the CSN set at the end of the refresh 
phase.  Apparently, there is something that causes this to break.  More 
on that in another message on -devel.

Rein

Comment 9 OpenLDAP project 2014-08-01 21:04:20 UTC
Removed from HEAD, broken