From 40bcc2cc6e4b6f9f9bd36c56fc63f20902486188 Mon Sep 17 00:00:00 2001 From: Ade Lee Date: Thu, 18 Oct 2012 01:20:46 -0400 Subject: Reorder VLV indexing for clones to avoid errors --- .../src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java | 8 ++++---- .../src/com/netscape/cms/servlet/csadmin/DatabasePanel.java | 7 +++---- .../src/com/netscape/cms/servlet/csadmin/SystemConfigService.java | 8 ++++---- 3 files changed, 11 insertions(+), 12 deletions(-) (limited to 'base/common') diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java b/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java index e247b4297..c5804f2d4 100644 --- a/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java +++ b/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java @@ -1506,8 +1506,8 @@ public class ConfigurationUtils { return dir.delete(); } - public static void populateIndexes() throws Exception { - CMS.debug("populateIndexes(): start"); + public static void populateVLVIndexes() throws Exception { + CMS.debug("populateVLVIndexes(): start"); IConfigStore cs = CMS.getConfigStore(); IConfigStore dbCfg = cs.getSubStore("internaldb"); @@ -1542,7 +1542,7 @@ public class ConfigurationUtils { taskComplete = true; String val = (String) attr.getStringValues().nextElement(); if (val.compareTo("0") != 0) { - CMS.debug("Error in populating local indexes: nsTaskExitCode=" + val); + CMS.debug("Error in populating local VLV indexes: nsTaskExitCode=" + val); } } } @@ -1552,7 +1552,7 @@ public class ConfigurationUtils { } while (!taskComplete); } } catch (Exception e) { - CMS.debug("populateIndexes(): Exception thrown: " + e); + CMS.debug("populateVLVIndexes(): Exception thrown: " + e); throw e; } finally { releaseConnection(conn); diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java b/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java index 89f01e01c..67f10bd8e 100644 --- a/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java +++ b/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java @@ -483,15 +483,14 @@ public class DatabasePanel extends WizardPanelBase { cs.putString("preop.internaldb.replicationpwd", replicationpwd); cs.putString("preop.database.removeData", "false"); - ConfigurationUtils.reInitSubsystem(csType); - ConfigurationUtils.populateIndexes(); - if (select.equals("clone")) { CMS.debug("Start setting up replication."); ConfigurationUtils.setupReplication(); - ConfigurationUtils.reInitSubsystem(csType); } + ConfigurationUtils.reInitSubsystem(csType); + ConfigurationUtils.populateVLVIndexes(); + cs.putBoolean("preop.Database.done", true); cs.commit(false); } catch (Exception e) { diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java b/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java index 8bc3c5946..800f12365 100644 --- a/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java +++ b/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java @@ -380,14 +380,14 @@ public class SystemConfigService extends PKIService implements SystemConfigResou cs.putString("preop.database.removeData", "false"); cs.commit(false); - ConfigurationUtils.reInitSubsystem(csType); - ConfigurationUtils.populateIndexes(); - if (data.getIsClone().equals("true")) { CMS.debug("Start setting up replication."); ConfigurationUtils.setupReplication(); - ConfigurationUtils.reInitSubsystem(csType); } + + ConfigurationUtils.reInitSubsystem(csType); + ConfigurationUtils.populateVLVIndexes(); + } catch (Exception e) { throw new PKIException("Error in populating database" + e); } -- cgit