[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
(ITS#7904) back-mdb should avoid slow read txns
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.