Changeset 275583 in webkit


Ignore:
Timestamp:
Apr 6, 2021 6:28:54 PM (3 years ago)
Author:
sihui_liu@apple.com
Message:

[ Catalina WK2 Release ] http/tests/IndexedDB/storage-limit-1.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=213292
<rdar://problem/64447734>

Reviewed by Geoffrey Garen.

Test http/tests/IndexedDB/collect-IDB-objects.https.html, which runs right before
http/tests/IndexedDB/storage-limit-1.https.html, will delete databases after test completetion. During deletion,
we create a new database if it does not exist, extract database version from it, and then delete database files.
This creation can happen during storage-limit-1.https.html run and interrupt testing for quota. To fix the
flakiness and make the deletion more efficient, let's not create a new database during deletion if database
does not exist.

Source/WebCore:

  • Modules/indexeddb/server/IDBBackingStore.h:
  • Modules/indexeddb/server/MemoryIDBBackingStore.cpp:

(WebCore::IDBServer::MemoryIDBBackingStore::databaseVersion):

  • Modules/indexeddb/server/MemoryIDBBackingStore.h:
  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::databaseVersion):

  • Modules/indexeddb/server/SQLiteIDBBackingStore.h:
  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::deleteBackingStore):

LayoutTests:

  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r275582 r275583  
     12021-04-06  Sihui Liu  <sihui_liu@apple.com>
     2
     3        [ Catalina WK2 Release ] http/tests/IndexedDB/storage-limit-1.https.html is a flaky failure
     4        https://bugs.webkit.org/show_bug.cgi?id=213292
     5        <rdar://problem/64447734>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        Test http/tests/IndexedDB/collect-IDB-objects.https.html, which runs right before
     10        http/tests/IndexedDB/storage-limit-1.https.html, will delete databases after test completetion. During deletion,
     11        we create a new database if it does not exist, extract database version from it, and then delete database files.
     12        This creation can happen during storage-limit-1.https.html run and interrupt testing for quota. To fix the
     13        flakiness and make the deletion more efficient, let's not create a new database during deletion if database
     14        does not exist.
     15
     16        * platform/mac-wk2/TestExpectations:
     17        * platform/mac/TestExpectations:
     18
    1192021-04-06  Robert Jenner  <jenner@apple.com>
    220
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r275582 r275583  
    989989webkit.org/b/213212 [ Mojave Release ] webgl/2.0.0/conformance2/textures/canvas_sub_rectangle/tex-2d-rgb16f-rgb-half_float.html [ Pass Failure ]
    990990
    991 webkit.org/b/213292 [ Catalina Release ] http/tests/IndexedDB/storage-limit-1.https.html [ Pass Failure ]
    992 
    993991webkit.org/b/213461 fast/mediastream/mediastreamtrack-video-frameRate-clone-increasing.html [ Pass Failure ]
    994992
     
    10851083#  <rdar://problem/64816527> swipe/pushState-cached-back-swipe.html is a flaky failure
    10861084[ Catalina ] swipe/pushState-cached-back-swipe.html [ Pass Failure ]
    1087 
    1088 # <rdar://problem/63275213> REGRESSION: http/tests/IndexedDB/storage-limit-1.https.html is a flaky failure
    1089 [ BigSur+ Release ] http/tests/IndexedDB/storage-limit-1.https.html [ Pass Failure ]
    10901085
    10911086# <rdar://problem/63554249> [20A279] DQ bots are seeing http/tests/cache/disk-cache/disk-cache-validation-back-navigation-policy.html and http/tests/cache/disk-cache/disk-cache-validation-no-body.html are timing out
  • trunk/LayoutTests/platform/mac/TestExpectations

    r275580 r275583  
    18481848imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-without-codecs-parameter.html [ Pass Failure ]
    18491849
    1850 # <rdar://problem/56545293> REGRESSION (r250936?): http/tests/IndexedDB/storage-limit-1.https.html is a Flaky Failure
    1851 [ Catalina Release ] http/tests/IndexedDB/storage-limit-1.https.html [ Pass Failure ]
    1852 
    18531850# <rdar://problem/60376665> [ macOS ] svg/custom/glyph-selection-arabic-forms.svg is failing since around r252706
    18541851[ Mojave ] svg/custom/glyph-selection-arabic-forms.svg [ Failure ]
  • trunk/Source/WebCore/ChangeLog

    r275574 r275583  
     12021-04-06  Sihui Liu  <sihui_liu@apple.com>
     2
     3        [ Catalina WK2 Release ] http/tests/IndexedDB/storage-limit-1.https.html is a flaky failure
     4        https://bugs.webkit.org/show_bug.cgi?id=213292
     5        <rdar://problem/64447734>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        Test http/tests/IndexedDB/collect-IDB-objects.https.html, which runs right before
     10        http/tests/IndexedDB/storage-limit-1.https.html, will delete databases after test completetion. During deletion,
     11        we create a new database if it does not exist, extract database version from it, and then delete database files.
     12        This creation can happen during storage-limit-1.https.html run and interrupt testing for quota. To fix the
     13        flakiness and make the deletion more efficient, let's not create a new database during deletion if database
     14        does not exist.
     15
     16        * Modules/indexeddb/server/IDBBackingStore.h:
     17        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
     18        (WebCore::IDBServer::MemoryIDBBackingStore::databaseVersion):
     19        * Modules/indexeddb/server/MemoryIDBBackingStore.h:
     20        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
     21        (WebCore::IDBServer::SQLiteIDBBackingStore::databaseVersion):
     22        * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
     23        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
     24        (WebCore::IDBServer::UniqueIDBDatabase::deleteBackingStore):
     25
    1262021-04-06  Eric Carlson  <eric.carlson@apple.com>
    227
  • trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h

    r275151 r275583  
    6363
    6464    virtual IDBError getOrEstablishDatabaseInfo(IDBDatabaseInfo&) = 0;
     65    virtual uint64_t databaseVersion() = 0;
    6566
    6667    virtual IDBError beginTransaction(const IDBTransactionInfo&) = 0;
  • trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp

    r275151 r275583  
    6464}
    6565
     66uint64_t MemoryIDBBackingStore::databaseVersion()
     67{
     68    return m_databaseInfo ? m_databaseInfo->version() : 0;
     69}
     70
    6671void MemoryIDBBackingStore::setDatabaseInfo(const IDBDatabaseInfo& info)
    6772{
  • trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h

    r275151 r275583  
    4747
    4848    IDBError getOrEstablishDatabaseInfo(IDBDatabaseInfo&) final;
     49    uint64_t databaseVersion() final;
    4950    void setDatabaseInfo(const IDBDatabaseInfo&);
    5051
  • trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp

    r275301 r275583  
    12661266}
    12671267
     1268uint64_t SQLiteIDBBackingStore::databaseVersion()
     1269{
     1270    if (m_databaseInfo)
     1271        return m_databaseInfo->version();
     1272
     1273    String dbFilename = fullDatabasePath();
     1274    if (!FileSystem::fileExists(dbFilename))
     1275        return 0;
     1276
     1277    auto databaseNameAndVersion = databaseNameAndVersionFromFile(dbFilename);
     1278    return databaseNameAndVersion ? databaseNameAndVersion->version : 0;
     1279}
     1280
    12681281uint64_t SQLiteIDBBackingStore::databasesSizeForDirectory(const String& directory, bool shouldPrintUsageDetail)
    12691282{
  • trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h

    r275301 r275583  
    5858
    5959    IDBError getOrEstablishDatabaseInfo(IDBDatabaseInfo&) final;
     60    uint64_t databaseVersion() final;
    6061
    6162    IDBError beginTransaction(const IDBTransactionInfo&) final;
  • trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp

    r275151 r275583  
    292292    ASSERT(!isMainThread());
    293293    LOG(IndexedDB, "UniqueIDBDatabase::deleteBackingStore");
    294 
    295     uint64_t deletedVersion = 0;
    296 
    297     if (m_backingStore) {
    298         m_backingStore->deleteBackingStore();
    299         m_backingStore = nullptr;
    300     } else {
    301         auto backingStore = m_server.createBackingStore(m_identifier);
    302 
    303         IDBDatabaseInfo databaseInfo;
    304         auto error = backingStore->getOrEstablishDatabaseInfo(databaseInfo);
    305         if (!error.isNull())
    306             LOG_ERROR("Error getting database info from database %s that we are trying to delete", m_identifier.loggingString().utf8().data());
    307 
    308         deletedVersion = databaseInfo.version();
    309         backingStore->deleteBackingStore();
    310     }
    311 
     294   
     295    auto backingStore = m_backingStore ? std::exchange(m_backingStore, nullptr) : m_server.createBackingStore(m_identifier);
     296    uint64_t deletedVersion = backingStore->databaseVersion();
     297    backingStore->deleteBackingStore();
    312298    didDeleteBackingStore(deletedVersion);
    313299}
Note: See TracChangeset for help on using the changeset viewer.