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

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

commit 8a6f2824b8abf53ea022ca571da33619d564a14a
Author: Surya Hebbar <[email protected]>
AuthorDate: Fri May 10 15:58:47 2024 +0530

    IMPALA-13105: Fix multiple imported query profiles fail to import/clear at 
once
    
    On importing multiple query profiles, insertion of the last query in the
    queue fails as no delay is provided for the insertion.
    
    This has been fixed by providing a delay after inserting the final query.
    
    On clearing all the imported queries, in some instances page reloads
    before clearing the IndexedDB object store.
    
    This has been fixed by triggering the page reload after clearing
    the object store succeeds.
    
    Change-Id: I42470fecd0cff6e193f080102575e51d86a2d562
    Reviewed-on: http://gerrit.cloudera.org:8080/21450
    Reviewed-by: Wenzhe Zhou <[email protected]>
    Reviewed-by: Riza Suminto <[email protected]>
    Tested-by: Impala Public Jenkins <[email protected]>
---
 www/queries.tmpl | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/www/queries.tmpl b/www/queries.tmpl
index 5422989d2..666d93767 100644
--- a/www/queries.tmpl
+++ b/www/queries.tmpl
@@ -282,8 +282,9 @@ command line parameter.</p>
   }
 
   function clearProfiles() {
-    db.transaction("profiles", "readwrite").objectStore("profiles").clear();
-    setScrollReload();
+    db.transaction("profiles", 
"readwrite").objectStore("profiles").clear().onsuccess = () => {
+      setScrollReload();
+    }
   }
 
   function uploadProfile() {
@@ -330,7 +331,7 @@ command line parameter.</p>
           profileStore.put(query).onsuccess = () => {
             uploadCount++;
             if (uploadCount == json_profile_chooser.files.length) {
-              setScrollReload();
+              setTimeout(setScrollReload, 1000);
             }
           };
         } catch (err) {

Reply via email to