Commit 636a6213 by ashutoshm

ATLAS-2129: Addressed Case Where Abrupt Shutdown of Atlas During Import Retains…

ATLAS-2129: Addressed Case Where Abrupt Shutdown of Atlas During Import Retains Entities Imported Before Shutdown
parent 2acf41fd
......@@ -147,7 +147,6 @@ public class AtlasEntityStoreV1 implements AtlasEntityStore {
}
@Override
@GraphTransaction
public EntityMutationResponse bulkImport(EntityImportStream entityStream, AtlasImportResult importResult) throws AtlasBaseException {
if (LOG.isDebugEnabled()) {
LOG.debug("==> bulkImport()");
......@@ -175,7 +174,7 @@ public class AtlasEntityStoreV1 implements AtlasEntityStore {
AtlasEntityStreamForImport oneEntityStream = new AtlasEntityStreamForImport(entityWithExtInfo, entityStream);
try {
EntityMutationResponse resp = createOrUpdate(oneEntityStream, false, true);
EntityMutationResponse resp = createOrUpdateForImport(oneEntityStream);
if (resp.getGuidAssignments() != null) {
ret.getGuidAssignments().putAll(resp.getGuidAssignments());
......@@ -288,6 +287,11 @@ public class AtlasEntityStoreV1 implements AtlasEntityStore {
return createOrUpdate(entityStream, isPartialUpdate, false);
}
@GraphTransaction
private EntityMutationResponse createOrUpdateForImport(EntityStream entityStream) throws AtlasBaseException {
return createOrUpdate(entityStream, false, true);
}
@Override
@GraphTransaction
public EntityMutationResponse updateByUniqueAttributes(AtlasEntityType entityType, Map<String, Object> uniqAttributes,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment