From 293dc0745ea8386237546acb352a265a4bc874b5 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Fri, 14 Jun 2024 15:43:49 +0200 Subject: [PATCH] max_total_wal_size is a db option (#50) --- rocksdb/columnfamily/cfopts.nim | 4 ---- rocksdb/options/dbopts.nim | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rocksdb/columnfamily/cfopts.nim b/rocksdb/columnfamily/cfopts.nim index c11fe21..4e09af9 100644 --- a/rocksdb/columnfamily/cfopts.nim +++ b/rocksdb/columnfamily/cfopts.nim @@ -96,10 +96,6 @@ proc setFixedPrefixExtractor*(dbOpts: ColFamilyOptionsRef, length: int) = rocksdb_options_set_prefix_extractor( dbOpts.cPtr, rocksdb_slicetransform_create_fixed_prefix(length.csize_t)) -proc setMaxTotalWalSize*(dbOpts: ColFamilyOptionsRef, size: int) = - doAssert not dbOpts.isClosed() - rocksdb_options_set_max_total_wal_size(dbOpts.cPtr, size.csize_t) - proc setCompression*(dbOpts: ColFamilyOptionsRef, value: Compression) = doAssert not dbOpts.isClosed() rocksdb_options_set_compression(dbOpts.cPtr, value.cint) diff --git a/rocksdb/options/dbopts.nim b/rocksdb/options/dbopts.nim index 00f6af0..7b52657 100644 --- a/rocksdb/options/dbopts.nim +++ b/rocksdb/options/dbopts.nim @@ -90,6 +90,10 @@ proc setOptimizeFiltersForHits*(dbOpts: DbOptionsRef, value: bool) = doAssert not dbOpts.isClosed() rocksdb_options_set_optimize_filters_for_hits(dbOpts.cPtr, value.cint) +proc setMaxTotalWalSize*(dbOpts: DbOptionsRef, size: int) = + doAssert not dbOpts.isClosed() + rocksdb_options_set_max_total_wal_size(dbOpts.cPtr, size.csize_t) + proc defaultDbOptions*(): DbOptionsRef = let opts: DbOptionsRef = newDbOptions()