Skip to content

Commit 2d89c28

Browse files
author
wangchao
committed
set sqlite3 write synchronous off
1 parent 36909cb commit 2d89c28

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/ripple/app/main/DBInit.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace ripple {
2626
// Transaction database holds transactions and public keys
2727
const char* TxnDBInit[] =
2828
{
29-
"PRAGMA synchronous=NORMAL;",
29+
"PRAGMA synchronous=OFF;",
3030
"PRAGMA journal_mode=WAL;",
3131
"PRAGMA journal_size_limit=1582080;",
3232
"PRAGMA max_page_count=2147483646;",
@@ -80,7 +80,7 @@ int TxnDBCount = std::extent<decltype(TxnDBInit)>::value;
8080
// Ledger database holds ledgers and ledger confirmations
8181
const char* LedgerDBInit[] =
8282
{
83-
"PRAGMA synchronous=NORMAL;",
83+
"PRAGMA synchronous=OFF;",
8484
"PRAGMA journal_mode=WAL;",
8585
"PRAGMA journal_size_limit=1582080;",
8686

@@ -127,7 +127,7 @@ int LedgerDBCount = std::extent<decltype(LedgerDBInit)>::value;
127127
// SyncTableState database holds ledgers and ledger confirmations
128128
const char* SyncTableStateDBInit[] =
129129
{
130-
"PRAGMA synchronous=NORMAL;",
130+
"PRAGMA synchronous=OFF;",
131131
"PRAGMA journal_mode=WAL;",
132132
"PRAGMA journal_size_limit=1582080;",
133133

src/ripple/app/misc/SHAMapStoreImp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void SHAMapStoreImp::SavedStateDB::init (BasicConfig const& config,
3333

3434
open(session_, config, dbName);
3535

36-
session_ << "PRAGMA synchronous=FULL;";
36+
session_ << "PRAGMA synchronous=OFF;";
3737

3838
session_ <<
3939
"CREATE TABLE IF NOT EXISTS DbState ("

0 commit comments

Comments
 (0)