Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lmdb inconsistency between vlv index sub-database name and vlv cache sub-database name #6022

Closed
progier389 opened this issue Jan 2, 2024 · 0 comments · Fixed by #6026
Closed
Labels
lmdb LMDB related needs triage The issue will be triaged during scrum

Comments

@progier389
Copy link
Contributor

progier389 commented Jan 2, 2024

Issue Description

Theoretically when vlv are used on lmdb, there should be one vlv index cache sub-database per vlv index sub-database.
But after configuring a freeipa server and two replica, sometime there are two caches sub-db (one with the bename and one without). The dbname should always be present.

Package Version and Platform:

  • Platform: Fedora
  • Package and version: 389-ds-base-3.0.0

Steps to Reproduce
Steps to reproduce the behavior:

  1. Install 3 virtual machine running with Fedora 39 and freeipa and 389ds 3.0.
  2. Ensure that hostname and /etc/hosts are set properly (so that all hosts
  3. Setup 1 host as freeipa master and two as replicas
  4. Run dbscan -L dbhomedir_path > output
  5. grep -c "vlv#" output
  6. grep -c recno output
  7. Compare steps [5.] and [6.] results
  8. See error

Expected results
steps [5.] result should be the double of steps [6.]

vlv index sub db should looks like: /var/lib/dirsrv/slapd-IPA-TEST/db//ipaca/vlv#allcertspkitomcatindex.db
vlv index cache sub-db should looks like:
/var/lib/dirsrv/slapd-IPA-TEST/db//~recno-cache/ipaca/vlv#allcertspkitomcatindex.db
but for 2 of the 35 vlv indexes I also see something like:
/var/lib/dirsrv/slapd-IPA-TEST/db//~recno-cache//vlv#allcertspkitomcatindex.db flags:
(with an empty bename)

So its looks like that sometime the bename is not filled.

Additional context
I will have to dig to understand when the cache without bename get created.
I suspect it is after an on-line or off-line reindex or import (or maybe bulk-import ?)

@progier389 progier389 added lmdb LMDB related needs triage The issue will be triaged during scrum labels Jan 2, 2024
progier389 added a commit that referenced this issue Jan 10, 2024
…#6026)

Problem: dbstat -L shows two vlv cache db for a single vlv index db.
There should only have a single one.

Fix:
Added a CI Test
Using a single dbmdb_recno_cache_get_dbname function to get the cache db name.
Fix dbmdb_build_dbname to also append the backend name if the name is a vlv cache

Also fixed some issue found while creating the CI test:
Fixed an error message that puzzled me to make it clearer.
Fixed a race condition in lmdb bulk import that logged crappy data in error logs and crashed the CI tests.

Issue: #6022

Reviewed by: @droideck (Thanks !)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lmdb LMDB related needs triage The issue will be triaged during scrum
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant