summaryrefslogtreecommitdiffstats
path: root/ldap/servers/plugins/replication/cl5_api.c
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@jiji.usersys.redhat.com>2010-10-06 23:27:47 -0700
committerNoriko Hosoi <nhosoi@jiji.usersys.redhat.com>2010-10-06 23:27:47 -0700
commit3604c48b86e6b6feea63f99bebfecaa346d2bf59 (patch)
tree4ae6f4b7c0c5a75b605f4a11d3d7fc35cf9e4815 /ldap/servers/plugins/replication/cl5_api.c
parent9a00a444cea117d0950bef3bb9327bd05e9d11bb (diff)
downloadds-3604c48b86e6b6feea63f99bebfecaa346d2bf59.tar.gz
ds-3604c48b86e6b6feea63f99bebfecaa346d2bf59.tar.xz
ds-3604c48b86e6b6feea63f99bebfecaa346d2bf59.zip
Bug 640854 - changelog db: _cl5WriteOperation: failed to
write entry; db error - 22 Invalid argument https://bugzilla.redhat.com/show_bug.cgi?id=640854 Description: DBENV open flags is used to determine the DB_OPEN mode whether to set DB_AUTO_COMMIT or not. The info was eliminated in the change made for "Bug 633168 - Share backend dbEnv with the replication changelog". This patch picks up the backend dbenv openflags and uses it for the changelog DB_OPEN.
Diffstat (limited to 'ldap/servers/plugins/replication/cl5_api.c')
-rw-r--r--ldap/servers/plugins/replication/cl5_api.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ldap/servers/plugins/replication/cl5_api.c b/ldap/servers/plugins/replication/cl5_api.c
index 79677416..b7c72292 100644
--- a/ldap/servers/plugins/replication/cl5_api.c
+++ b/ldap/servers/plugins/replication/cl5_api.c
@@ -1799,6 +1799,7 @@ static int _cl5AppInit (PRBool *didRecovery)
int rc = -1; /* initialize to failure */
DB_ENV *dbEnv = NULL;
size_t pagesize = 0;
+ int openflags = 0;
char *cookie = NULL;
Slapi_Backend *be = slapi_get_first_backend(&cookie);
while (be) {
@@ -1807,7 +1808,11 @@ static int _cl5AppInit (PRBool *didRecovery)
rc = slapi_back_get_info(be,
BACK_INFO_INDEXPAGESIZE, (void **)&pagesize);
if ((LDAP_SUCCESS == rc) && pagesize) {
- break; /* Successfully fetched */
+ rc = slapi_back_get_info(be,
+ BACK_INFO_DBENV_OPENFLAGS, (void **)&openflags);
+ if (LDAP_SUCCESS == rc) {
+ break; /* Successfully fetched */
+ }
}
}
be = slapi_get_next_backend(cookie);
@@ -1819,6 +1824,7 @@ static int _cl5AppInit (PRBool *didRecovery)
slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl,
"_cl5AppInit: fetched backend dbEnv (%p)\n", dbEnv);
s_cl5Desc.dbEnv = dbEnv;
+ s_cl5Desc.dbEnvOpenFlags = openflags;
s_cl5Desc.dbConfig.pageSize = pagesize;
return CL5_SUCCESS;
}