From 8d0ed1c1600f6d4db59458d9e32a3767f18fe00e Mon Sep 17 00:00:00 2001
From: Kelly Kelly <kelly@basistech.com>
Date: Thu, 29 Apr 2021 10:41:41 -0400
Subject: [PATCH] IG removed intermin commits of drawabledb during bulk commit

---
 .../imagegallery/DrawableFileUpdateTask.java       | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/DrawableFileUpdateTask.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/DrawableFileUpdateTask.java
index 0e265b1fda..150aa04145 100755
--- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/DrawableFileUpdateTask.java
+++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/DrawableFileUpdateTask.java
@@ -161,7 +161,7 @@ private void updateFileForDataSource(long dataSourceObjId) {
             int workDone = 0;
             // Cycle through all of the files returned and call processFile on each
             //do in transaction
-
+            drawableDbTransaction = getDrawableDB().beginTransaction();
             /*
              * We are going to periodically commit the CaseDB transaction and
              * sleep so that the user can have Autopsy do other stuff while
@@ -174,11 +174,7 @@ private void updateFileForDataSource(long dataSourceObjId) {
                 if (caseDbTransaction == null) {
                     caseDbTransaction = getCaseDB().beginTransaction();
                 }
-
-                if (drawableDbTransaction == null) {
-                    drawableDbTransaction = getDrawableDB().beginTransaction();
-                }
-
+                
                 if (isCancelled() || Thread.interrupted()) {
                     logger.log(Level.WARNING, "Task cancelled or interrupted: not all contents may be transfered to drawable database."); //NON-NLS
                     endedEarly = true;
@@ -195,11 +191,7 @@ private void updateFileForDataSource(long dataSourceObjId) {
                 if ((++caseDbCounter % 200) == 0) {
                     caseDbTransaction.commit();
                     caseDbTransaction = null;
-
-                    getDrawableDB().commitTransaction(drawableDbTransaction, true);
-                    drawableDbTransaction = null;
-
-                    Thread.sleep(500); // 1/2 second
+                    Thread.sleep(500); // 1/2 millisecond
                 }
             }
             progressHandle.finish();
-- 
GitLab