Skip to content

Commit

Permalink
max_total_wal_size is a db option (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnetheduck authored Jun 14, 2024
1 parent c5bbf83 commit 293dc07
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions rocksdb/columnfamily/cfopts.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions rocksdb/options/dbopts.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 293dc07

Please sign in to comment.