From 0071de8d4ae070b5671092c0e75033ac1b87c477 Mon Sep 17 00:00:00 2001
From: Mark Craig <mark.craig@forgerock.com>
Date: Mon, 19 Jan 2015 16:00:59 +0000
Subject: [PATCH] CR-5819 OPENDJ-1732 Note that running dbtest can be very expensive

---
 opendj3-server-dev/src/messages/messages/tools.properties        |    4 +++-
 opendj3-server-dev/src/main/docbkx/admin-guide/index.xml         |    6 +++---
 opendj3-server-dev/resource/man/man1/dbtest.1                    |   24 +++++++++++++-----------
 opendj3-server-dev/src/main/docbkx/admin-guide/man-dbtest.xml    |   11 ++++++++---
 opendj3-server-dev/src/main/docbkx/admin-guide/chap-indexing.xml |    9 ++++++++-
 5 files changed, 35 insertions(+), 19 deletions(-)

diff --git a/opendj3-server-dev/resource/man/man1/dbtest.1 b/opendj3-server-dev/resource/man/man1/dbtest.1
index 36da749..25b4821 100644
--- a/opendj3-server-dev/resource/man/man1/dbtest.1
+++ b/opendj3-server-dev/resource/man/man1/dbtest.1
@@ -1,13 +1,13 @@
 '\" t
 .\"     Title: dbtest
 .\"    Author: 
-.\" Generator: DocBook XSL-NS Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\"      Date: 01/31/2014
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\"      Date: 01/19/2015
 .\"    Manual: Tools Reference
-.\"    Source: OpenDJ 2.7.0-SNAPSHOT
+.\"    Source: OpenDJ 3.0.0
 .\"  Language: English
 .\"
-.TH "DBTEST" "1" "01/31/2014" "OpenDJ 2\&.7\&.0\-SNAPSHOT" "Tools Reference"
+.TH "DBTEST" "1" "01/19/2015" "OpenDJ 3\&.0\&.0" "Tools Reference"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -30,8 +30,8 @@
 .SH "NAME"
 dbtest \- gather OpenDJ JE database debugging information
 .SH "SYNOPSIS"
-.HP \w'\fBdbtest\fR \fBsubcommand\fR\ 'u
-\fBdbtest\fR \fBsubcommand\fR [options]
+.HP \w'\fBdbtest\ \fR\fB\fIsubcommand\fR\fR\ 'u
+\fBdbtest \fR\fB\fIsubcommand\fR\fR [options]
 .SH "DESCRIPTION"
 .PP
 This utility can be used to debug the JE database\&.
@@ -60,6 +60,8 @@
 .RS 4
 List the status of indexes in an entry container
 .sp
+This command can take a long time to complete, as it reads all indexes for all backends\&.
+.sp
 When you list index status, the result is a table, followed by a "Total", which is the total number of indexes, followed by a list of indexes with "Undefined keys" to show the values for which the number of entries exceeded the index entry limit\&. The table has the following columns\&.
 .PP
 Index Name
@@ -95,8 +97,7 @@
 This is
 true
 for valid indexes\&. If this is
-false, the index might be degraded.
-Verify the index, and rebuild the index if necessary\&.
+false, the index might be degraded\&. Verify the index, and rebuild the index if necessary\&.
 .RE
 .PP
 Record Count
@@ -168,8 +169,8 @@
 .RS 4
 .\}
 .nf
-$ dbtest dump\-database\-container \-n userRoot \-b dc=example,dc=com
- \-d sudoUser\&.equality
+$ \fBdbtest dump\-database\-container \-n userRoot \-b dc=example,dc=com \e
+ \-d sudoUser\&.equality\fR
 Indexed Value (6 bytes): %admin
 Entry ID List (8 bytes): 165 
 
@@ -183,11 +184,12 @@
 Total Records: 3
 Total / Average Key Size: 13 bytes / 4 bytes
 Total / Average Data Size: 24 bytes / 8 bytes
+  
 .fi
 .if n \{\
 .RE
 .\}
 .SH "COPYRIGHT"
 .br
