0

Deprecate the use of EnableWalModeByDefault experiment

This CL is removing the old experiment from:
  https://chromium-review.googlesource.com/c/chromium/src/+/2095927

The deprecated feature was trying to enable WAL mode on all database
at once. The gains of WAL mode is database specific.

The WAL mode was shipped on some specifics database and more
database will be converted after fixing the exclusive mode issues.

Bug: 40549957
Change-Id: I35d70211ebf2f875ccaf8662dd071b43de351472
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6496038
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Commit-Queue: Etienne Bergeron <etienneb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1454409}
This commit is contained in:
Etienne Bergeron
2025-05-01 06:12:43 -07:00
committed by Chromium LUCI CQ
parent 1857313ace
commit e211c3d666
5 changed files with 1 additions and 21 deletions

@ -77,7 +77,6 @@
#include "services/network/public/mojom/network_service_test.mojom.h"
#include "services/network/test/udp_socket_test_util.h"
#include "sql/database.h"
#include "sql/sql_features.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@ -980,11 +979,6 @@ static const base::FilePath::CharType kNetworkSubpath[] =
class MAYBE_NetworkServiceDataMigrationBrowserTest : public ContentBrowserTest {
public:
MAYBE_NetworkServiceDataMigrationBrowserTest() {
// Migration only supports non-WAL sqlite databases. If this feature is
// switched on by default before migration has been completed then the code
// in MaybeGrantSandboxAccessToNetworkContextData will need to be updated.
EXPECT_FALSE(
base::FeatureList::IsEnabled(sql::features::kEnableWALModeByDefault));
#if BUILDFLAG(IS_WIN)
// On Windows, the network sandbox needs to be disabled. This is because the
// code that performs the migration on Windows DCHECKs if network sandbox is

@ -20,7 +20,6 @@
#include "base/check_op.h"
#include "base/component_export.h"
#include "base/containers/flat_map.h"
#include "base/feature_list.h"
#include "base/files/file_path.h"
#include "base/functional/callback.h"
#include "base/gtest_prod_util.h"
@ -36,7 +35,6 @@
#include "base/time/time.h"
#include "base/types/pass_key.h"
#include "sql/internal_api_token.h"
#include "sql/sql_features.h"
#include "sql/sql_name_variants.h"
#include "sql/sqlite_result_code.h"
#include "sql/sqlite_result_code_values.h"
@ -280,8 +278,7 @@ struct COMPONENT_EXPORT(SQL) DatabaseOptions {
bool exclusive_locking_ = true;
bool exclusive_database_file_lock_ = false;
bool wal_mode_ =
base::FeatureList::IsEnabled(sql::features::kEnableWALModeByDefault);
bool wal_mode_ = false;
bool flush_to_media_ = false;
int page_size_ = kDefaultPageSize;
int cache_size_ = 0;

@ -31,11 +31,9 @@
#include "base/test/bind.h"
#include "base/test/gtest_util.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "build/buildflag.h"
#include "sql/database.h"
#include "sql/meta_table.h"
#include "sql/sql_features.h"
#include "sql/sqlite_result_code.h"
#include "sql/sqlite_result_code_values.h"
#include "sql/statement.h"
@ -70,8 +68,6 @@ class SqlRecoveryTest : public testing::Test,
public:
SqlRecoveryTest()
: db_(DatabaseOptions().set_wal_mode(ShouldEnableWal()), test::kTestTag) {
scoped_feature_list_.InitWithFeatureStates(
{{features::kEnableWALModeByDefault, ShouldEnableWal()}});
}
bool ShouldEnableWal() { return GetParam(); }
@ -106,7 +102,6 @@ class SqlRecoveryTest : public testing::Test,
}
protected:
base::test::ScopedFeatureList scoped_feature_list_;
base::ScopedTempDir temp_dir_;
base::FilePath db_path_;
Database db_;

@ -8,11 +8,6 @@
namespace sql::features {
// Enable WAL mode for all SQLite databases.
BASE_FEATURE(kEnableWALModeByDefault,
"EnableWALModeByDefault",
base::FEATURE_DISABLED_BY_DEFAULT);
// Use a fixed memory-map size instead of using the heuristic.
BASE_FEATURE(kSqlFixedMmapSize,
"SqlFixedMmapSize",

@ -14,7 +14,6 @@ namespace sql::features {
// be documented alongside the definition of their values in the .cc file.
// Alphabetical:
COMPONENT_EXPORT(SQL) BASE_DECLARE_FEATURE(kEnableWALModeByDefault);
COMPONENT_EXPORT(SQL) BASE_DECLARE_FEATURE(kSqlFixedMmapSize);
COMPONENT_EXPORT(SQL) BASE_DECLARE_FEATURE(kUnlockDatabaseOnClose);