This is an automated email from the ASF dual-hosted git repository.

michaelsmith pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit aa715dbabc705f4c86740cb8531090cf1eab553f
Author: Surya Hebbar <[email protected]>
AuthorDate: Fri Jun 28 20:03:56 2024 +0530

    IMPALA-13189: Reset the database on clearing imported query profiles
    
    On clicking the "X" button beside the imported query profiles
    section header, deleting the entire "imported_profiles" database
    and recreating it instead of clearing the "profiles" object store
    would be more beneficial.
    
    This could potentially resolve problems with indexing in the database.
    
    When the "imported_profiles" database is being deleted, a message is
    displayed adjacent to the imported query profiles section header
    to ensure page is not reloaded / closed during the process.
    
    Change-Id: I0c70b4aaf66f6dc3804a279928d610475834e4f3
    Reviewed-on: http://gerrit.cloudera.org:8080/21558
    Reviewed-by: Impala Public Jenkins <[email protected]>
    Tested-by: Impala Public Jenkins <[email protected]>
---
 www/queries.tmpl | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/www/queries.tmpl b/www/queries.tmpl
index 98aafd82f..3a76aa37c 100644
--- a/www/queries.tmpl
+++ b/www/queries.tmpl
@@ -304,17 +304,18 @@ command line parameter.</p>
     };
   }
 
-  function clearProfiles() {
-    db.transaction("profiles", 
"readwrite").objectStore("profiles").clear().onsuccess = () => {
-      setScrollReload();
-    };
-  }
-
   function showImportedQueriesStatusMessage(status_message) {
     error_message.style.display = "unset";
     error_message.textContent = status_message;
   }
 
+  function clearProfiles() {
+    indexedDB.deleteDatabase("imported_queries");
+    showImportedQueriesStatusMessage("Clearing imported query profiles in 
progress."
+        + " Do not close/refresh the page.");
+    setTimeout(setScrollReload, 1000);
+  }
+
   function startProfilesUpload() {
     raw_total_size = 0;
     compressed_total_size = 0;

Reply via email to