-Copyright \(co 2011-2014 ForgeRock AS
+Copyright \(co 2011-2015 ForgeRock AS.
 .br
diff --git a/opendj3-server-dev/src/main/docbkx/admin-guide/chap-indexing.xml b/opendj3-server-dev/src/main/docbkx/admin-guide/chap-indexing.xml
index 0d24a23..0faba8c 100644
--- a/opendj3-server-dev/src/main/docbkx/admin-guide/chap-indexing.xml
+++ b/opendj3-server-dev/src/main/docbkx/admin-guide/chap-indexing.xml
@@ -20,7 +20,7 @@
   !
   ! CCPL HEADER END
   !
-  !      Copyright 2011-2014 ForgeRock AS
+  !      Copyright 2011-2015 ForgeRock AS.
   !    
 -->
 <chapter xml:id='chap-indexing'
@@ -647,6 +647,13 @@
      <literal>false</literal> before the rebuild, <literal>true</literal> after.
     </para>
 
+    <note>
+     <para>
+      The <command>dbtest list-index-status</command> command
+      can take a long time to complete, as it reads all indexes for all backends.
+     </para>
+    </note>
+
     <screen>
 $ <userinput>dbtest \
  list-index-status \
diff --git a/opendj3-server-dev/src/main/docbkx/admin-guide/index.xml b/opendj3-server-dev/src/main/docbkx/admin-guide/index.xml
index e2684b2..8e4f98e 100644
--- a/opendj3-server-dev/src/main/docbkx/admin-guide/index.xml
+++ b/opendj3-server-dev/src/main/docbkx/admin-guide/index.xml
@@ -20,7 +20,7 @@
   !
   ! CCPL HEADER END
   !
-  !      Copyright 2011-2014 ForgeRock AS
+  !      Copyright 2011-2015 ForgeRock AS.
   !
 -->
 <book xml:id='admin-guide'
@@ -39,8 +39,8 @@
    project offers open source LDAP directory services in Java.</para>
   </abstract>
   <copyright>
-   <year>2011-2014</year>
-   <holder>ForgeRock AS</holder>
+   <year>2011-2015</year>
+   <holder>ForgeRock AS.</holder>
   </copyright>
   <authorgroup>
    <author>
diff --git a/opendj3-server-dev/src/main/docbkx/admin-guide/man-dbtest.xml b/opendj3-server-dev/src/main/docbkx/admin-guide/man-dbtest.xml
index 7b5e715..462d686 100644
--- a/opendj3-server-dev/src/main/docbkx/admin-guide/man-dbtest.xml
+++ b/opendj3-server-dev/src/main/docbkx/admin-guide/man-dbtest.xml
@@ -20,7 +20,7 @@
   !
   ! CCPL HEADER END
   !
-  !      Copyright 2011-2014 ForgeRock AS
+  !      Copyright 2011-2015 ForgeRock AS.
   !    
 -->
 <refentry xml:id='dbtest-1'
@@ -29,7 +29,7 @@
  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
  xsi:schemaLocation='http://docbook.org/ns/docbook
                      http://docbook.org/xml/5.0/xsd/docbook.xsd'>
- <info><copyright><year>2011-2014</year><holder>ForgeRock AS</holder></copyright></info>
+ <info><copyright><year>2011-2015</year><holder>ForgeRock AS.</holder></copyright></info>
  <refmeta>
   <refentrytitle>dbtest</refentrytitle><manvolnum>1</manvolnum>
   <refmiscinfo class="software">OpenDJ</refmiscinfo>
@@ -41,7 +41,7 @@
  </refnamediv>
  <refsynopsisdiv>
   <cmdsynopsis>
-   <command>dbtest</command> <command>subcommand</command> <arg>options</arg>
+   <command>dbtest <replaceable>subcommand</replaceable></command> <arg>options</arg>
   </cmdsynopsis>
  </refsynopsisdiv>
  <refsect1>
@@ -80,6 +80,11 @@
       <para>List the status of indexes in an entry container</para>
 
       <para>
+       This command can take a long time to complete,
+       as it reads all indexes for all backends.
+      </para>
+
+      <para>
        When you list index status, the result is a table,
        followed by a "Total", which is the total number of indexes,
        followed by a list of indexes with "Undefined keys" to show
diff --git a/opendj3-server-dev/src/messages/messages/tools.properties b/opendj3-server-dev/src/messages/messages/tools.properties
index 7f4f667..0055d1e 100644
--- a/opendj3-server-dev/src/messages/messages/tools.properties
+++ b/opendj3-server-dev/src/messages/messages/tools.properties
@@ -1849,7 +1849,9 @@
   their appropriate types
 ERR_DBTEST_DECODE_FAIL_1335=An error occurred while decoding data: %s
 INFO_DESCRIPTION_DBTEST_SUBCMD_LIST_INDEX_STATUS_1336=List the status of \
-  indexes in an entry container
+  indexes in an entry container. \
+  This subcommand can take a long time to complete, \
+  as it reads all indexes for all backends.
 INFO_DESCRIPTION_DBTEST_MAX_KEY_VALUE_1337=Only show records with keys that \
   should be ordered before the provided value using the comparator for the \
   database container

--
Gitblit v1.10.0