diff --git a/extra/forestdb/ffi/ffi.factor b/extra/forestdb/ffi/ffi.factor index 8cd33587cf..7aeaabfa63 100644 --- a/extra/forestdb/ffi/ffi.factor +++ b/extra/forestdb/ffi/ffi.factor @@ -183,7 +183,19 @@ ENUM: fdb_latency_stat_type < uint8_t { FDB_LATENCY_COMMITS 2 } { FDB_LATENCY_SNAPSHOTS 3 } { FDB_LATENCY_SNAPSHOT_DUR 4 } - { FDB_LATENCY_COMPACTS 5 } ; + { FDB_LATENCY_COMPACTS 5 } + { FDB_LATENCY_ITR_INIT 6 } + { FDB_LATENCY_ITR_SEQ_INIT 7 } + { FDB_LATENCY_ITR_NEXT 8 } + { FDB_LATENCY_ITR_PREV 9 } + { FDB_LATENCY_ITR_GET 10 } + { FDB_LATENCY_ITR_GET_META 11 } + { FDB_LATENCY_ITR_SEEK 12 } + { FDB_LATENCY_ITR_SEEK_MAX 13 } + { FDB_LATENCY_ITR_SEEK_MIN 14 } + { FDB_LATENCY_ITR_CLOSE 15 } + { FDB_LATENCY_NUM_STATS 16 } ; + STRUCT: fdb_latency_stat { lat_count uint64_t } @@ -254,7 +266,31 @@ ENUM: fdb_status { FDB_RESULT_COMPACTION_CANCELLATION -45 } { FDB_RESULT_SB_INIT_FAIL -46 } { FDB_RESULT_SB_RACE_CONDITION -47 } - { FDB_RESULT_SB_READ_FAIL -48 } ; + { FDB_RESULT_SB_READ_FAIL -48 } + { FDB_RESULT_FILE_VERSION_NOT_SUPPORTED -49 } + { FDB_RESULT_EPERM -50 } + { FDB_RESULT_EIO -51 } + { FDB_RESULT_ENXIO -52 } + { FDB_RESULT_EBADF -53 } + { FDB_RESULT_ENOMEM -54 } + { FDB_RESULT_EACCESS -55 } + { FDB_RESULT_EFAULT -56 } + { FDB_RESULT_EEXIST -57 } + { FDB_RESULT_ENODEV -58 } + { FDB_RESULT_ENOTDIR -59 } + { FDB_RESULT_EISDIR -60 } + { FDB_RESULT_EINVAL -61 } + { FDB_RESULT_ENFILE -62 } + { FDB_RESULT_EMFILE -63 } + { FDB_RESULT_EFBIG -64 } + { FDB_RESULT_ENOSPC -65 } + { FDB_RESULT_EROFS -66 } + { FDB_RESULT_EOPNOTSUPP -67 } + { FDB_RESULT_ENOBUFS -68 } + { FDB_RESULT_ELOOP -69 } + { FDB_RESULT_ENAMETOOLONG -70 } + { FDB_RESULT_EOVERFLOW -71 } + { FDB_RESULT_EAGAIN -72 } ; ! End fdb_errors.h diff --git a/extra/forestdb/lib/lib.factor b/extra/forestdb/lib/lib.factor index 2fb7d787e0..8010cd21c9 100644 --- a/extra/forestdb/lib/lib.factor +++ b/extra/forestdb/lib/lib.factor @@ -299,12 +299,8 @@ T{ doc PRIVATE> - : get-kvs-default-config ( -- kvs-config ) - S{ fdb_kvs_config - { create_if_missing t } - { custom_cmp f } - } clone ; + fdb_get_default_kvs_config ; : fdb-open ( path config -- file-handle ) [ f void* ] 2dip @@ -312,8 +308,11 @@ PRIVATE> [ fdb_open fdb-check-error ] 3keep 2drop void* deref ; +! Make SEQTREES by default : fdb-open-default-config ( path -- file-handle ) - fdb_get_default_config fdb-open ; + fdb_get_default_config + FDB_SEQTREE_USE >>seqtree_opt + fdb-open ; : fdb-kvs-open-config ( name config -- kvs-handle ) [