[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#3555) enhancement: slurpd replog polling



Full_Name: Howard Chu
Version: 
OS: 
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (24.126.120.178)
Submitted by: hyc


BSD's kqueue() mechanism allows processes to wait on filesystem change events,
such as new data being written to a file, without consuming any CPU. That's a
pretty desirable feature.

We can do the same, using an auxiliary socket/fifo/namedpipe. When slapd starts,
it can open the socket. Whenever it writes to the replog, it can write a single
byte to the socket. When slurpd starts, it can block on a read from the socket.
No more polling-interval needed. I guess we can use a polling-interval to detect
the socket if it doesn't exist or isn't readable (because slapd isn't running
yet).