Bug 55863 - Notifier indexing slows rapidly down the last pending 999 transactions to index
Notifier indexing slows rapidly down the last pending 999 transactions to index
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Notifier (univention-directory-notifier)
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 4.4-9-errata
Assigned To: Julia Bremer
Philipp Hahn
https://git.knut.univention.de/univen...
:
Depends on: 54837
Blocks:
  Show dependency treegraph
 
Reported: 2023-03-08 08:17 CET by Mirac Erdemiroglu
Modified: 2023-03-15 13:43 CET (History)
9 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.286
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support: Yes
Flags outvoted (downgraded) after PO Review:
Ticket number: 2022051921000634, 2022062221000162, 2023030221000355, 2023030810000052
Bug group (optional):
Max CVSS v3 score:


Attachments
univention-translog backport to Python 2.7 / UCS 4.4-x ( (48.15 KB, text/x-python)
2023-03-08 08:23 CET, Mirac Erdemiroglu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mirac Erdemiroglu univentionstaff 2023-03-08 08:17:43 CET
+++ This bug was initially created as a clone of Bug #54797 +++

If /usr/share/univention-directory-notifier/univention-translog stat 
shows an 
AssertionError this indicates that the transaction.index is corrupt or uses wrong data.

AssertionError: (25775045, 11269137)

So removing the /var/lib/univention-ldap/notify/transaction.index and restarting the univention-directory-notifier it starts reindexing.

In larger environments it starts really fast
2022-05-25 13:17:40,881:WARNING:Index=1962147 < translog=11269137 entries
2022-05-25 13:18:20,087:WARNING:Index=11268138 < translog=11269137 entries

→ 11269137−11268138 = 999

2022-05-25 13:19:02,318:WARNING:Index=11268138 < translog=11269137 entries
2022-05-25 13:20:05,220:WARNING:Index=11268140 < translog=11269137 entries

This seems always to slow down the last 999 transactions to index. Approximately 45 sec for one index entry.

--------------------------------------------
In the other environment it is the same:

→ 7120940−7119941 = 999

2022-05-24 12:37:22,619:WARNING:Index=2859957 < translog=7120940 entries
2022-05-24 12:37:46,503:WARNING:Index=7119941 < translog=7120940 entries
2022-05-24 12:37:57,075:WARNING:Index=7119941 < translog=7120940 entries

So indexing finished next day. During this time replication is not working at all.
Comment 1 Mirac Erdemiroglu univentionstaff 2023-03-08 08:23:04 CET
Created attachment 11049 [details]
univention-translog backport to Python 2.7 / UCS 4.4-x (
Comment 2 Mirac Erdemiroglu univentionstaff 2023-03-08 08:25:49 CET
Customer effected 2023030810000052

We use the python script from the attachement and the replication works now.

For an workaround that's ok but we need a errata update for that please.
Comment 3 Philipp Hahn univentionstaff 2023-03-08 09:10:59 CET
UCS 4.4-9 is out-of-maintenance since end of February 2023. As such this will only get released to extended-security-maintenance!

[4.4-9] f41c7b05cd feat(udn): univention-translog reindex
 doc/errata/staging/univention-directory-notifier.yaml        | 15 +++++++++++++
 management/univention-directory-notifier/debian/changelog    |  6 ++++++
 management/univention-directory-notifier/univention-translog | 36 +++++++++++++++++++++++++++++---
 3 files changed, 54 insertions(+), 3 deletions(-)

Package: univention-directory-notifier
Version: 13.0.3-11A~4.4.0.202303080852
Branch: ucs_4.4-0
Scope: errata4.4-9

[4.4-9] 3a0bf94b1f Bug #55863: univention-directory-notifier 13.0.3-11A~4.4.0.202303080852
 doc/errata/staging/univention-directory-notifier.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 4 Julia Bremer univentionstaff 2023-03-08 22:43:46 CET
OK: Indexing works as expected
OK: python2 
OK: YAML

REOPEN: You removed the executable flag from the univention-translog file in your commit. I am getting a "Permission denied" error after upgrading the notifier.
Comment 5 Julia Bremer univentionstaff 2023-03-08 22:57:08 CET
Successful build
Package: univention-directory-notifier
Version: 13.0.3-11A~4.4.0.202303082249
Branch: ucs_4.4-0
Scope: errata4.4-9

5c17e321b8 Bug #55863: yaml update
0aea18db3c Bug #55863: make univention-translog executable again

The feature itself was already successfully QAed by me. 
Changing assignee and QA for you to review my commit.