On Tue, Oct 24, 2017 at 04:52:57PM +0100, Howard Chu wrote:
Ondřej Kuzník wrote:
ITS#8486 suggests we use a more efficient structure to maintain the sessionlog in. If we're messing with sessionlog already, we might as well see if we can address another issue - it is always empty on slapd startup leading to unnecessary full refreshes happening.
slapo-accesslog has most of the data we need to support that and is already sorted in CSN order (much like sessionlog).
AFAIK, we can't use the accesslog database directly as the database as we can't efficiently search on a single serverID to get the serverID set and the oldest CSN for each.
We could tweak the overlay to always maintain these in the parent entry (auditContainer). Currently the logpurge always sets the container's entryCSN to the oldest remaining CSN.
I'll look into that again, what you say sounds feasible. I should be close to having the code that populates sessionlog from accesslog. When that works, it should be possible to reuse most of that to try and use accesslog directly.
There are a few tasks that need to be done in order to achieve this:
- configure syncprov with a suffix that contains the slapo-accesslog style logs for our DB
- change struct sessionlog to use a more efficient structure that can be iterated over from any point (only tavl is available at the moment)
We've talked about this before, an in-memory B+tree would be better for all of our AVL/TAVL uses.
Yes, that would be useful.