forestdb: open normal commit.

locals-and-roots
Doug Coleman 2016-05-21 01:30:11 -07:00
parent a1914959d3
commit 7bd0d51359
1 changed files with 11 additions and 5 deletions

View File

@ -314,16 +314,22 @@ PRIVATE>
[ fdb_open fdb-check-error ] 3keep [ fdb_open fdb-check-error ] 3keep
2drop void* deref <fdb-file-handle> ; 2drop void* deref <fdb-file-handle> ;
: fdb-default-config-auto-commit ( -- config ) : fdb-config-normal-commit ( -- config )
fdb_get_default_config fdb_get_default_config
FDB_SEQTREE_USE >>seqtree_opt FDB_SEQTREE_USE >>seqtree_opt ;
: fdb-config-auto-commit ( -- config )
fdb-config-normal-commit
FDB_COMPACTION_AUTO >>compaction_mode FDB_COMPACTION_AUTO >>compaction_mode
1 >>compactor_sleep_duration 1 >>compactor_sleep_duration
t >>auto_commit ; t >>auto_commit ;
! Make SEQTREES by default ! Make SEQTREES by default
: fdb-open-default-config ( path -- file-handle ) : fdb-open-auto-commit ( path -- file-handle )
fdb-default-config-auto-commit fdb-open ; fdb-config-auto-commit fdb-open ;
: fdb-open-normal-commit ( path -- file-handle )
fdb-config-normal-commit fdb-open ;
: fdb-kvs-open-config ( name config -- kvs-handle ) : fdb-kvs-open-config ( name config -- kvs-handle )
[ [
@ -376,7 +382,7 @@ PRIVATE>
: with-forestdb ( path quot -- ) : with-forestdb ( path quot -- )
[ [
[ fdb-open-default-config &dispose current-fdb-file-handle ] dip with-variable [ fdb-open-normal-commit &dispose current-fdb-file-handle ] dip with-variable
] with-destructors ; inline ] with-destructors ; inline
: with-forestdb-kvs ( path name quot -- ) : with-forestdb-kvs ( path name quot -- )