Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.0/Cloud)

86233: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud)
      86211: Merged V4.1-BUG-FIX (4.1.10) to V4.2-BUG-FIX (4.2.4)
         86138: MNT-12400: Merged DEV to V4.1-BUG-FIX (4.1.10)
            84644: MNT-12400: Bulk File System Import Tool logs incorrectly failed files
               - In case of IntegrityException show "Failed on batch commit" message instead of incorrect id entry. Show cm:name for nodes for which constraint check failed.
            84647: MNT-12400: Bulk File System Import Tool logs incorrectly failed files
               - Skip import for content with invalid metadata files.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@94530 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-01-31 09:45:18 +00:00
parent 01699f3e60
commit 236bf1e6c8
4 changed files with 72 additions and 4 deletions

View File

@@ -37,6 +37,7 @@ import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.repo.node.integrity.IntegrityException;
import org.alfresco.repo.transaction.AlfrescoTransactionSupport;
import org.alfresco.repo.transaction.RetryingTransactionHelper;
import org.alfresco.repo.transaction.TransactionListenerAdapter;
@@ -773,12 +774,13 @@ public class BatchProcessor<T> implements BatchMonitor
if (this.splitTxns)
{
this.txnLastError = t;
this.txnLastErrorEntryId = this.txnEntryId;
this.txnLastErrorEntryId = (t instanceof IntegrityException) ? "unknown" : this.txnEntryId;
this.txnErrors++;
if (BatchProcessor.this.logger.isWarnEnabled())
{
BatchProcessor.this.logger.warn(getProcessName() + ": Failed to process entry \""
+ BatchProcessor.this.currentEntryId + "\".", t);
String message = (t instanceof IntegrityException) ? ": Failed on batch commit." : ": Failed to process entry \""
+ this.txnEntryId + "\".";
BatchProcessor.this.logger.warn(getProcessName() + message, t);
}
}
// Otherwise, we have a retryable exception that we should propagate