diff options
author | Ade Lee <alee@redhat.com> | 2012-10-18 01:20:46 -0400 |
---|---|---|
committer | Ade Lee <alee@redhat.com> | 2012-10-22 12:03:29 -0400 |
commit | 40bcc2cc6e4b6f9f9bd36c56fc63f20902486188 (patch) | |
tree | a236e137a47ab0bd9c9d6433a4b93e275c50ebd3 /base/common | |
parent | 98ad9c109ec41d0977d4249ac5e41dcf4c484a22 (diff) | |
download | pki-40bcc2cc6e4b6f9f9bd36c56fc63f20902486188.tar.gz pki-40bcc2cc6e4b6f9f9bd36c56fc63f20902486188.tar.xz pki-40bcc2cc6e4b6f9f9bd36c56fc63f20902486188.zip |
Reorder VLV indexing for clones to avoid errors
Diffstat (limited to 'base/common')
3 files changed, 11 insertions, 12 deletions
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); } |