!187 lmdb no sync

Merge pull request !187 from shipixian/dev_performance
This commit is contained in:
zoujia_yewu 2023-07-03 06:08:20 +00:00 committed by Gitee
commit 43e90f6f5a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -240,7 +240,7 @@ InitPageDBEnv()
mdb_env_create(&pageEnv);
mdb_env_set_maxreaders(pageEnv,MAXREADERS);
mdb_env_set_mapsize(pageEnv,MAPSIE);
mdb_env_open(pageEnv,lmdb_page_directory,MDB_FIXEDMAP,0664);
mdb_env_open(pageEnv,lmdb_page_directory,MDB_FIXEDMAP|MDB_NOSYNC,0664);
mdb_txn_begin(pageEnv, NULL, 0, &pageTxn);
mdb_dbi_open(pageTxn,NULL,MDB_CREATE,&pageDbi);
mdb_txn_commit(pageTxn);
@ -255,7 +255,7 @@ void InitWalDBEnv()
mdb_env_create(&walEnv);
mdb_env_set_maxreaders(walEnv,MAXREADERS);
mdb_env_set_mapsize(walEnv,MAPSIE);
mdb_env_open(walEnv,lmdb_wal_directory,MDB_FIXEDMAP,0664);
mdb_env_open(walEnv,lmdb_wal_directory,MDB_FIXEDMAP|MDB_NOSYNC,0664);
mdb_txn_begin(walEnv, NULL, 0, &walTxn);
mdb_dbi_open(walTxn,NULL,MDB_CREATE|MDB_DUPSORT,&walDbi);
mdb_txn_commit(walTxn);