Issue 7904 - back-mdb should avoid slow read txns
Summary: back-mdb should avoid slow read txns
Status: VERIFIED FIXED
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: 2014-07-23 20:03 UTC by Howard Chu
Modified: 2020-03-20 18:45 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 Howard Chu 2014-07-23 13:17:30 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 1 Quanah Gibson-Mount 2014-07-23 14:00:08 UTC
changed notes
changed state Test to Release
Comment 2 Howard Chu 2014-07-23 20:03:33 UTC
Full_Name: Howard Chu
Version: 2.4
OS: 
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (78.155.233.73)
Submitted by: hyc


LMDB cannot reclaim freed pages if they're still referenced by an active read
txn. Currently a back-mdb search op runs in a single read txn. If the search
produces a lot of results it could hold the txn for a long time, particularly if
the client doesn't read fast enough and the slapd writer has to block waiting
for the socket to become writable.

The fix is to add a new sc_writewait callback handler to the op->o_callback
structure, which will be invoked just before a writer waits for a socket to
become writable. back-mdb can use this handler to reset the read txn to avoid
holding it thru a long wait. The txn can be renewed after the writer returns
successfully. This is already in master, but a slight change is needed for
RE24.
Comment 3 OpenLDAP project 2014-10-23 07:32:11 UTC
fixed in master
fixed in RE25
fixed in RE24
Comment 4 Quanah Gibson-Mount 2014-10-23 07:32:11 UTC
changed notes
changed state Release to Closed