Bug 1887415 - Sync repl - if a serie of updates target the same entry then the cookie get wrong changenumber
Summary: Sync repl - if a serie of updates target the same entry then the cookie get w...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: 389-ds-base
Version: 8.3
Hardware: All
OS: All
unspecified
medium
Target Milestone: rc
: 8.4
Assignee: thierry bordaz
QA Contact: RHDS QE
URL:
Whiteboard: sync-to-jira
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-12 12:04 UTC by thierry bordaz
Modified: 2021-05-18 15:45 UTC (History)
11 users (show)

Fixed In Version: 389-ds-1.4-8040020201112160023.866effaa
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:45:26 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 4329 0 None closed Sync repl - if a serie of updates target the same entry then the cookie get wrong changenumber 2021-02-12 11:43:32 UTC

Description thierry bordaz 2020-10-12 12:04:47 UTC
Description of problem:
If several updates target the same returned entry, then cookie keeps the changenumber of the first update.



Version-Release number of selected component (if applicable):
regression introduced pagure ticket 51190

How reproducible:
create a user with mep plugin creating a managed group

Steps to Reproduce:
Reproduced with testcase attached to the PR

Actual results:
The state control, along each sent entries, contains a cookie with the same changenumber 

Expected results:
The changenumber of the cookie should change at each notified updates

Additional info:

Comment 2 thierry bordaz 2020-10-15 11:36:57 UTC
Fix pushed upstream => POST

Comment 3 Viktor Ashirov 2020-11-10 13:47:48 UTC
Build tested: 389-ds-base-1.4.3.14-1.module+el8.4.0+8664+a8ec484f.x86_64.rpm

Test dirsrvtests/tests/suites/syncrepl_plugin/basic_test.py::test_sync_repl_mep fails:

        # checking that the cookie are in increasing and in an acceptable range (0..1000)
        assert len(cookies) > 0
        prev = 0
        for cookie in cookies:
            log.info('Check cookie %s' % cookie)
    
            assert int(cookie) > 0
            assert int(cookie) < 1000
>           assert int(cookie) > prev
E           AssertionError: assert 6 > 6
E            +  where 6 = int('6')

dirsrvtests/tests/suites/syncrepl_plugin/basic_test.py:231: AssertionError

Comment 4 thierry bordaz 2020-11-12 14:24:28 UTC
The failure is due to a missing backport of #4329 in 1.4.3
After the backport in 1.4.3 branch of all sync_repl related fixes

5ea53ebd7 Issue 4391 - DSE config modify does not call be_postop (#4394)
d2dcf85c3 Issue 4329 - Sync repl - if a serie of updates target the same entry then the cookie get wrong changenumber (#4356)
90b2b037b Issue 4363 - Sync repl: per thread structure was incorrectly initialized (#4395)
353358978 Ticket 51190 - SyncRepl plugin provides a wrong cookie

Then the test 389-ds-base/dirsrvtests/tests/suites/syncrepl_plugin/basic_test.py::test_sync_repl_mep PASSED
Moving back to POST

Comment 13 bsmejkal 2020-12-08 07:00:17 UTC
==================================================================================== test session starts =====================================================================================
platform linux -- Python 3.6.8, pytest-6.1.2, py-1.9.0, pluggy-0.13.1 -- /usr/bin/python3.6
cachedir: .pytest_cache
metadata: {'Python': '3.6.8', 'Platform': 'Linux-4.18.0-257.el8.x86_64-x86_64-with-redhat-8.4-Ootpa', 'Packages': {'pytest': '6.1.2', 'py': '1.9.0', 'pluggy': '0.13.1'}, 'Plugins': {'metadata': '1.11.0', 'html': '3.1.0', 'libfaketime': '0.1.2'}}
389-ds-base: 1.4.3.16-4.module+el8.4.0+8992+caadce03
nss: 3.53.1-11.el8_2
nspr: 4.25.0-2.el8_2
openldap: 2.4.46-16.el8
cyrus-sasl: 2.1.27-5.el8
FIPS: disabled
rootdir: /mnt/tests/rhds/tests/upstream/ds/dirsrvtests, configfile: pytest.ini
plugins: metadata-1.11.0, html-3.1.0, libfaketime-0.1.2
collected 1 item                                                                                                                                                                             

dirsrvtests/tests/suites/syncrepl_plugin/basic_test.py::test_sync_repl_mep PASSED                                                                                                      [100%]

===================================================================================== 1 passed in 38.18s =====================================================================================


Marking as Verified:Tested.

Comment 14 sgouvern 2020-12-14 14:54:39 UTC
Missed the ITM 6 milestone -> moving to ITM 7

Comment 17 sgouvern 2020-12-21 13:49:58 UTC
With build 389-ds-base-1.4.3.16-6.module+el8.4.0+9207+729bbaca.x86_64

# PYTHONPATH=src/lib389/ py.test -s -v  dirsrvtests/tests/suites/syncrepl_plugin/basic_test.py::test_sync_repl_mep
re-exec with libfaketime dependencies
================================================== test session starts ==================================================
platform linux -- Python 3.6.8, pytest-6.2.1, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3.6
cachedir: .pytest_cache
metadata: {'Python': '3.6.8', 'Platform': 'Linux-4.18.0-260.el8.x86_64-x86_64-with-redhat-8.4-Ootpa', 'Packages': {'pytest': '6.2.1', 'py': '1.10.0', 'pluggy': '0.13.1'}, 'Plugins': {'metadata': '1.11.0', 'html': '3.1.1', 'libfaketime': '0.1.2'}}
389-ds-base: 1.4.3.16-6.module+el8.4.0+9207+729bbaca
nss: 3.53.1-13.el8_3
nspr: 4.25.0-2.el8_2
openldap: 2.4.46-16.el8
cyrus-sasl: 2.1.27-5.el8
FIPS: disabled
rootdir: /mnt/tests/rhds/tests/upstream/ds/dirsrvtests, configfile: pytest.ini
plugins: metadata-1.11.0, html-3.1.1, libfaketime-0.1.2
collected 1 item                                                                                                        

INFO:dirsrvtests.tests.suites.syncrepl_plugin.basic_test:test_sync_repl_map: PASS

PASSEDInstance slapd-standalone1 removed.


================================================ 1 passed in 35.57s =================================================

marking VERIFIED

Comment 19 errata-xmlrpc 2021-05-18 15:45:26 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (389-ds:1.4 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:1835


Note You need to log in before you can comment on or make changes to this bug.