From 5be1f8bf93e269f92e92fcd33eec429770af7332 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Fri, 28 May 2021 11:35:23 +0200 Subject: [PATCH] Revert "increase sqlite cache size (#2607)" This reverts commit f55c4bc40238be7fa6f0ad658bef38e8489a6d97. --- beacon_chain/beacon_chain_db.nim | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/beacon_chain/beacon_chain_db.nim b/beacon_chain/beacon_chain_db.nim index 810520ac1..8cf1622d0 100644 --- a/beacon_chain/beacon_chain_db.nim +++ b/beacon_chain/beacon_chain_db.nim @@ -19,10 +19,6 @@ import logScope: topics = "bc_db" -const - # Negative cache size to make sqlite use kilobytes - cacheSize = -24 * 1024 # 24mb - type DbSeq*[T] = object insertStmt: SqliteStmt[openArray[byte], void] @@ -276,11 +272,8 @@ proc new*(T: type BeaconChainDB, # Remove the deposits table we used before we switched # to storing only deposit contract checkpoints - if (let e = db.exec("DROP TABLE IF EXISTS deposits;"); e.isErr): - warn "Failed to drop the deposits table", msg = e.error() - - if (let e = db.exec("PRAGMA cache_size=" & $cacheSize & ";"); e.isErr): - warn "Failed to set cache size", msg = e.error() + if db.exec("DROP TABLE IF EXISTS deposits;").isErr: + debug "Failed to drop the deposits table" # An old pubkey->index mapping that hasn't been used on any mainnet release if db.exec("DROP TABLE IF EXISTS validatorIndexFromPubKey;").isErr: