1060: ingest stuck

This commit is contained in:
Raman 2018-10-09 09:55:51 -04:00
parent 8ff4b44b97
commit cc62e0c713
2 changed files with 16 additions and 10 deletions

View File

@ -687,10 +687,18 @@ public final class ImageGalleryController {
progressHandle.start();
caseDbTransaction.commit();
caseDbTransaction = null;
// pass true so that groupmanager is notified of the changes
taskDB.commitTransaction(drawableDbTransaction, true);
drawableDbTransaction = null;
} catch (TskCoreException ex) {
progressHandle.progress(Bundle.BulkTask_stopCopy_status());
logger.log(Level.WARNING, "Stopping copy to drawable db task. Failed to transfer all database contents", ex); //NON-NLS
MessageNotifyUtil.Notify.warn(Bundle.BulkTask_errPopulating_errMsg(), ex.getMessage());
cleanup(false);
return;
} finally {
if (null != drawableDbTransaction) {
taskDB.rollbackTransaction(drawableDbTransaction);
}
@ -701,13 +709,6 @@ public final class ImageGalleryController {
logger.log(Level.SEVERE, "Error in trying to rollback transaction", ex2); //NON-NLS
}
}
progressHandle.progress(Bundle.BulkTask_stopCopy_status());
logger.log(Level.WARNING, "Stopping copy to drawable db task. Failed to transfer all database contents", ex); //NON-NLS
MessageNotifyUtil.Notify.warn(Bundle.BulkTask_errPopulating_errMsg(), ex.getMessage());
cleanup(false);
return;
} finally {
progressHandle.finish();
if (taskCompletionStatus) {
taskDB.insertOrUpdateDataSource(dataSourceObjId, DrawableDB.DrawableDbBuildStatusEnum.COMPLETE);

View File

@ -271,7 +271,9 @@ public final class DrawableDB {
insertGroup(cat.getDisplayName(), DrawableAttribute.CATEGORY, caseDbTransaction);
}
caseDbTransaction.commit();
} catch (TskCoreException ex) {
caseDbTransaction = null;
}
finally {
if (null != caseDbTransaction) {
try {
caseDbTransaction.rollback();
@ -279,7 +281,6 @@ public final class DrawableDB {
logger.log(Level.SEVERE, "Error in trying to rollback transaction", ex2);
}
}
throw ex;
}
initializeImageList();
@ -802,9 +803,14 @@ public final class DrawableDB {
caseDbTransaction = tskCase.beginTransaction();
updateFile(f, trans, caseDbTransaction);
caseDbTransaction.commit();
caseDbTransaction = null;
commitTransaction(trans, true);
trans = null;
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error updating file", ex); //NON-NLS
}
finally {
if (null != caseDbTransaction) {
try {
caseDbTransaction.rollback();
@ -815,7 +821,6 @@ public final class DrawableDB {
if (null != trans) {
rollbackTransaction(trans);
}
logger.log(Level.SEVERE, "Error updating file", ex); //NON-NLS
}
}