Change the default value of sync mode to NORMAL

When journal mode is WAL ,the default sync mode is FULL.
In Android S when journal mode is WAL,the default sync mode is NORMAL.

In the annotation of google it's said when journal mode is WAL,
the best sync mode should be NORMAL.

Incorrect sync mode cause performance drop.

Bug: 246753316
Test: run fs benchmark

Change-Id: I8110d66091cd443db9b09f6e8564f9d97f5e7297
This commit is contained in:
ot905302
2022-09-13 17:56:53 +08:00
committed by chuanghua zhao
parent eca09fa8f9
commit 46edcf3be4

View File

@@ -299,7 +299,7 @@ public final class SQLiteDatabaseConfiguration {
if (isLegacyCompatibilityWalEnabled()) {
return SQLiteCompatibilityWalFlags.getWALSyncMode();
} else {
return SQLiteGlobal.getDefaultSyncMode();
return SQLiteGlobal.getWALSyncMode();
}
} else {
return SQLiteGlobal.getDefaultSyncMode();