adamdebreceni commented on a change in pull request #1071:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1071#discussion_r647377355



##########
File path: 
extensions/rocksdb-repos/controllers/RocksDbPersistableKeyValueStoreService.cpp
##########
@@ -58,18 +58,18 @@ void RocksDbPersistableKeyValueStoreService::onEnable() {
   }
 
   db_.reset();
-  rocksdb::Options options;
-  options.create_if_missing = true;
-  options.use_direct_io_for_flush_and_compaction = true;
-  options.use_direct_reads = true;
+  auto db_opts = [] (internal::Writable<rocksdb::DBOptions>& db_opts) {
+    db_opts.set(&rocksdb::DBOptions::create_if_missing, true);
+    db_opts.set(&rocksdb::DBOptions::use_direct_io_for_flush_and_compaction, 
true);
+    db_opts.set(&rocksdb::DBOptions::use_direct_reads, true);
+  };
   // Use the same buffer settings as the FlowFileRepository
-  options.write_buffer_size = 8 << 20;
-  options.max_write_buffer_number = 20;
-  options.min_write_buffer_number_to_merge = 1;
-  if (!always_persist_) {
-    options.manual_wal_flush = true;
-  }
-  db_ = utils::make_unique<minifi::internal::RocksDatabase>(options, 
directory_);
+  auto cf_opts = [] (minifi::internal::Writable<rocksdb::ColumnFamilyOptions>& 
cf_opts) {
+    cf_opts.set(&rocksdb::ColumnFamilyOptions::write_buffer_size, 8ULL << 20U);
+    cf_opts.set<int>(&rocksdb::ColumnFamilyOptions::max_write_buffer_number, 
20);

Review comment:
       removed the `max_write_buffer_number` which makes it default to 2




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to