From 2c62672ab72e34db58d1174c07d9f4822b096e36 Mon Sep 17 00:00:00 2001
From: pgamba <pgamba@localhost>
Date: Thu, 12 Jul 2007 07:44:17 +0000
Subject: [PATCH] Fix for 1893 - Total update of a suffix destroys all data in the database
---
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java | 15 ++++-----------
1 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java b/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java
index 3118ed8..29370de 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java
@@ -202,7 +202,6 @@
// The backend information necessary to make an import or export.
private Backend backend;
- private List<DN> branches = new ArrayList<DN>(0);
private int listenerThreadNumber = 10;
@@ -2393,12 +2392,6 @@
}
this.backend = domainBackend;
- this.branches = new ArrayList<DN>(backendCfg.getBackendBaseDN().size());
- for (DN dn : backendCfg.getBackendBaseDN())
- {
- this.branches.add(dn);
- }
-
if (! domainBackend.supportsLDIFImport())
{
int msgID = MSGID_LDIFIMPORT_CANNOT_IMPORT;
@@ -2652,9 +2645,6 @@
// Stop saving state
stateSavingDisabled = true;
- // Clear the backend
- clearJEBackend(false,backend.getBackendID(),null);
-
// FIXME setBackendEnabled should be part of TaskUtils ?
TaskUtils.disableBackend(backend.getBackendID());
@@ -2704,7 +2694,10 @@
ieContext.ldifImportInputStream = new ReplLDIFInputStream(this);
importConfig =
new LDIFImportConfig(ieContext.ldifImportInputStream);
- importConfig.setIncludeBranches(this.branches);
+ List<DN> includeBranches = new ArrayList<DN>();
+ includeBranches.add(this.baseDN);
+ importConfig.setIncludeBranches(includeBranches);
+ importConfig.setAppendToExistingData(false);
// TODO How to deal with rejected entries during the import
// importConfig.writeRejectedEntries("rejectedImport",
--
Gitblit v1.10.0