Commit 678c372a authored by Chase Phillips's avatar Chase Phillips Committed by Commit Bot

IndexedDB: idb-load-docs should wait for all transactions

Previously, idb-load-docs would run a final transaction ("txn18")
which created a readonly transaction on the Documents store.

Since it didn't wait for this transaction to complete, the trace
and test results would often show "IDBObjectStore::get (Did Not
Finish)" results.  The telemetry harness had code to ignore these
"Did Not Finish" results.  If a change came along that did allow
these to complete, however, the results for the completed actions
would be included and count.  This might appear as a regression
when really the overall scheduling system was improving.

Finally, as the "Did Not Finish" tasks piled up, some or all of
them never finished, which caused the overall test to take
longer to complete as it waited for these tasks.  Eventually the
test framework would timeout waiting and this additional timeout
amount was included in our overall run time.  The run time didn't
impact the results, it did however make the traces hard to read.

Bug: 968812
Change-Id: I37f135670c6596a3d598b240d76dff5211b89429
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1636223Reviewed-by: default avatarDaniel Murphy <dmurph@chromium.org>
Reviewed-by: default avatarCaleb Rouleau <crouleau@chromium.org>
Commit-Queue: Chase Phillips <cmp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665238}
parent e5bfed5b
...@@ -155,14 +155,16 @@ ...@@ -155,14 +155,16 @@
lockGet.onsuccess = incrementBarrier(); lockGet.onsuccess = incrementBarrier();
let docGetBarrier = incrementBarrier(); let docGetBarrier = incrementBarrier();
let docGetCallbackPromise;
documentGet.onsuccess = () => { documentGet.onsuccess = () => {
docGetCallback(); docGetCallbackPromise = docGetCallback();
docGetBarrier(); docGetBarrier();
}; };
commandsDelete.onsuccess = incrementBarrier(); commandsDelete.onsuccess = incrementBarrier();
queuesGet.onsuccess = incrementBarrier(); queuesGet.onsuccess = incrementBarrier();
return transactionCompletePromise(txn).then(() => { return transactionCompletePromise(txn).then(async () => {
await docGetCallbackPromise;
logToDocumentBody("Txn17 done."); logToDocumentBody("Txn17 done.");
}); });
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment