[OPENDJ-6445] Backport OPENDJ-4625: Changelog range searches miss entries Created: 10/Jul/19  Updated: 21/Nov/19  Resolved: 24/Jul/19

Status: Done
Project: OpenDJ
Component/s: replication
Affects Version/s: 4.0.0
Fix Version/s: 5.5.3

Type: Bug Priority: Major
Reporter: Chris Ridd Assignee: Michal Severin [X] (Inactive)
Resolution: Fixed Votes: 0
Labels: release-notes

Issue Links:
Backport
is a backport of OPENDJ-4625 Changelog range searches miss entries Done
Story Points: 1.5
Dev Assignee: Chris Ridd
QA Assignee: Michal Severin [X] (Inactive)

 Description   

The customer reports that a changelog search of:

(&(objectClass=*)(changeNumber>=1983470)(changeNumber<=1983472)))

which should return 3 changes, only returns the 1983470 and 1983472 changes. However, this changelog search:

&(objectclass=*)(changeNumber=1983471))

returns the missing change.

 

Adding some custom debug code to ChangelogBackend.findReplicaUpdateMessage() shows that we call the method with 3 different CSNs, but for the second CSN the replicaUpdatesCursor seems to look at the wrong database.

method={findReplicaUpdateMessage(ChangelogBackend.java:1094)} starts for 00000160702b92cb187400002365 (6260)
method={findReplicaUpdateMessage(ChangelogBackend.java:1112)} ends after 1 searching {6260=1} with found for 00000160702b92cb187400002365
method={findReplicaUpdateMessage(ChangelogBackend.java:1094)} starts for 00000160702b92c92d7a000046f6 (11642)
method={findReplicaUpdateMessage(ChangelogBackend.java:1105)} ends after 1 searching {6260=1} with null for 00000160702b92c92d7a000046f6
method={findReplicaUpdateMessage(ChangelogBackend.java:1094)} starts for 00000160702b92cb187400002366 (6260)
method={findReplicaUpdateMessage(ChangelogBackend.java:1112)} ends after 1 searching {6260=1} with found for 00000160702b92cb187400002366

The return "with null" is this case in findReplicaUpdateMessage():

            if (compareIndexWithUpdateMsg < 0) {
                // Either update message has been purged or baseDN has been removed from changelogDB,
                // ignore current index record and go to the next one
                return null;


 Comments   
Comment by Michal Severin [X] (Inactive) [ 21/Nov/19 ]

We did not encounter any issues connected to this in our tests.

Generated at Sat Jan 16 23:55:39 UTC 2021 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.