Bug 633168 - Share backend dbEnv with the replication changelog
Summary: Share backend dbEnv with the replication changelog
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Replication - General
Version: 1.2.6
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Noriko Hosoi
QA Contact: Viktor Ashirov
URL: http://directory.fedoraproject.org/wi...
Whiteboard:
Depends On:
Blocks: 389_1.2.7 639035
TreeView+ depends on / blocked
 
Reported: 2010-09-13 04:27 UTC by Noriko Hosoi
Modified: 2015-12-07 17:00 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-07 17:00:14 UTC
Embargoed:


Attachments (Terms of Use)
git patch file (master) (1.54 KB, patch)
2010-09-13 04:55 UTC, Noriko Hosoi
nkinder: review+
nhosoi: review?
Details | Diff
git patch file (master) (3.61 MB, patch)
2010-09-13 04:59 UTC, Noriko Hosoi
nkinder: review+
nhosoi: review?
Details | Diff

Comment 1 Noriko Hosoi 2010-09-13 04:55:14 UTC
Created attachment 446832 [details]
git patch file (master)

File: ldap/servers/plugins/replication/repl5_agmtlist.c

Description:
Object ro is freed in objset_next_obj and next object is returned
if any.  After ro is released, it was used to get agreement data.
This patch moves the location of objset_next_obj after the agreement
data is retrieved.

Comment 2 Noriko Hosoi 2010-09-13 04:59:56 UTC
Created attachment 446833 [details]
git patch file (master)

Description:
* cl5_api.c, cl5_api.h
  - fetches dbEnv from backend using slapi_back_get_info.
  - unused macros and DB helper functions and APIs are removed.
* cl5_config.c
  - local changelog DB related config parameters are removed.
* Added SLAPI_PLUGIN_BE_PRE_CLOSE_FN and SLAPI_PLUGIN_BE_POST_OPEN_FN to
  close changelog DB before dbEnv is closed and to open changelog DB after
  dbEnv is opened, respectively.
* Added slapi APIs slapi_back_get_info and slapi_back_set_info to get/set
  the backend info.
* back-ldbm
  - db2bak[.pl] and bak2db[.pl] backs up and restores the database files
    including changelog db.
  - changelog dir is backed up in <backupdir>/.repl_changelog_backup.
  - underlying implementation ldbm_back_get_info for slapi_back_get_info
    is added.
* Added an upgrade script 81changelog.pl

See also:
http://directory.fedoraproject.org/wiki/Move_changelog

Comment 3 Noriko Hosoi 2010-09-13 17:07:05 UTC
Reviewed by Nathan (Thanks A LOT!!).

Pushed to master.

$ git merge changelog
Updating 5ae8186..80ce631
Fast-forward
 Makefile.am                                       |    1 +
 Makefile.in                                       | 4387 ++--
 aclocal.m4                                        | 6884 +----
 compile                                           |   21 +-
 config.guess                                      |  302 +-
 config.h.in                                       |   12 +-
 config.sub                                        |  232 +-
 configure                                         |38910 +++++++++------------
 depcomp                                           |  172 +-
 install-sh                                        |  517 +-
 ldap/servers/plugins/replication/cl5_api.c        | 1317 +-
 ldap/servers/plugins/replication/cl5_api.h        |   77 +-
 ldap/servers/plugins/replication/cl5_clcache.c    |   11 +-
 ldap/servers/plugins/replication/cl5_clcache.h    |    2 +-
 ldap/servers/plugins/replication/cl5_config.c     |  181 +-
 ldap/servers/plugins/replication/repl5_agmtlist.c |    8 +-
 ldap/servers/plugins/replication/repl5_init.c     |    6 +-
 ldap/servers/plugins/replication/repl5_plugins.c  |   10 -
 ldap/servers/plugins/replication/repl_extop.c     |    3 +
 ldap/servers/slapd/back-ldbm/archive.c            |   45 +-
 ldap/servers/slapd/back-ldbm/back-ldbm.h          |    4 +
 ldap/servers/slapd/back-ldbm/dblayer.c            |  705 +-
 ldap/servers/slapd/back-ldbm/dblayer.h            |    4 +
 ldap/servers/slapd/back-ldbm/import-threads.c     |   37 +-
 ldap/servers/slapd/back-ldbm/init.c               |    4 +
 ldap/servers/slapd/back-ldbm/ldbm_modify.c        |    2 +-
 ldap/servers/slapd/back-ldbm/ldif2ldbm.c          |   31 +-
 ldap/servers/slapd/back-ldbm/misc.c               |   26 +-
 ldap/servers/slapd/back-ldbm/proto-back-ldbm.h    |    5 +-
 ldap/servers/slapd/backend.c                      |   22 +
 ldap/servers/slapd/pblock.c                       |   37 +-
 ldap/servers/slapd/plugin.c                       |   10 +-
 ldap/servers/slapd/slap.h                         |   10 +
 ldap/servers/slapd/slapi-plugin.h                 |   39 +-
 ldap/servers/slapd/slapi-private.h                |    2 +
 ltmain.sh                                         |13199 ++++----
 missing                                           |  104 +-
 37 files changed, 27982 insertions(+), 39357 deletions(-)
 mode change 100644 => 100755 ltmain.sh

$ git push
Counting objects: 94, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (48/48), done.
Writing objects: 100% (51/51), 201.14 KiB, done.
Total 51 (delta 42), reused 7 (delta 3)
To ssh://git.fedorahosted.org/git/389/ds.git
   5ae8186..80ce631  master -> master

Comment 4 Noriko Hosoi 2011-07-26 22:47:32 UTC
Steps to verify
1. set up replication: one master -> one replica
2. run any modify operation on the master
3. ls /var/lib/dirsrv/slapd-ID/changelogdb
   cf4f1403-1dd111b2-b6cbab94-88ceef34_4e2f4366000000010000.db4  DBVERSION
   cf4f1403-1dd111b2-b6cbab94-88ceef34.sema
   If no DB env files (__db.00#) exist, the bug is verified.

Comment 5 Amita Sharma 2011-07-27 12:31:05 UTC
Executed Comment#4

[root@rhel61-ds90-amita changelog]# cd /var/lib/dirsrv/slapd-M1/db/changelog
[root@rhel61-ds90-amita changelog]# ls
2a7eda02-966311e0-9e4edf77-817ae936_4df72097000000010000.db4  2a7eda02-966311e0-9e4edf77-817ae936.sema  test.b64
2a7eda02-966311e0-9e4edf77-817ae936.ldif                      DBVERSION

no DB env files (__db.00#) exist, hence the bug is verified.


Note You need to log in before you can comment on or make changes to this bug.