Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-3428

JE cleaner threads stop deleting files

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.0, 3.5.0, 3.0.0, 2.6.4
    • Fix Version/s: 4.0.0
    • Component/s: backends
    • Labels:
    • Support Ticket IDs:

      Description

      If I create a server with 1000 users each containing a large jpegPhoto attribute (from sampleldifs.zip use the data.ldif which references random.jpg), and then delete all the user entries using ldapmodify (with delete-users.ldif), the backend database does not shrink in size as expected.

      After the DELETEs we can see using DbSpace that the utilization of a number of the JDB files is appropriate for them to be removed. However they are not removed until I restart the server.

      $ java -cp lib/je.jar com.sleepycat.je.util.DbSpace -h db/userRoot -r
        File    Size (KB)  % Used  % Used (recalculated)
      --------  ---------  ------  ------
      00000000      97037       0       0
      00000001      97017       0       0
      00000002      97023       0       0
      00000003      97026       0       0
      00000004      97021       0       0
      00000005      97025       0       0
      00000006      97022       0       0
      00000007      97654       0       0
      00000008      97656       7       5
      00000009      21685      62      42
       TOTALS      896169       2       2
      (LN size correction factor: NaN)
      $ ls -al db/userRoot
      total 1792512
      drwx------  17 cjr  staff       578 21 Oct 11:15 .
      drwxr-xr-x   3 cjr  staff       102 21 Oct 11:06 ..
      -rw-r--r--   1 cjr  staff  99366246 21 Oct 11:06 00000000.jdb
      -rw-r--r--   1 cjr  staff  99345468 21 Oct 11:06 00000001.jdb
      -rw-r--r--   1 cjr  staff  99352403 21 Oct 11:06 00000002.jdb
      -rw-r--r--   1 cjr  staff  99355399 21 Oct 11:06 00000003.jdb
      -rw-r--r--   1 cjr  staff  99350226 21 Oct 11:06 00000004.jdb
      -rw-r--r--   1 cjr  staff  99354266 21 Oct 11:06 00000005.jdb
      -rw-r--r--   1 cjr  staff  99350844 21 Oct 11:06 00000006.jdb
      -rw-r--r--   1 cjr  staff  99997909 21 Oct 11:15 00000007.jdb
      -rw-r--r--   1 cjr  staff  99999936 21 Oct 11:15 00000008.jdb
      -rw-r--r--   1 cjr  staff  22205572 21 Oct 11:15 00000009.jdb
      -rw-r--r--   1 cjr  staff      7114 21 Oct 11:06 je.config.csv
      -rw-r--r--   1 cjr  staff     37887 21 Oct 11:15 je.info.0
      -rw-r--r--   1 cjr  staff         0 21 Oct 11:06 je.info.0.lck
      -rw-r--r--   1 cjr  staff         0 21 Oct 11:06 je.lck
      -rw-r--r--   1 cjr  staff     14875 21 Oct 11:24 je.stat.csv
      

      Stop and restart:

      $ bin/stop-ds; bin/start-ds
      Stopping Server...
      [21/Oct/2016:11:24:57 +0100] category=BACKEND severity=NOTICE msgID=370 msg=The backend userRoot is now taken offline
      [21/Oct/2016:11:24:57 +0100] category=CORE severity=NOTICE msgID=203 msg=The Directory Server is now stopped
      [21/Oct/2016:11:24:59 +0100] category=CORE severity=NOTICE msgID=134 msg=OpenDJ Server 4.0.0-SNAPSHOT (build 20161018155020, revision number d71ce1d1a62be7713cbee92b9c99574eb69d1bb5) starting up
      [21/Oct/2016:11:25:00 +0100] category=JVM severity=NOTICE msgID=21 msg=Installation Directory:  /Users/cjr/Documents/Idea/opendj-git/opendj-server-legacy/target/package/opendj
      [21/Oct/2016:11:25:00 +0100] category=JVM severity=NOTICE msgID=23 msg=Instance Directory:      /Users/cjr/Documents/Idea/opendj-git/opendj-server-legacy/target/package/opendj
      [21/Oct/2016:11:25:00 +0100] category=JVM severity=NOTICE msgID=17 msg=JVM Information: 1.8.0_111-b14 by Oracle Corporation, 64-bit architecture, 3817865216 bytes heap size
      [21/Oct/2016:11:25:00 +0100] category=JVM severity=NOTICE msgID=18 msg=JVM Host: localhost, running Mac OS X 10.12 x86_64, 17179869184 bytes physical memory size, number of processors available 8
      [21/Oct/2016:11:25:00 +0100] category=JVM severity=NOTICE msgID=19 msg=JVM Arguments: "-Dorg.opends.server.scriptName=start-ds"
      [21/Oct/2016:11:25:01 +0100] category=BACKEND severity=NOTICE msgID=513 msg=The database backend userRoot containing 10003 entries has started
      [21/Oct/2016:11:25:01 +0100] category=EXTENSIONS severity=NOTICE msgID=221 msg=DIGEST-MD5 SASL mechanism using a server fully qualified domain name of: rih.local
      [21/Oct/2016:11:25:01 +0100] category=PROTOCOL severity=NOTICE msgID=276 msg=Started listening for new connections on Administration Connector 0.0.0.0 port 4444
      [21/Oct/2016:11:25:01 +0100] category=PROTOCOL severity=NOTICE msgID=276 msg=Started listening for new connections on LDAP Connection Handler 0.0.0.0 port 1389
      [21/Oct/2016:11:25:01 +0100] category=CORE severity=NOTICE msgID=135 msg=The Directory Server has started successfully
      [21/Oct/2016:11:25:01 +0100] category=CORE severity=NOTICE msgID=139 msg=The Directory Server has sent an alert notification generated by class org.opends.server.core.DirectoryServer (alert type org.opends.server.DirectoryServerStarted, alert ID org.opends.messages.core-135): The Directory Server has started successfully
      

      Check the backend files after the restart:

      $ ls -al db/userRoot
      total 246016
      drwx------  9 cjr  staff       306 21 Oct 11:25 .
      drwxr-xr-x  3 cjr  staff       102 21 Oct 11:06 ..
      -rw-r--r--  1 cjr  staff  99999936 21 Oct 11:15 00000008.jdb
      -rw-r--r--  1 cjr  staff  25868850 21 Oct 11:25 00000009.jdb
      -rw-r--r--  1 cjr  staff      7114 21 Oct 11:06 je.config.csv
      -rw-r--r--  1 cjr  staff     57941 21 Oct 11:25 je.info.0
      -rw-r--r--  1 cjr  staff         0 21 Oct 11:25 je.info.0.lck
      -rw-r--r--  1 cjr  staff         0 21 Oct 11:06 je.lck
      -rw-r--r--  1 cjr  staff     15800 21 Oct 11:25 je.stat.csv
      

      This problem doesn't appear if you load our default random entries without large jpegPhotos and then delete them, so it is possible that the size of the entries has something to do with the issue.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                matthew Matthew Swift
                Reporter:
                cjr Chris Ridd
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: