diff --git a/services/clouddisk_database/include/clouddisk_rdbstore.h b/services/clouddisk_database/include/clouddisk_rdbstore.h index 7dfce91fe233d6392fcebf626553da1363e70bbb..5899656a1371bad3313a56eaa73153f5e7d90625 100644 --- a/services/clouddisk_database/include/clouddisk_rdbstore.h +++ b/services/clouddisk_database/include/clouddisk_rdbstore.h @@ -117,6 +117,7 @@ private: std::shared_ptr rdbStore_; NativeRdb::RdbStoreConfig config_{""}; const int32_t CONNECT_SIZE = 8; + const int64_t RDB_WAL_LIMIT_SIZE = 0x400000000; std::string bundleName_; int32_t userId_{0}; std::string tableName_ = FileColumn::FILES_TABLE; diff --git a/services/clouddisk_database/src/clouddisk_rdbstore.cpp b/services/clouddisk_database/src/clouddisk_rdbstore.cpp index b6a6b050c6d41902042d8a989ca5bee741670c25..915cc675d26f6a4147d90a4db2455ca688bfaed5 100644 --- a/services/clouddisk_database/src/clouddisk_rdbstore.cpp +++ b/services/clouddisk_database/src/clouddisk_rdbstore.cpp @@ -146,6 +146,7 @@ int32_t CloudDiskRdbStore::RdbInit() config_.SetPath(databasePath); config_.SetReadConSize(CONNECT_SIZE); config_.SetScalarFunction("cloud_sync_func", ARGS_SIZE, CloudSyncTriggerFunc); + config_.SetWalLimitSize(RDB_WAL_LIMIT_SIZE); errCode = 0; CloudDiskDataCallBack rdbDataCallBack; rdbStore_ = RdbHelper::GetRdbStore(config_, CLOUD_DISK_RDB_VERSION, rdbDataCallBack, errCode);