Howard Chu wrote:
I believe neither of these are sufficient. One cannot
predict which of multiple modifications commits first
(with or without retries). Which is why the lowest
outstanding CSN is to be used for the cookie...
We could brute force it and fully serialize writes...
As it turns out, all writes to the log database are already serialized.
(Makes sense, since it's a flat structure and we're effectively just
appending new entries onto the end.) As such, we don't lose anything
(more) by serializing up front.
In fact, running test008 with an accesslog overlay that uses a single
mutex on the write ops actually completes faster than normal, because
back-bdb never hits any deadlocks. (Quite a bit faster, 2x at least.) So
I guess this approach is acceptable.
--
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc
OpenLDAP Core Team http://www.openldap.org/project/