max_total_wal_size is a db option (#50)

This commit is contained in:
Jacek Sieka 2024-06-14 15:43:49 +02:00 committed by GitHub
parent c5bbf83114
commit 293dc0745e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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()