summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2009-08-20 10:31:13 -0700
committerNoriko Hosoi <nhosoi@redhat.com>2009-08-20 10:31:13 -0700
commit74093d603cc2163e2c95433aa7a53c46d799d36e (patch)
tree67b477dd0a79f3bb387efb92f1e5a3a45f565803
parent1cc186ad31449aebff4fa220bff7c90a45472fcd (diff)
downloadds-74093d603cc2163e2c95433aa7a53c46d799d36e.tar.gz
ds-74093d603cc2163e2c95433aa7a53c46d799d36e.tar.xz
ds-74093d603cc2163e2c95433aa7a53c46d799d36e.zip
509472 db2index all does not reindex all the db backends correctly
The commit a26ba73fb5040383c27872997bc07ab0c2006459 made to fix the bug 509472 put the assertion at the wrong place. It should be applied just for the worker thread.
-rw-r--r--ldap/servers/slapd/back-ldbm/import.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ldap/servers/slapd/back-ldbm/import.c b/ldap/servers/slapd/back-ldbm/import.c
index 8c334d43..76067391 100644
--- a/ldap/servers/slapd/back-ldbm/import.c
+++ b/ldap/servers/slapd/back-ldbm/import.c
@@ -106,11 +106,13 @@ FifoItem *import_fifo_fetch(ImportJob *job, ID id, int worker)
return NULL;
}
if (fi->entry) {
- if (worker && fi->bad) {
- import_log_notice(job, "WARNING: bad entry: ID %d", id);
- return NULL;
+ if (worker) {
+ if (fi->bad) {
+ import_log_notice(job, "WARNING: bad entry: ID %d", id);
+ return NULL;
+ }
+ PR_ASSERT(fi->entry->ep_refcnt > 0);
}
- PR_ASSERT(fi->entry->ep_refcnt > 0);
}
return fi;
}