diff options
author | Noriko Hosoi <nhosoi@redhat.com> | 2006-04-18 18:25:02 +0000 |
---|---|---|
committer | Noriko Hosoi <nhosoi@redhat.com> | 2006-04-18 18:25:02 +0000 |
commit | 61a3e9ef02b49a8a987b366188d9db05e5449aa0 (patch) | |
tree | f1418d3dd87139da3f63e8fff336ff9078055117 /ldap | |
parent | 1eec89b8486f1e5d710f73e494557cab2670acd7 (diff) | |
download | ds-61a3e9ef02b49a8a987b366188d9db05e5449aa0.tar.gz ds-61a3e9ef02b49a8a987b366188d9db05e5449aa0.tar.xz ds-61a3e9ef02b49a8a987b366188d9db05e5449aa0.zip |
[189264] 6.11->6.21 upgrade, no db housekeeping threads
The problem was check_db_version finds the existing DBVERSION is old and set
dblayer_private->blayer_recovery_required = 1. If it's set,
DBLAYER_CLEAN_RECOVER_MODE is processed properly. Unfortunately, it was
"reinitialized" in the function read_metadata, which is called after
check_db_version.
Diffstat (limited to 'ldap')
-rw-r--r-- | ldap/servers/slapd/back-ldbm/dblayer.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ldap/servers/slapd/back-ldbm/dblayer.c b/ldap/servers/slapd/back-ldbm/dblayer.c index 79be35b8..2168e514 100644 --- a/ldap/servers/slapd/back-ldbm/dblayer.c +++ b/ldap/servers/slapd/back-ldbm/dblayer.c @@ -3830,6 +3830,10 @@ static int read_metadata(struct ldbminfo *li) int number = 0; dblayer_private *priv = (dblayer_private *)li->li_dblayer_private; + /* dblayer_recovery_required is initialized in dblayer_init; + * and might be set 1 in check_db_version; + * we don't want to override it + * priv->dblayer_recovery_required = 0; */ priv->dblayer_previous_cachesize = 0; priv->dblayer_previous_ncache = 0; /* Open the guard file and read stuff, then delete it */ @@ -3838,12 +3842,10 @@ static int read_metadata(struct ldbminfo *li) memset(&prfinfo, '\0', sizeof(PRFileInfo)); (void)PR_GetFileInfo(filename, &prfinfo); - priv->dblayer_recovery_required = 0; prfd = PR_Open(filename,PR_RDONLY,priv->dblayer_file_mode); if (NULL == prfd || 0 == prfinfo.size) { /* file empty or not present--means the database needs recovered */ int count = 0; - priv->dblayer_recovery_required = 0; for (dirp = priv->dblayer_data_directories; dirp && *dirp; dirp++) { count_dbfiles_in_dir(*dirp, &count, 1 /* recurse */); @@ -3877,10 +3879,6 @@ static int read_metadata(struct ldbminfo *li) } return 0; /* no files found; no need to run recover start */ } - /* dblayer_recovery_required is initialized in dblayer_init; - * and might be set 1 in check_db_version; - * we don't want to override it - * priv->dblayer_recovery_required = 0; */ /* So, we opened the file, now let's read the cache size and version stuff */ buf = slapi_ch_calloc(1, prfinfo.size + 1); |