Skip to content

Commit 8a6f282

Browse files
llsuryallrizaon
authored andcommitted
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 <wzhou@cloudera.com> Reviewed-by: Riza Suminto <riza.suminto@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
1 parent b975165 commit 8a6f282

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

www/queries.tmpl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,9 @@ command line parameter.</p>
282282
}
283283

284284
function clearProfiles() {
285-
db.transaction("profiles", "readwrite").objectStore("profiles").clear();
286-
setScrollReload();
285+
db.transaction("profiles", "readwrite").objectStore("profiles").clear().onsuccess = () => {
286+
setScrollReload();
287+
}
287288
}
288289

289290
function uploadProfile() {
@@ -330,7 +331,7 @@ command line parameter.</p>
330331
profileStore.put(query).onsuccess = () => {
331332
uploadCount++;
332333
if (uploadCount == json_profile_chooser.files.length) {
333-
setScrollReload();
334+
setTimeout(setScrollReload, 1000);
334335
}
335336
};
336337
} catch (err) {

0 commit comments

Comments
 (0)