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 reindex is broken if index type is specified #6316

Closed
progier389 opened this issue Sep 4, 2024 · 1 comment · Fixed by #6318
Closed

lmdb reindex is broken if index type is specified #6316

progier389 opened this issue Sep 4, 2024 · 1 comment · Fixed by #6318
Assignees
Labels
lmdb LMDB related
Milestone

Comments

@progier389
Copy link
Contributor

progier389 commented Sep 4, 2024

Issue Description
Some freeipa tests are now failing because a reindex is not properly done although a reindex task is performed.
The issue is related to the fact that the task contains subtype -
Looks like it was a regression in some of the vlv fixes
Anyway the index type should always be ignored in tasks because reindexing only some specific types has no sense (because reindex recreate the db instance from scratch anyway ...)

A clear and concise description of what the bug is.

Package Version and Platform:

  • Platform: . Fedora]
  • Package: 2.5 and 3.x branches
  • Browser: N/A

Steps to Reproduce
Steps to reproduce the behavior:

  1. Setup an instance using lmdb with default sample entries
  2. Add description attribute in uid=demo_user, entry (or any other entry)
  3. Add description index for equality and presence WITHOUT reindexing
  4. Restart the server
  5. Add description attribute to the suffix entry
  6. Run reindex task with nsIndexAttribute: description:eq,pres
  7. Run dbscan -f /var/lib/dirsrv/slapd-standalone1/db/userroot/description.db -A
  8. See that there is only 1 key starting with = (the one for the suffix entry)

Expected results
Should have equality keys =value for both the suffix and the demo_user entry
A clear and concise description of what you expected to happen.

Additional context
Solution is to ignore the type when handling reindex task

Triaged: https://issues.redhat.com/browse/IDMDS-4641

@progier389 progier389 added this to the 2.5 milestone Sep 4, 2024
@progier389 progier389 self-assigned this Sep 4, 2024
@progier389 progier389 added the lmdb LMDB related label Sep 5, 2024
@progier389 progier389 changed the title Reindex skipped if task contain the attribute type. lmdb reindex broken if index type is specified Sep 5, 2024
@progier389 progier389 changed the title lmdb reindex broken if index type is specified lmdb reindex is broken if index type is specified Sep 5, 2024
progier389 added a commit that referenced this issue Sep 6, 2024
While reindexing using task or offline reindex, if the attribute name contains the index type (for example :eq,pres)
Then the attribute is not reindexed. Problem occurs when lmdb is used, things are working fine with bdb.
Solution: strip the index type in reindex as it is done in bdb case.
Anyway the reindex design requires that for a given attribute all the configured index types must be rebuild.

Issue: #6316

Reviewed by: @tbordaz, @droideck (Thanks!)
edewata added a commit to edewata/pki that referenced this issue Sep 6, 2024
The tests for CA with secure DS connection (including
cloning) have been updated to use DS containers instead
of DS RPM packages from Fedora to avoid DS issue #6316.

389ds/389-ds-base#6316
edewata added a commit to dogtagpki/pki that referenced this issue Sep 9, 2024
The tests for CA with secure DS connection (including
cloning) have been updated to use DS containers instead
of DS RPM packages from Fedora to avoid DS issue #6316.

389ds/389-ds-base#6316
edewata added a commit to edewata/pki that referenced this issue Sep 9, 2024
The tests for CA with secure DS connection (including
cloning) have been updated to use DS containers instead
of DS RPM packages from Fedora to avoid DS issue #6316.

389ds/389-ds-base#6316
edewata added a commit to edewata/pki that referenced this issue Sep 9, 2024
The tests for CA with secure DS connection (including
cloning) have been updated to use DS containers instead
of DS RPM packages from Fedora to avoid DS issue #6316.

389ds/389-ds-base#6316
vashirov pushed a commit that referenced this issue Sep 16, 2024
While reindexing using task or offline reindex, if the attribute name contains the index type (for example :eq,pres)
Then the attribute is not reindexed. Problem occurs when lmdb is used, things are working fine with bdb.
Solution: strip the index type in reindex as it is done in bdb case.
Anyway the reindex design requires that for a given attribute all the configured index types must be rebuild.

Issue: #6316

Reviewed by: @tbordaz, @droideck (Thanks!)
vashirov pushed a commit that referenced this issue Sep 16, 2024
While reindexing using task or offline reindex, if the attribute name contains the index type (for example :eq,pres)
Then the attribute is not reindexed. Problem occurs when lmdb is used, things are working fine with bdb.
Solution: strip the index type in reindex as it is done in bdb case.
Anyway the reindex design requires that for a given attribute all the configured index types must be rebuild.

Issue: #6316

Reviewed by: @tbordaz, @droideck (Thanks!)
@vashirov
Copy link
Member

1366446..70711a8 389-ds-base-2.5 -> 389-ds-base-2.5
cdf4820..a251914 389-ds-base-3.0 -> 389-ds-base-3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lmdb LMDB related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants