#51167 Issue 51166 - Log an error when an internal search is fully unindexed
Closed by spichugi. Opened by mreynolds.
mreynolds/389-ds-base issue51166  into  master

Download 51167.patch

Bug Description:

Some plugins can trigger very expensive internal searches that can exhaust the bdb db_locks. It is very difficult to track these down.

Fix description:

Log a message to the errors log when an internal search is fully unindexed and provide the search details. This will allow an admin to identify and fix indexing issues.

relates: https://pagure.io/389-ds-base/issue/51166

Ack, thanks!

Ack from me as well. I had a doubt if we need to only log internal search that are done under txn. Finally I think it is a good idea to log all of them.

Ack from me as well. I had a doubt if we need to only log internal search that are done under txn. Finally I think it is a good idea to log all of them.

Well non-internal operations are logged in the access log. So the information is retrievable, but it's not nicely gathered into a single log line. Yeah I think it makes sense, I'm just worried it might overload the errors log with these messages. But let's add it and see who complains :-) I'll revise the patch...

Here is what the logging looks like now for unindexed and internal unindexed:

[19/Jun/2020:16:19:10.914405524 -0400] - NOTICE - ldbm_back_search - Unindexed search: search base="dc=example,dc=com" scope=2 filter="(member=uid=user0069,ou=product development,dc=example,dc=com)" conn=1 op=1
[19/Jun/2020:16:19:42.469911436 -0400] - NOTICE - ldbm_back_search - Internal unindexed search: source (cn=referential integrity postoperation,cn=plugins,cn=config) search base="dc=example,dc=com" scope=2 filter="(member=uid=user0068,ou=product development,dc=example,dc=com)" conn=3 op=1 (internal op=1 count=1)

rebased onto d90b03685173c65690e4c3f9365a219f737f3185

Forgot to say, please review this revision :-)

Sorry about the delay, the update looks good to me, ack. Thanks!

rebased onto 16e47bff818e49d0752fc1bdb970cd49ab907cd9

Pull-Request has been merged by mreynolds

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/4220

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

Metadata